Align async terminal notification messaging with runtime gating for subagent invocations#308857
Align async terminal notification messaging with runtime gating for subagent invocations#308857
Conversation
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/12b1d655-32d6-41ac-a3c8-429db819f310 Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/12b1d655-32d6-41ac-a3c8-429db819f310 Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
|
@copilot instead of this conditional language, shouldn't we just check shouldSendBackgroundNotifications to determine whether to include that or not |
Agent-Logs-Url: https://github.com/microsoft/vscode/sessions/d6eca4d7-7628-48cc-952a-162419f60927 Co-authored-by: meganrogge <29464607+meganrogge@users.noreply.github.com>
Updated in 7fb6dab: I removed the conditional caveat wording from the static model-description text and kept runtime inclusion of the completion hint gated by Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
There was a problem hiding this comment.
Pull request overview
Aligns run_in_terminal’s runtime background-notification behavior with the messaging shown to the model/agent, especially for subagent tool invocations where background notifications can’t be delivered.
Changes:
- Introduces a shared
shouldSendBackgroundNotificationsgate inRunInTerminalTool.invoketo control both completion-notification registration and the timeout “you will be notified” hint. - Adds a unit test intended to ensure subagent invocations do not receive background-notification messaging or registration.
Show a summary per file
| File | Description |
|---|---|
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts |
Centralizes the background-notifications gate and reuses it for both registration and timeout hint text. |
src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts |
Adds regression coverage for subagent invocation behavior around background-notification messaging/registration. |
Copilot's findings
- Files reviewed: 2/2 changed files
- Comments generated: 2
src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts
Outdated
Show resolved
Hide resolved
...bench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts
Show resolved
Hide resolved
…r/tools/runInTerminalTool.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
|
@copilot fix this error Error: [core-ci ] src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts(921,9): error TS2451: Cannot redeclare block-scoped variable 'shouldSendBackgroundNotifications'. |
Checked and validated on current head Warning Firewall rules blocked me from connecting to one or more addresses (expand for details)I tried to connect to the following addresses, but was blocked by firewall rules:
If you need me to access, download, or install something from one of these locations, you can either:
|
|
@copilot delete the test changes and add instruction when a subagent is used to use high timeout value since there will be no background notification to indicate completion |
Pull request was closed
Description
This addresses review feedback on PR #308840 around
run_in_terminalnotification semantics.Static model description wording
chat.tools.terminal.backgroundNotificationsis enabled.Runtime behavior remains the source of truth
RunInTerminalTool.invokecontinues to use:chat.tools.terminal.backgroundNotifications!invocation.subAgentInvocationIdshouldSendBackgroundNotificationsto control both:=== true) for consistency with model-description gating and to avoid truthy non-boolean config values enabling notifications.Regression coverage
Testing
npm run compile-check-ts-nativenpm run gulp compileELECTRON_DISABLE_SANDBOX=1 DISPLAY=:99 xvfb-run ./scripts/test.sh --run src/vs/workbench/contrib/terminalContrib/chatAgentTools/test/electron-browser/runInTerminalTool.test.ts