Skip to content

Replace AutoFix toggles with an Auto error handling dropdown - #821

Open
Kai Tao (vanzue) wants to merge 4 commits into
mainfrom
dev/vanzue/auto-error-handling-dropdown
Open

Replace AutoFix toggles with an Auto error handling dropdown#821
Kai Tao (vanzue) wants to merge 4 commits into
mainfrom
dev/vanzue/auto-error-handling-dropdown

Conversation

@vanzue

Copy link
Copy Markdown
Contributor

Summary

  • replace the separate automatic error detection and AutoFix toggles with one three-state Auto error handling dropdown
  • use the same dropdown options and wording in Settings and the first-run experience
  • migrate legacy autoErrorDetectionEnabled / autoFixEnabled JSON while preserving their existing WinRT ABI projections
  • keep the existing AutoFix policy behavior by disabling the send-to-agent mode when policy blocks it

Scope

This intentionally keeps the existing WTA/protocol/telemetry terminology and only extracts the user-facing dropdown, required settings model migration, UI wiring, and localized copy from #740.

Related issues

Addresses the Auto error handling layout described in #780 and partially addresses the missing Settings hint text in #789. This also supersedes the older toggle layout discussed in #131; #158 provides the shell-integration wording context.

Validation

  • built TerminalSettingsModel, TerminalSettingsEditor, TerminalApp, and UnitTests_SettingsModel
  • CustomAgentAndPolicyTests: 35 passed

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI lite review requested due to automatic review settings September 3, 2026 04:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

The Settings Editor ComboBox SelectedItem binding is currently broken due to boxing EnumEntry objects instead of returning the actual EnumEntry instances.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Pull request overview

This PR consolidates the legacy Automatic error detection / AutoFix toggles into a single three-state Auto error handling dropdown, while preserving legacy JSON + WinRT ABI compatibility and keeping existing policy behavior (agent-fix mode restricted when policy blocks it).

Changes:

  • Introduces AutoErrorHandling enum + JSON serialization, and migrates legacy autoErrorDetectionEnabled / autoFixEnabled settings to the new canonical key.
  • Updates Settings Editor and first-run experience (FRE) UI wiring to use the unified dropdown and policy-restriction behavior.
  • Refreshes localized UI strings across affected Resources.resw files for the new dropdown labels/options/hints.
