← Back to Pull requests

Switch the command palette to command-line mode when picked from it #20985

Closed
unknown closed this pull request without merging on Dec 01, 2026 17:07 UTC
View on GitHub
unknown unknown commented on Nov 27, 2026 09:47 UTC
Author

Summary of the Pull Request

Picking the command-line mode variant of the Toggle Command Palette action from inside the command palette previously closed the palette. It now switches the palette to command-line mode, whilst preserving the existing behaviour of the standard toggle.

References and Relevant Issues

Closes #17114

Detailed Description of the Pull Request / Additional comments

CommandPalette::_dispatchCommand closes the palette before dispatching an action and deliberately excludes ToggleCommandPalette from dispatch to prevent the palette from reopening itself. This also prevented the following action from being dispatched:

{ "action": "commandPalette", "launchMode": "commandLine" }

The change updates the existing dispatch condition to allow the command-line variant of ToggleCommandPalette to be dispatched normally.

This allows TerminalPage::_HandleToggleCommandPalette to reopen the palette in command-line mode through the existing action dispatch mechanism, consistent with how the Tab Switcher and Tab Search mode transitions are handled.

The standard Toggle Command Palette action continues to close the palette as before. All other actions continue to be dispatched normally.

Pressing a key bound to the command-line variant whilst the palette is already open remains unchanged and is outside the scope of this PR.

Validation Steps Performed

Built and deployed CascadiaPackage (Debug x64), added the following command to actions in the settings file, and performed manual testing:

{ "command": { "action": "commandPalette", "launchMode": "commandLine" } }

  • Selected the command-line mode toggle from the command palette: the palette reopens in command-line mode.

  • Typed new-tab and pressed Enter: a new tab opened successfully.

  • Selected the standard Toggle Command Palette action: the palette closes as before.

  • Selected a normal action (New tab): the action continues to work as expected.
  • PR Checklist

  • Closes #17114

  • Tests added/passed

  • Documentation updated

  • Schema updated (if necessary)
  • Diff: 269 lines (+201 / -68) across 3 files Reviewer: DHowett Review duration: 6200m
    All Vouch review confidence checks passed
    Residual risk 0.16 = Change Risk (0.39) × (1 − Review Confidence (0.60)). Review depth and reviewer attention state are adequate.
    Model 1 · Change Risk (XGBoost)
    Score: 0.39 · 269 lines diff across 3 files
    0.39
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    Groq Risk Narration
    AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
    Model 1 · Change Risk Attribution
    SHAP Weights
    Diff Size diff_size
    0.335
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #20985"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 39.4% (MEDIUM) · Higher = larger blast radius
    39.4%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.6% · Safe to merge
    15.6%