8000 feat: a chat offers the agent's own modes by aorumbayev · Pull Request #167 · kagan-sh/kagan · GitHub
[go: up one dir, main page]

Skip to content

feat: a chat offers the agent's own modes - #167

Merged
aorumbayev merged 12 commits into
feat/acp-threadsfrom
feat/acp-modes
Nov 30, 2026
Merged

aorumbayev merged 12 commits into
feat/acp-threadsfrom
feat/acp-modes

Conversation

@aorumbayev
@aorumbayev aorumbayev commented Nov 26, 2026 •
Copy link
Copy Markdown
Member

What

A chat's box starts with one chip naming the agent's mode in the agent's own words. Its menu lists every mode, model and option the agent offers, a risky mode draws the warning mark, a refusal names the option chosen, and Start again says Mode restored: <name>.

Why

Every agent offers a different set of modes and options, so a chat either left them out or needed a table per agent.

How

A mode the answer lists in modes changes through session/set_mode; one offered only in configOptions goes through session/set_config_option.

Test plan

  • Core tests, clippy, the workspace tests, the repo scripts and sh scripts/smoke.sh; CI on all three systems.
  • Real opencode app: the 82-model menu scrolls and a mode change lands (proof/pr-a/).

…n names it

A mode the answer listed in `modes` changes through `session/set_mode`, which ACP serves
only for the modes the agent advertised; every option from `configOptions`, a mode among
them, goes through `session/set_config_option`. The options now remember which ids the
answer gave in `configOptions`, so an agent that never advertised modes (opencode) is
never sent the mode call. Start again writes an info notice naming the mode it restores,
because the agent's own first mode is not the person's choice.

The fake agent answers a config call with the options it changed, so the new test can
tell the two calls apart.
opencode offers 82 models, so the chip's menu scrolls inside a bounded height instead of
running off the window. A refusal says which option did not change; it said "the mode"
for every one. The box's notice keeps its accessibility label, which the menu tests read.
@aorumbayev
aorumbayev marked this pull request as ready for review November 30, 2026 00:46
@aorumbayev
aorumbayev merged commit 2aa2e19 into feat/acp-threads Nov 30, 2026
13 of 19 checks passed
@aorumbayev
aorumbayev deleted the feat/acp-modes branch November 30, 2026 02:18
@aorumbayev
aorumbayev restored the feat/acp-modes branch November 30, 2026 02:39
@aorumbayev
Copy link
Copy Markdown
Member Author

Merged into #166.

@aorumbayev
aorumbayev deleted the feat/acp-modes branch December 6, 2026 00:53
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.

1 participant

3315
0