Repository navigation
fix(chat): retain composer drafts until submission is accepted #8400
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
ozeitis
wants to merge
12
commits into
ParadevAI:main
from
ozeitis:fix/composer-submission-acceptance
Closed
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
775790a
fix(chat): retain composer drafts until submission is accepted
ozeitis 96d673d
fix(chat-ui): retain history-saved drafts during pending sends
ozeitis 77e8e6f
fix(desktop): settle submitted drafts after composer unmount
ozeitis 7b08860
fix(desktop): avoid restoring an accepted composer draft seed
ozeitis a24899d
fix(desktop): synchronize cleared seeds across mounted composers
ozeitis c942bf9
test(chat-ui): set explicit caret positions for draft history regression
ozeitis 6d1ded0
fix(desktop): share the editor draft receipt with persisted clearing
ozeitis 28bb0dd
fix(desktop): guard pending sends across composer remounts
ozeitis f205231
Preserve composer submission receipts with current pasted context and…
ozeitis dfcffe9
Merge current upstream sign-in and sidebar-group fixes
ozeitis 1dc81aa
Merge reviewed prerequisite fixes for #8400
ozeitis 6b1e4e5
fix(chat): acknowledge child steering without waiting for turn comple…
ozeitis File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔎 Supported by static analysis
Script executed:
rg -n -C4 'ACP_STEERING_METHOD|supportsSteering|negotiatedVersion|acpSteeringResponseSchema|promptRequired' packages/chat-runtime/src/harness/acp/acpAdapter.ts packages/chat-runtime/src/harness/acpRepository: superset-sh/superset
Length of output: 29351
Script executed:
Repository: superset-sh/superset
Length of output: 42091
Script executed:
Repository: superset-sh/superset
Length of output: 42154
Script executed:
Repository: superset-sh/superset
Length of output: 13073
Route v1 focused-subagent steers through
_session/steering.Composernow waits forsubmitMessage, and the focused-subagent callback awaitssteerSubagent.steerSubagentcurrently awaitssession/prompt, which stays pending for the full ACP turn. A Claude v1 steer can therefore be accepted and stream while the Composer remains blocked, preventing another steer.Use
_session/steeringfor negotiated v1 sessions that advertise steering. Return success forinjectedandstartedNewTurn. Fall back tosession/promptforpromptRequired, which preserves idle sends. Keep the existingsession/promptpath for v2 and providers without the steering capability.Suggested fix
run.steers.add(steer); try { + const prompt = await this.toAcpPrompt(content); + if (this.negotiatedVersion < 2 && this.supportsSteering) { + const response = await client.request(ACP_STEERING_METHOD, { + sessionId: subagentSessionId, + prompt, + _meta: { steering: { idleBehavior: "promptRequired" } }, + }); + const outcome = acpSteeringResponseSchema.safeParse(response).data + ?.outcome; + if (outcome === "injected" || outcome === "startedNewTurn") + return true; + if (outcome !== "promptRequired") return false; + } await client.request("session/prompt", { sessionId: subagentSessionId, - prompt: await this.toAcpPrompt(content), + prompt, }); return true;