Skip to content

refactor: update chat session item handling to use new request structure#300605

Merged
TylerLeonhardt merged 1 commit intomainfrom
tyler/confidential-wildfowl
Mar 11, 2026
Merged

refactor: update chat session item handling to use new request structure#300605
TylerLeonhardt merged 1 commit intomainfrom
tyler/confidential-wildfowl

Conversation

@TylerLeonhardt
Copy link
Member

minimizes the API for the newChatSessionItemHandler to only receive the prompt & command.

minimizes the API for the newChatSessionItemHandler to only receive the prompt & command.
Copilot AI review requested due to automatic review settings March 11, 2026 00:42
@TylerLeonhardt TylerLeonhardt enabled auto-merge (squash) March 11, 2026 00:42
@TylerLeonhardt TylerLeonhardt self-assigned this Mar 11, 2026
@vs-code-engineering vs-code-engineering bot added this to the 1.112.0 milestone Mar 11, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.request to { prompt, command? }.
  • Introduce IChatNewSessionRequest and 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.

@TylerLeonhardt TylerLeonhardt merged commit ba3f49a into main Mar 11, 2026
24 checks passed
@TylerLeonhardt TylerLeonhardt deleted the tyler/confidential-wildfowl branch March 11, 2026 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants