chat: the agent's offer to resume a fixed run is answered in the chat - #73
Merged
Merged
Conversation
`resume_failed_run` no longer pops a VS Code notification: the run driver asks through the host's new `confirmInChat`, which puts a card in the chat session the fix was made in, with Resume / Not now buttons. The notification remains the fallback when no chat panel can be reached on the diagram. Platform: `DiagramRunHost.confirmInChat` (profiles with a chat), wired via `setChatConfirmHandler` to `ChatRuntime.confirmInChat`, which posts `chat.confirm` and resolves on the panel's `chat.confirmAnswer` (declined if the runtime is disposed first). The panel shows the card in the session's timeline, switching back to the session if a run agent's view was shown. The fix prompt and the tool's description tell the agent the tool asks in the chat itself, so it does not ask the user a second time. Claude-Session: https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU
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.
Follow-up to #72: the user wanted to resume from the chat itself, not from a notification.
resume_failed_runnow asks through a new platform hook,DiagramRunHost.confirmInChat. It puts a Resume / Not now card into the chat session that made the fix. The VS Code notification is kept only as the fallback when no chat panel is reachable on the diagram.setChatConfirmHandlerconnects the hook toChatRuntime.confirmInChat.chat.confirmand resolves on the panel'schat.confirmAnswer. A pending confirmation is declined if the runtime is disposed.confirmtimeline item, styled like the permission cards. When it arrives, the panel switches back to the session if a run agent's view was showing.Tests:
chat-runtime-confirm.test.ts: post, answer, decline, no panel.chat-panel-confirm.test.ts: the card, switching to the session, answering once.resume-failed-run.test.ts: asked in the chat, declined in the chat, the notification fallback.https://claude.ai/code/session_015VK7fH1c4aKbexnq2QcuKU