Skip to content

Commit 7ef1f6a

Browse files
committed
Remove user shell prompt
This is no longer needed since the shell is described correctly in the run_in_terminal tool now Fixes microsoft/vscode#275638
1 parent 1dd7355 commit 7ef1f6a

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/extension/prompts/node/agent/agentPrompt.tsx

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ import { ITabsAndEditorsService } from '../../../../platform/tabs/common/tabsAnd
1919
import { ITasksService } from '../../../../platform/tasks/common/tasksService';
2020
import { IExperimentationService } from '../../../../platform/telemetry/common/nullExperimentationService';
2121
import { IWorkspaceService } from '../../../../platform/workspace/common/workspaceService';
22-
import { basename } from '../../../../util/vs/base/common/path';
2322
import { isDefined } from '../../../../util/vs/base/common/types';
2423
import { IInstantiationService } from '../../../../util/vs/platform/instantiation/common/instantiation';
2524
import { ChatRequestEditedFileEventKind, Position, Range } from '../../../../vscodeTypes';
@@ -243,7 +242,6 @@ class GlobalAgentContext extends PromptElement<GlobalAgentContextProps> {
243242
return <UserMessage>
244243
<Tag name='environment_info'>
245244
<UserOSPrompt />
246-
<UserShellPrompt />
247245
</Tag>
248246
<Tag name='workspace_info'>
249247
<AgentTasksInstructions availableTools={this.props.availableTools} />
@@ -447,29 +445,6 @@ class UserOSPrompt extends PromptElement<BasePromptElementProps> {
447445
}
448446
}
449447

450-
class UserShellPrompt extends PromptElement<BasePromptElementProps> {
451-
constructor(props: BasePromptElementProps, @IEnvService private readonly envService: IEnvService) {
452-
super(props);
453-
}
454-
455-
async render(state: void, sizing: PromptSizing) {
456-
const shellName: string = basename(this.envService.shell);
457-
const shellNameHint = shellName === 'powershell.exe' ? ' (Windows PowerShell v5.1)' : '';
458-
let additionalHint = '';
459-
switch (shellName) {
460-
case 'powershell.exe': {
461-
additionalHint = ' Use the `;` character if joining commands on a single line is needed.';
462-
break;
463-
}
464-
case 'fish': {
465-
additionalHint = ' Note that fish shell does not support heredocs - prefer printf or echo instead.';
466-
break;
467-
}
468-
}
469-
return <>The user's default shell is: "{shellName}"{shellNameHint}. When you generate terminal commands, please generate them correctly for this shell.{additionalHint}</>;
470-
}
471-
}
472-
473448
class CurrentDatePrompt extends PromptElement<BasePromptElementProps> {
474449
constructor(
475450
props: BasePromptElementProps,

0 commit comments

Comments
 (0)