Skip to content

fix: display plan content in plan_exit dialog & bind variant list keybind#646

Open
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-202606150558-plan-display-variant-keybind
Open

fix: display plan content in plan_exit dialog & bind variant list keybind#646
MrRealORG wants to merge 1 commit into
XiaomiMiMo:mainfrom
MrRealORG:fix/auto-202606150558-plan-display-variant-keybind

Conversation

@MrRealORG

Copy link
Copy Markdown

Summary

Fixes #512 and improves #521.

1. Display plan content when plan_exit is called (#512)

Problem: After the plan agent finishes writing a plan and calls `plan_exit`, the question dialog only showed the plan file path (e.g., `.mimocode/plans/1749-xxx.md`) — the actual plan content was never displayed. Users had to manually find and open the plan file to see what was planned. The write tool call that created the plan file was collapsed in the message history.

Fix:

  • `packages/opencode/src/tool/plan.ts`: The `plan_exit` tool now reads the plan file content via `fs.readFileSync` and includes it in the question`s `params.planContent`.
  • `packages/opencode/src/cli/cmd/tui/routes/session/question.tsx`: The question rendering component now checks for `plan_exit` questions with `planContent` params and renders the plan text in a bordered box below the question text. Users see the full plan content while deciding whether to switch to the build agent.

2. Bind variant list keybind & add slash command alias (#521)

Problem: The `/variants` command (to pick model thinking intensity) had its keybind set to `"none"` (unbound). Users could only access it by typing `/variants` — there was no keyboard shortcut. Additionally, `/variant` (singular) was not recognized as an alias.

Fix:

  • `packages/opencode/src/config/keybinds.ts`: Changed `variant_list` keybind from `"none"` to `"ctrl+shift+t". This complements the existing \ctrl+t` (cycle) shortcut.
  • `packages/opencode/src/cli/cmd/tui/app.tsx`: Added `"variant"` as a slash command alias for `"variants"`.

…eybind

- XiaomiMiMo#512: The plan_exit tool now reads the plan file and passes its
  content via question params. The TUI question panel renders the
  plan content in a bordered box below the question text, so users
  can review the plan before choosing to switch to the build agent.

- XiaomiMiMo#521: The variant_list keybind was unbound ("none"), making it
  impossible to open the variant picker without typing /variants.
  Changed to Ctrl+Shift+T. Also added "variant" as a slash command
  alias for "/variants" so users don't have to guess the plural.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

不显示plan内容

1 participant