Skip to content

Add "Don't ask again" to delete session confirmation dialog#322539

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/add-dont-ask-again-confirmation
Draft

Add "Don't ask again" to delete session confirmation dialog#322539
Copilot wants to merge 2 commits into
mainfrom
copilot/add-dont-ask-again-confirmation

Conversation

Copilot AI commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

Description

The confirmation dialog shown when deleting a session ("Are you sure you want to delete this chat session?") had no way to opt out of future prompts. This adds a "Do not ask me again" checkbox, reusing the same pattern already established by the archive-section actions.

  • agentSessionsActions.ts (DeleteAgentSessionAction) — the dialog from the issue. Adds the checkbox; the choice is persisted via the new chat.sessions.confirmDelete profile storage key and skips the dialog on subsequent deletions.
  • sessionsViewActions.ts (DeleteSessionAction) — the Agents window sessions view delete action. Same behavior, backed by the sessions.confirmDelete profile storage key.

Both mirror the existing ConfirmArchiveStorageKey flow: persist only when the user checks the box and confirms, at StorageScope.PROFILE / StorageTarget.USER, reusing the shared doNotAskAgain label.

const skipConfirmation = storageService.getBoolean(ConfirmDeleteStorageKey, StorageScope.PROFILE, false);
if (!skipConfirmation) {
    const confirmed = await dialogService.confirm({
        message: /* ... */,
        detail: localize('deleteSession.detail', "This action cannot be undone."),
        primaryButton: localize('deleteSession.delete', "Delete"),
        checkbox: { label: localize('doNotAskAgain', "Do not ask me again") }
    });
    if (!confirmed.confirmed) {
        return;
    }
    if (confirmed.checkboxChecked) {
        storageService.store(ConfirmDeleteStorageKey, true, StorageScope.PROFILE, StorageTarget.USER);
    }
}

Note: the "move to trash / restore" enhancement mentioned in the issue is out of scope here.

Copilot AI requested review from Copilot and removed request for Copilot June 23, 2026 13:33
Co-authored-by: dbaeumer <1931590+dbaeumer@users.noreply.github.com>
Copilot AI requested review from Copilot and removed request for Copilot June 23, 2026 13:39
Copilot AI changed the title [WIP] Add 'Don't ask again' option to delete session confirmation dialog Add "Don't ask again" to delete session confirmation dialog Jun 23, 2026
Copilot AI requested a review from dbaeumer June 23, 2026 13:40
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.

2 participants