Skip to content

Provide UI entry point for adding to the terminal auto-approve allow list #253268

Closed

Description

@Tyriar

Forking off from #252496
Blocked by #252650

We should have a dropdown on the Continue button here:

Image

What this contains needs some thinking.

Some exploration from #252496 (comment)

I'm also thinking how this is similar to workspace trust, where you may want to trust that particular folder, or it's parent:

Image

I wonder if we would help user configure quickly. Say you run npm run build, the "Continue" button dropdown could present options to easily configure it for the future:

  • Auto-approve commands starting with npm
  • Auto-approve commands starting with npm run
  • Auto-approve commands matching npm run build

Maybe that's overkill, we could just show the first and the last one instead.


Similar feature for extension/mcp tools:

Image

const buttons: IChatConfirmationButton[] = [
{
label: continueLabel,
data: ConfirmationOutcome.Allow,
tooltip: continueTooltip,
moreActions: !allowAutoConfirm ? undefined : [
{ label: localize('allowSession', 'Allow in this Session'), data: ConfirmationOutcome.AllowSession, tooltip: localize('allowSesssionTooltip', 'Allow this tool to run in this session without confirmation.') },
{ label: localize('allowWorkspace', 'Allow in this Workspace'), data: ConfirmationOutcome.AllowWorkspace, tooltip: localize('allowWorkspaceTooltip', 'Allow this tool to run in this workspace without confirmation.') },
{ label: localize('allowGlobally', 'Always Allow'), data: ConfirmationOutcome.AllowGlobally, tooltip: localize('allowGloballTooltip', 'Always allow this tool to run without confirmation.') },
],
},
{
label: localize('cancel', "Cancel"),
data: ConfirmationOutcome.Disallow,
isSecondary: true,
tooltip: cancelTooltip
}];

Activity

  1. added this to the July 2025 milestone on Jul 1, 2025
  2. BrechtCorbeel commented on Jul 1, 2025

    @BrechtCorbeel

    Really need this. Is this implemented? Custom CSS and Js loader extension not working for me to do this myself with a script.

  3. Tyriar commented on Jul 1, 2025

    @Tyriar
    ContributorAuthor

    Brecht Corbeel (@BrechtCorbeel) you can check the milestone for when it's planned. You can always just add the allowList setting entry manually in the current pre-release/upcoming release.

  4. BrechtCorbeel commented on Jul 2, 2025

    @BrechtCorbeel

    @BrechtCorbeel you can check the milestone for when it's planned. You can always just add the allowList setting entry manually in the current pre-release/upcoming release.

    I have seen this new feature pass by I think a couple hours after my last comment in a newly opened window but, have not yet found where the allow list is.

    For now, I have made my own auto-continue in the terminal via developer mode.

  5. Tyriar commented on Jul 2, 2025

    @Tyriar
    ContributorAuthor

    Brecht Corbeel (@BrechtCorbeel) it's not release yet. You must use VS Code insiders and the pre-release extension to use it.

  6. Tyriar commented on Jul 31, 2025

    @Tyriar
    ContributorAuthor

    Current thinking for the dropdown for npm run compile:

    • Always allow npm run compile
    • Always allow npm commands

    • Configure auto approve (goes to settings)

    Maybe the second one should say "commands starting with npm" to be more clear?

  7. Tyriar commented on Jul 31, 2025

    @Tyriar
    ContributorAuthor

    This will need an extensible interface that allows passing a list of labels/commands that end up showing in the confirmation drop down here:

    const buttons: IChatConfirmationButton[] = [
    {
    label: continueLabel,
    data: ConfirmationOutcome.Allow,
    tooltip: continueTooltip,
    moreActions: !allowAutoConfirm ? undefined : [
    { label: localize('allowSession', 'Allow in this Session'), data: ConfirmationOutcome.AllowSession, tooltip: localize('allowSesssionTooltip', 'Allow this tool to run in this session without confirmation.') },
    { label: localize('allowWorkspace', 'Allow in this Workspace'), data: ConfirmationOutcome.AllowWorkspace, tooltip: localize('allowWorkspaceTooltip', 'Allow this tool to run in this workspace without confirmation.') },
    { label: localize('allowGlobally', 'Always Allow'), data: ConfirmationOutcome.AllowGlobally, tooltip: localize('allowGloballTooltip', 'Always allow this tool to run without confirmation.') },
    ],
    },
    {
    label: localize('cancel', "Cancel"),
    data: ConfirmationOutcome.Disallow,
    isSecondary: true,
    tooltip: cancelTooltip
    }];

    Should probably live on IPreparedToolInvocation.

  8. added
    unreleasedPatch has not yet been released in VS Code Insiders
    insiders-releasedPatch has been released in VS Code Insiders
    and removed
    unreleasedPatch has not yet been released in VS Code Insiders
    on Aug 7, 2025
  9. locked and limited conversation to collaborators on Sep 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

chat-terminalThe run in terminal tool in chatfeature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insiderson-release-notesIssue/pull request mentioned in release noteson-testplan

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions