feat(desktop): skipped clarify keeps its choices visible and answerable - #69720
Closed
SHL0MS wants to merge 1 commit into
Closed
feat(desktop): skipped clarify keeps its choices visible and answerable#69720SHL0MS wants to merge 1 commit into
SHL0MS wants to merge 1 commit into
Conversation
When a clarify prompt times out, the settled card collapsed to just
'Skipped' — the options were unrecoverable (the args carry them, the
renderer dropped them) and there was no way to answer late.
The skipped card now:
- renders the original choices, letter-badged like the live card
- clicking one drafts a quoted follow-up ('Re: "<question>" — my
answer: <choice>') into the composer via the insert bus. Enter sends
it; if the agent is mid-turn it queues like any other prompt.
- a hint line explains the question timed out and what picking does
No retroactive resolution of the expired request: the tool already
returned empty and the turn moved on — injecting into past context
would break prompt-cache and role-alternation invariants, and
clarify.respond on an expired id hard-errors (NousResearch#56558). The follow-up
message path needs no backend change and works against old backends.
Answered clarifies and free-text (no-choice) skips are unchanged.
Interim UX for NousResearch#44845 (durable ID-addressable clarify decisions).
1 task
Collaborator
|
Superseded by #69769, which cherry-picks your commit (authorship preserved) and adds two refinements on top: a shared |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
When a clarify prompt (multiple-choice question) times out, the settled card collapses to just the question and an italic "Skipped". The choices vanish — even though they're sitting right in the tool-call args — and there is no way to answer after the fact. If you stepped away and missed the window, you can't even see what the agent asked you to pick between.
This keeps the choices on the skipped card and makes them actionable:
Re: "<question>" — my answer: <choice>— and focuses it. Enter sends it as a normal user message; if the agent is mid-turn, it queues like any other prompt.Deliberately NOT retroactive resolution of the expired request: by the time the card shows "Skipped", the tool has already returned empty and the turn has moved on. Injecting a late answer into past context would break the prompt-cache and role-alternation invariants, and
clarify.respondagainst an expired request id hard-errors today (#56558). The follow-up-message path needs zero backend changes and behaves identically against older backends.Answered clarifies and free-text (no-choice) skips render exactly as before.
Related: #44845 tracks the real long-term design (durable, ID-addressable clarify decisions instead of short blocking timers) — this is the interim UX until that lands. #12625 / #33567 (timeout controls) are adjacent but untouched.
Related Issue
Interim UX for #44845.
Type of Change
Changes Made
apps/desktop/src/components/assistant-ui/clarify-tool.tsx:ClarifyToolSettledreadschoicesfrom the tool args; when the result is a skip and choices exist, renders them as buttons that draft the follow-up via the composer insert bus (requestComposerInsert+requestComposerFocus).lateAnswer(template),lateAnswerTip,lateAnswerHintadded totypes.tsand all four locales (en, ja, zh, zh-hant).clarify-tool.test.tsx): skipped-with-choices renders the options and a click emits the drafted follow-up on the insert bus; answered clarifies and choice-less skips render no late-choice group.How to Test
approvals/clarify timeout for a faster repro).Re: "<question>" — my answer: <choice>and focuses. Enter sends; if the agent is busy the message queues and the queue panel shows it.cd apps/desktop && npx tsc -p . --noEmit && npx vitest run --project ui(1930 passed, 210 files); eslint clean on touched files (5 pre-existing-styledocumentwarnings in the test file match the repo's existing test patterns).Checklist
Code
fix(scope):,feat(scope):, etc.)npx vitest run --project ui) and all tests pass;pytestN/A, no Python changesDocumentation & Housekeeping
docs/, docstrings) — or N/A (no docs describe the skipped-clarify rendering)cli-config.yaml.exampleif I added/changed config keys — or N/ACONTRIBUTING.mdorAGENTS.mdif I changed architecture or workflows — or N/A