File summaries
File Description
src/cascadia/TerminalSettingsModel/TerminalSettingsSerializationHelpers.h Adds JSON enum mappings for AutoErrorHandling.
src/cascadia/TerminalSettingsModel/MTSMSettings.h Removes legacy boolean settings from the macro settings list (now migrated/shimmed).
src/cascadia/TerminalSettingsModel/GlobalAppSettings.idl Adds AutoErrorHandling enum + new properties while retaining legacy ABI properties.
src/cascadia/TerminalSettingsModel/GlobalAppSettings.h Implements canonical AutoErrorHandling storage and legacy ABI shims.
src/cascadia/TerminalSettingsModel/GlobalAppSettings.cpp Implements JSON migration logic and effective/policy-restricted behavior.
src/cascadia/TerminalSettingsEditor/MainPage.cpp Triggers shell integration initialization when Auto error handling is enabled (non-Off).
src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.idl Replaces toggle projections with dropdown projections (CurrentAutoErrorHandling, list, policy flag).
src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.h Adds dropdown list + selected item plumbing and policy restriction exposure.
src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.cpp Builds dropdown entries, maps selection to AutoErrorHandling, removes old toggle logic.
src/cascadia/TerminalSettingsEditor/AIAgents.cpp Updates caption resources to the Auto error handling wording.
src/cascadia/TerminalSettingsEditor/AIAgents.xaml Switches the settings UI from toggles to a ComboBox bound to the new VM properties.
src/cascadia/TerminalApp/FreOverlay.h Replaces legacy toggle handler with dropdown selection-change handler + helper methods.
src/cascadia/TerminalApp/FreOverlay.cpp Populates the FRE dropdown options, applies policy restrictions, and updates accessibility names.
src/cascadia/TerminalSettingsEditor/Resources/en-US/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/de-DE/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/es-ES/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/fr-FR/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/it-IT/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/ja-JP/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/ko-KR/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/pt-BR/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/ru-RU/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/sr-Cyrl-RS/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/uk-UA/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/zh-CN/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/zh-TW/Resources.resw Updates Settings Editor strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/qps-ploc/Resources.resw Updates Settings Editor pseudo-locale strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/qps-ploca/Resources.resw Updates Settings Editor pseudo-locale strings for Auto error handling dropdown + options.
src/cascadia/TerminalSettingsEditor/Resources/qps-plocm/Resources.resw Updates Settings Editor pseudo-locale strings for Auto error handling dropdown + options.
src/cascadia/TerminalApp/Resources/af-ZA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/am-ET/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ar-SA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/as-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/az-Latn-AZ/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/bg-BG/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/bn-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/bs-Latn-BA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ca-ES/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ca-Es-VALENCIA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/cs-CZ/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/cy-GB/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/da-DK/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/de-DE/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/el-GR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/en-GB/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/en-US/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options and related error copy.
src/cascadia/TerminalApp/Resources/es-ES/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/es-MX/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/et-EE/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/eu-ES/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/fa-IR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/fi-FI/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/fil-PH/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/fr-CA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/fr-FR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ga-IE/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/gd-gb/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/gl-ES/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/gu-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/he-IL/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/hi-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/hr-HR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/hu-HU/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/hy-AM/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/id-ID/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/is-IS/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/it-IT/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ja-JP/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/kk-KZ/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/km-KH/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/kn-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ko-KR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/kok-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/lb-LU/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/lo-LA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/lt-LT/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/lv-LV/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/mk-MK/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ml-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/mi-NZ/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/mr-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ms-MY/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/mt-MT/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/nb-NO/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ne-NP/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/nl-NL/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/nn-NO/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/or-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/pa-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/pl-PL/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/pt-BR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/pt-PT/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/qps-ploc/Resources.resw Updates FRE pseudo-locale strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/qps-ploca/Resources.resw Updates FRE pseudo-locale strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/qps-plocm/Resources.resw Updates FRE pseudo-locale strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/quz-PE/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ro-RO/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ru-RU/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sk-SK/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sl-SI/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sq-AL/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sr-Cyrl-BA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sr-Cyrl-RS/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sr-Latn-RS/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/sv-SE/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ta-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/te-IN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/th-TH/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/tr-TR/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/tt-RU/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ug-CN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/uk-UA/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/ur-PK/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/uz-Latn-UZ/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/vi-VN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/zh-CN/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
src/cascadia/TerminalApp/Resources/zh-TW/Resources.resw Updates FRE strings for Auto error handling dropdown + hint/options.
Review details
  • Files reviewed: 120/120 changed files
  • Comments generated: 2
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +1076 to +1082
const auto current = _GlobalSettings.EffectiveAutoErrorHandling();
for (const auto& entry : _autoErrorHandlingList)
{
return;
if (winrt::unbox_value<Model::AutoErrorHandling>(entry.EnumValue()) == current)
{
return winrt::box_value(entry);
}
Comment on lines +270 to +281
for (const auto& [label, value] : handlingOptions)
{
ComboBoxItem item;
item.Content(winrt::box_value(label));
item.Tag(winrt::box_value(value));
if (value == Model::AutoErrorHandling::DetectErrorsAndSendToAgentForFixesAutomatically &&
globals.IsAutoErrorHandlingPolicyRestricted())
{
item.IsEnabled(false);
}
handlingItems.Append(item);
}
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 05:06

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

There are remaining inconsistencies between Settings and FRE option ordering/policy presentation, plus at least one locale string mixes English setting text into localized copy.

Review details

Suppressed comments (3)

Previously missed (2) — in code that hasn't changed since the last review.

src/cascadia/TerminalApp/Resources/zh-CN/Resources.resw:1325

  • This zh-CN error message mixes English setting text (“Auto error handling”) into an otherwise localized sentence, even though this same file localizes the setting label as “自动错误处理”. Using the localized term improves readability and consistency.
    src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.cpp:263
  • The Auto error handling dropdown options are added in an order (Detect, Detect+Send, Off) that doesn’t match the resource ordering (Off first) and is inconsistent with typical three-state controls. Reordering makes the UI more predictable and keeps Settings/FRE option ordering aligned.

src/cascadia/TerminalApp/FreOverlay.cpp:269

  • The FRE Auto error handling ComboBox builds options in a different order than Settings (and places Off last). Also, when policy restricts the send-to-agent mode, FRE keeps that option visible-but-disabled while Settings removes it entirely. This makes the two surfaces inconsistent and can confuse users under policy.
        const std::pair<winrt::hstring, Model::AutoErrorHandling> handlingOptions[] = {
            { RS_(L"FreOverlay_AutoErrorHandling_DetectErrorsAutomatically"), Model::AutoErrorHandling::DetectErrorsAutomatically },
            { RS_(L"FreOverlay_AutoErrorHandling_DetectErrorsAndSendToAgentForFixesAutomatically"), Model::AutoErrorHandling::DetectErrorsAndSendToAgentForFixesAutomatically },
            { RS_(L"FreOverlay_AutoErrorHandling_Off"), Model::AutoErrorHandling::Off },
        };
  • Files reviewed: 120/120 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 05:46

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Several new/updated user-facing strings are misleading or internally inconsistent (notably “agent detects errors” wording and “Auto error handling” vs “Error detection” terminology), which should be corrected before approval.

Once you've addressed the issues Copilot identified, you can request another Copilot review.

Review details

Suppressed comments (1)

src/cascadia/TerminalApp/Resources/en-US/Resources.resw:1264

  • This FRE setup error message refers to “Auto error handling”, but the FRE control label is “Error detection” in en-US. Aligning terminology within the same flow will reduce user confusion.
  <data name="FreOverlay_InstallErrorShellIntegrationExecutionPolicy" xml:space="preserve">
    <value>PowerShell execution policy is blocking scripts. Auto error handling has been turned off.</value>
    <comment>{Locked="PowerShell","Auto error handling"} FRE setup error. PowerShell execution policy blocked scripts, so Auto error handling was turned off.</comment>
  </data>
  • Files reviewed: 120/120 changed files
  • Comments generated: 4
  • Review effort level: Lite

Comment on lines 371 to +373
<data name="FreOverlay_InstallErrorShellIntegrationExecutionPolicy" xml:space="preserve">
<value>PowerShell execution policy is blocking scripts. Error detection turned off.</value>
<comment>{Locked="PowerShell"}</comment>
<value>PowerShell execution policy is blocking scripts. Auto error handling has been turned off.</value>
<comment>{Locked="PowerShell","Auto error handling"} FRE setup error. PowerShell execution policy blocked scripts, so Auto error handling was turned off.</comment>
Comment on lines +1140 to +1142
<data name="FreOverlay_AutoErrorHandlingDescription.Text" xml:space="preserve">
<value>Have your agent detect errors in the shell or send failed commands to your agent automatically, no prompt needed.</value>
<comment>Description for the Error detection dropdown in the first-run wizard. Here "agent" refers to an AI intelligent agent, not a proxy or human agent.</comment>
Comment on lines 1257 to 1260
<data name="FreOverlay_InstallErrorShellIntegration" xml:space="preserve">
<value>Failed to install shell integration. Error detection has been turned off. You can re-enable it and try again, or save to continue without it.</value>
<value>Failed to install shell integration. Auto error handling has been turned off. You can re-enable it and try again, or save to continue without it.</value>
<comment>{Locked="Auto error handling"} FRE setup error. Auto error handling was turned off because shell integration could not be installed.</comment>
</data>
<value>Give Intelligent Terminal permission to access your shell and automatically detect errors. Available in PowerShell, bash, and WSL bash. </value>
<comment>{Locked="PowerShell","bash","WSL bash"} "Intelligent Terminal" is the product name — localize it to this locale's product name (do not keep it in English). Caption under the automatic-error-detection title; the trailing space separates this prefix from the inline "AIAgents_AutoErrorDetectionCaptionLink" hyperlink that follows.</comment>
<data name="AIAgents_AutoErrorHandlingCaptionPrefix" xml:space="preserve">
<value>Have your agent detect errors in the shell or send failed commands to your agent automatically, no prompt needed. Installs shell integration to detect command failures. Available in PowerShell, bash, and WSL bash. </value>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot AI review requested due to automatic review settings September 3, 2026 06:41

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🔵 Needs a closer look

Under AutoFix policy restriction, the Settings UI still offers detect-only mode, but existing runtime gating can suppress OSC 133 forwarding entirely, making the remaining option misleading/non-functional without additional updates.

Review details

Suppressed comments (1)

Previously missed (1) — in code that hasn't changed since the last review.

src/cascadia/TerminalSettingsEditor/AIAgentsViewModel.cpp:270

  • When AutoFix policy is blocked, the UI hides only the send-to-agent option but still offers "Detect errors automatically". However, TerminalApp currently drops OSC 133 sequences whenever GlobalAppSettings::IsAutoFixPolicyLocked() is true (TerminalPage.cpp around the VtSequenceReceived handler), which would prevent error detection from working at all under this same policy state. This makes the remaining dropdown option misleading and likely non-functional under policy.

Consider aligning the policy gating end-to-end: either (a) only gate the agent-fix path on the AutoFix policy (keep OSC133 forwarding for detect-only), or (b) if policy truly disables the whole feature, also remove/disable detect-only here and communicate that in the UI.

  • Files reviewed: 120/120 changed files
  • Comments generated: 0 new
  • Review effort level: Lite

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