Skip to content

round trip permission levels to extension#312479

Merged
justschen merged 3 commits intomainfrom
justin/dedenne
Apr 26, 2026
Merged

round trip permission levels to extension#312479
justschen merged 3 commits intomainfrom
justin/dedenne

Conversation

@justschen
Copy link
Copy Markdown
Collaborator

changing permission levels mid turn should now be honored.

CLI autopilot and claude plan mode maybe need some testing to figure out what the right thing to do

Copilot AI review requested due to automatic review settings April 25, 2026 02:47
Copy link
Copy Markdown
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

This PR ensures that permission/option changes (notably permission levels) made during an active turn are propagated through session options so extensions/providers can honor them immediately.

Changes:

  • Round-trip permissionLevel updates via IChatSessionsService.setSessionOption from the chat input and sessions UI pickers.
  • Teach Copilot CLI sessions to (a) initialize permission level from initial session options and (b) apply live permissionLevel updates to active SDK sessions.
  • Add Claude session provider handling for live permissionMode option updates, with accompanying tests.
Show a summary per file
File Description
src/vs/workbench/contrib/chat/browser/widget/input/chatInputPart.ts Pushes permission level changes into session options for the active chat session.
src/vs/sessions/contrib/copilotChatSessions/browser/permissionPicker.ts Sends permission level selection via session options (for extension/provider visibility).
src/vs/sessions/contrib/copilotChatSessions/browser/claudePermissionModePicker.ts Sends Claude permission mode selection via session options (for extension/provider visibility).
extensions/copilot/src/extension/chatSessions/vscode-node/copilotCLIChatSessionsContribution.ts Plumbs permission level from initial options and applies live option updates to active CLI sessions.
extensions/copilot/src/extension/chatSessions/vscode-node/claudeChatSessionContentProvider.ts Handles live permission mode option changes by updating Claude session state.
extensions/copilot/src/extension/chatSessions/vscode-node/test/*.spec.ts Adds/updates unit tests covering initial and live option propagation behavior.

Copilot's findings

  • Files reviewed: 7/7 changed files
  • Comments generated: 3

Comment thread src/vs/sessions/contrib/copilotChatSessions/browser/permissionPicker.ts Outdated
Comment thread src/vs/sessions/contrib/copilotChatSessions/browser/claudePermissionModePicker.ts Outdated
@justschen justschen marked this pull request as ready for review April 26, 2026 20:34
@justschen justschen enabled auto-merge (squash) April 26, 2026 20:34
@justschen justschen merged commit 1d8e3cb into main Apr 26, 2026
40 of 41 checks passed
@justschen justschen deleted the justin/dedenne branch April 26, 2026 20:36
@vs-code-engineering vs-code-engineering Bot added this to the 1.118.0 milestone Apr 26, 2026
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