refactor: update chat session item handling to use new request structure#300605
Merged
TylerLeonhardt merged 1 commit intomainfrom Mar 11, 2026
Merged
refactor: update chat session item handling to use new request structure#300605TylerLeonhardt merged 1 commit intomainfrom
TylerLeonhardt merged 1 commit intomainfrom
Conversation
minimizes the API for the newChatSessionItemHandler to only receive the prompt & command.
Contributor
There was a problem hiding this comment.
Pull request overview
Refactors the “new chat session item” flow so the session-item controller handler only receives the minimal initial request data (prompt + optional command), instead of the full request structure.
Changes:
- Narrow proposed API
ChatSessionItemControllerNewItemHandlerContext.requestto{ prompt, command? }. - Introduce
IChatNewSessionRequestand plumb it through workbench chat session services + IPC ($newChatSessionItem). - Update call sites/tests to use the new request shape.
Reviewed changes
Copilot reviewed 7 out of 8 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| src/vscode-dts/vscode.proposed.chatSessionsProvider.d.ts | Updates proposed API handler context to accept only prompt/command. |
| src/vs/workbench/contrib/chat/common/chatSessionsService.ts | Adds IChatNewSessionRequest and updates service/controller method signatures. |
| src/vs/workbench/contrib/chat/browser/chatSessions/chatSessions.contribution.ts | Updates ChatSessionsService implementation to accept IChatNewSessionRequest. |
| src/vs/workbench/contrib/chat/test/common/mockChatSessionsService.ts | Adjusts mock service signature to match new request type. |
| src/vs/workbench/api/common/extHostChatSessions.ts | Updates ext host handler invocation to pass prompt/command only. |
| src/vs/workbench/api/common/extHost.protocol.ts | Updates IPC shape for $newChatSessionItem to use the new request type. |
| src/vs/workbench/api/browser/mainThreadChatSessions.ts | Updates main thread controller method signature to accept the new request type. |
| src/vs/workbench/api/browser/mainThreadChatAgents2.ts | Updates call site to construct { prompt, command? } from the agent request. |
You can also share your feedback on Copilot code review. Take the survey.
joshspicer
approved these changes
Mar 11, 2026
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.
minimizes the API for the newChatSessionItemHandler to only receive the prompt & command.