1111
switch (request.kind) {
1112
case 'shell': {
1114
>
// confirmation dialog shows the simplified command.
1115
>
const shellParams: Record<string, unknown> | undefined = fullCommandText ? { command: fullCommandText } : undefined;
1116
>
stripRedundantCdPrefix(CopilotToolName.Bash, shellParams, workingDirectory);
1117
>
const cleanedCommand = typeof shellParams?.command === 'string' ? shellParams.command : fullCommandText;
1118
>
return {
1119
>
confirmationTitle: shellConfirmationTitle,
1120
>
invocationMessage: intention ?? getInvocationMessage(CopilotToolName.Bash, getToolDisplayName(CopilotToolName.Bash), cleanedCommand ? { command: cleanedCommand } : undefined),
1121
>
toolInput: cleanedCommand,
1122
>
permissionKind: 'shell',
1123
>
permissionPath: path,
1124
>
};
1125
>
}
1126
case 'custom-tool': {
1127
// Custom tool overrides (e.g. our shell tool). Extract the actual