795
}
796
797
>
function createZshModelDescription(isSandboxEnabled: boolean, networkDomains?: ITerminalSandboxResolvedNetworkDomains): string {
copilotShellTools.ts
798
>
return [
799
>
'This tool allows you to execute shell commands in a persistent zsh terminal session, preserving environment variables, working directory, and other context across multiple commands.',
800
>
createGenericDescription('bash', isSandboxEnabled, networkDomains),
801
>
'- Use type to check command type (builtin, function, alias)',
802
>
'- Use jobs, fg, bg for job control',
803
>
'- Use [[ ]] for conditional tests instead of [ ]',
804
>
'- Prefer $() over backticks for command substitution',
805
>
'- Take advantage of zsh globbing features (**, extended globs). Note: unmatched globs fail by default (zsh: no matches found) - use a glob qualifier like *(N) or quote the glob if it should be literal',
806
>
'',
807
>
'zsh pitfalls - these WILL cause errors or hangs:',
808
>
'- NEVER use bare == or === as separators (e.g. echo === triggers zsh equals expansion). Quote them: echo \'===\'',
809
>
'- NEVER use status as a variable name (it is read-only in zsh). Use exit_code or ret instead',
810
>
].join('\n');
811
>
}