Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 4, 2025

Extension unconditionally called createChatParticipant for claude-code session type, but package.json has a when clause that conditionally registers it. When the config is disabled, VS Code throws "chatParticipant must be declared in package.json".

Changes

  • chatSessions.ts: Guard claude-code participant registration with config check

    const claudeCodeEnabled = vscode.workspace.getConfiguration('github.copilot.chat.claudeCode').get<boolean>('enabled', false);
    if (claudeCodeEnabled) {
        // register claude-code participant...
    }
  • package.json: Fix when clause to use correct setting path

    • Was: config.github.copilot.chat.advanced.claudeCode.enabled (doesn't exist)
    • Now: config.github.copilot.chat.claudeCode.enabled (matches actual setting)
Original prompt

Fix microsoft/vscode#273855 from this extension's side (specifically claude). I suspect it's due to the fact that we call the createChatParticipant even though the when clause means that we don't active it on the vscode side? Not sure - figure it out please

The user has attached the following file paths as relevant context:

  • .github/copilot-instructions.md

Created from VS Code.


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

…fig check

- Add configuration check before registering claude-code chat participant
- Fix when clause in package.json to use the correct setting path
  (github.copilot.chat.claudeCode.enabled instead of
  github.copilot.chat.advanced.claudeCode.enabled)

Co-authored-by: joshspicer <[email protected]>
Copilot AI changed the title [WIP] Fix issue 273855 with createChatParticipant call Fix claude-code chat participant registration error Dec 4, 2025
Copilot AI requested a review from joshspicer December 4, 2025 02:43
Copilot finished work on behalf of joshspicer December 4, 2025 02:43
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.

chatParticipant must be declared in package.json: copilot-swe-agent

2 participants