Expose active background shells in chat state - #475
Closed
Anthony Kim (anthonykim1) wants to merge 1 commit into
Closed
Anthony Kim (anthonykim1) wants to merge 1 commit into
Anthony Kim (anthonykim1) wants to merge 1 commit into
Conversation
| /** Human-readable description of what the chat is currently doing */ | ||
| activity?: string; | ||
| /** Active background shells, mirrored from {@link ChatState.backgroundShells}. */ | ||
| backgroundShells?: BackgroundShellInfo[]; |
There was a problem hiding this comment.
I wonder if this is the right approach, or if we should have a generic 'things that will wake up this chat' collection, which would include async subagents, possibly MCP tasks, etc. What do you think? cc Sandeep Somavarapu (@sandy081)
Contributor
Author
There was a problem hiding this comment.
Great point,
Are we talking about something like:
export const enum BackgroundWorkKind {
Shell = 'shell',
Subagent = 'subagent',
McpTask = 'mcpTask',
}
Contributor
Author
There was a problem hiding this comment.
PR attempting above approach ---> #482
Would love to get feedback on #482 Connor Peet (@connor4312), roblourens Sandeep Somavarapu (@sandy081)
Contributor
Author
|
Moving to ----> #482 |
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.
BackgroundShellInfofor shell commands that keep running after their tool call returns:id,description,command,status,startedAt, andattachmentMode.BackgroundShellStatus(running/idle) andBackgroundShellAttachmentMode(attached/detached), both@nonexhaustive.ChatState.backgroundShells, mirrored intoChatSummary.backgroundShellsthroughsession/chatUpdated, so session subscribers can see background work without subscribing to every chat.chat/backgroundShellSet(upsert byid) andchat/backgroundShellRemoved(remove byshellId, no-op when absent), introduced in0.9.0.backgroundShellsas presence-sensitive so an empty list is not dropped.Validated with
npm run generateandnpm test(477 tests, 100% reducer coverage).Inspirations from:
Set/Removednaming and reducer behavior follow the keyed-collection convention ingeneral-instructions.instructions.md.ChatWorkingDirectorySet/ChatWorkingDirectoryRemoved.ChatStateintoChatSummaryfollowsworkingDirectoriesinChatStateandChatSummary.AutomationDefinitionPatchhandling ingenerate-go.ts.