Conversation
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
justschen
left a comment
There was a problem hiding this comment.
Oh this is big and very much helpful - thanks for giving this a look!
There was a problem hiding this comment.
Pull request overview
Adds persistence-backed “Don’t show again” support to the elevated-permissions warning dialogs in the chat permission picker, plus a developer command to reset the suppressed-warning state.
Changes:
- Persist “Don’t show again” choices for Autopilot and Bypass Approvals warnings in PROFILE storage and honor them when deciding to show dialogs.
- Add a Developer command to reset the persisted suppression for both warnings.
- Remove the previous cross-level implication so Autopilot and Bypass Approvals warnings are tracked independently.
Show a summary per file
| File | Description |
|---|---|
| src/vs/workbench/contrib/chat/browser/widget/input/permissionPickerActionItem.ts | Adds checkbox UI + persisted storage keys/logic to suppress warnings across sessions. |
| src/vs/workbench/contrib/chat/browser/actions/chatDeveloperActions.ts | Adds a developer action to clear the stored “don’t show again” flags. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 2
| import { AUTOPILOT_DONT_SHOW_AGAIN_KEY, AUTO_APPROVE_DONT_SHOW_AGAIN_KEY } from '../widget/input/permissionPickerActionItem.js'; | ||
|
|
There was a problem hiding this comment.
chatDeveloperActions.ts imports permissionPickerActionItem just to reuse the two storage-key constants. That module pulls in a lot of widget/UI dependencies, so this makes the developer actions bundle load more code at startup (since registerChatDeveloperActions() is called from chat.contribution.ts). Suggestion: move these storage keys into a small shared constants module (e.g. under .../chat/common/), and have both the widget and the developer reset action import from there (or duplicate the string literals locally to avoid a heavy dependency).
| import { AUTOPILOT_DONT_SHOW_AGAIN_KEY, AUTO_APPROVE_DONT_SHOW_AGAIN_KEY } from '../widget/input/permissionPickerActionItem.js'; | |
| const AUTOPILOT_DONT_SHOW_AGAIN_KEY = 'chat.autopilot.permissionPicker.dontShowAgain'; | |
| const AUTO_APPROVE_DONT_SHOW_AGAIN_KEY = 'chat.autoApprove.permissionPicker.dontShowAgain'; |
There was a problem hiding this comment.
Implemented in e1b752c. I moved the warning-storage keys into a lightweight shared module at src/vs/workbench/contrib/chat/common/chatPermissionStorageKeys.ts and updated both chatDeveloperActions.ts and permissionPickerActionItem.ts to import from it, removing the heavy widget dependency from developer actions. UI is unchanged by this refactor, so there is no new UI screenshot to share.
Move AUTOPILOT_DONT_SHOW_AGAIN_KEY and AUTO_APPROVE_DONT_SHOW_AGAIN_KEY to chat/common/chatPermissionStorageKeys.ts so both chatDeveloperActions and permissionPickerActionItem import from a lightweight shared module. This avoids chatDeveloperActions pulling in heavy widget/UI dependencies at startup via the permissionPickerActionItem import. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Summary
Adds a "Don't show again" checkbox to the confirmation dialogs shown when the user enables Autopilot or Bypass Approvals in the chat permissions picker.
When the checkbox is checked and the user clicks Enable, the choice is persisted to profile storage (
StorageScope.PROFILE) so the warning is not shown again across sessions. Each permission level (Autopilot and Bypass Approvals) is tracked independently — suppressing one does not suppress the other.Changes
permissionPickerActionItem.tsIStorageServiceinjection toPermissionPickerActionItem.AUTOPILOT_DONT_SHOW_AGAIN_KEY,AUTO_APPROVE_DONT_SHOW_AGAIN_KEY) for use by the reset command.hasShownElevatedWarning()to check persisted storage in addition to the existing in-sessionshownWarningsSet.checkbox: { label: "Don't show again", checked: false }to both dialogprompt()calls.trueviastorageService.store(..., StorageScope.PROFILE, StorageTarget.USER).chatDeveloperActions.tsResetChatPermissionWarningDialogsAction(Developer category, commandworkbench.action.chat.resetPermissionWarningDialogs, title "Reset Permission Warning Dialogs (Autopilot, Bypass Approvals)").