From 5c2c735b17f6c50b3cf6c501c399addf5af72ad7 Mon Sep 17 00:00:00 2001 From: Daniel Imms <2193314+Tyriar@users.noreply.github.com> Date: Tue, 21 Oct 2025 06:34:13 -0700 Subject: [PATCH] Be more explicit about windows powershell in tool desc Part of #262386 --- .../chatAgentTools/browser/tools/runInTerminalTool.ts | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts b/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts index 94cdc2fa128..72861ea8830 100644 --- a/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts +++ b/src/vs/workbench/contrib/terminalContrib/chatAgentTools/browser/tools/runInTerminalTool.ts @@ -51,12 +51,13 @@ import { IPollingResult, OutputMonitorState } from './monitoring/types.js'; // #region Tool data function createPowerShellModelDescription(shell: string): string { + const isWinPwsh = isWindowsPowerShell(shell); return [ - 'This tool allows you to execute PowerShell commands in a persistent terminal session, preserving environment variables, working directory, and other context across multiple commands.', + `This tool allows you to execute ${isWinPwsh ? 'Windows PowerShell 5.1' : 'PowerShell'} commands in a persistent terminal session, preserving environment variables, working directory, and other context across multiple commands.`, '', 'Command Execution:', '- Does NOT support multi-line commands', - `- ${isWindowsPowerShell(shell) + `- ${isWinPwsh ? 'Use semicolons ; to chain commands on one line, NEVER use && even when asked explicitly' : 'Use && to chain simple commands on one line'}`, '- Prefer pipelines | for object-based data flow',