78
}
79
80
>
function setBypassDetail(): string { return localize('copilotConfigSlash.yolo', "Set permissions to bypass approvals"); }
copilotConfigSlashCommands.ts
81
>
function setDefaultDetail(): string { return localize('copilotConfigSlash.default', "Set permissions back to default"); }
82
>
function autopilotOnDetail(): string { return localize('copilotConfigSlash.autopilot.on', "Switch to autopilot mode"); }
83
>
function exitAutopilotDetail(): string { return localize('copilotConfigSlash.exitAutopilot', "Switch to interactive mode"); }
84
>
function autopilotPromptDetail(): string { return localize('copilotConfigSlash.autopilot.prompt', "Switch to autopilot mode with an objective"); }
85
>
function planPromptDetail(): string { return localize('copilotConfigSlash.plan.prompt', "Create an implementation plan before coding"); }
86
>
function autopilotArgumentHint(): string { return localize('copilotConfigSlash.autopilotHint', "objective"); }
87
>
function promptArgumentHint(): string { return localize('copilotConfigSlash.promptHint', "Describe what you want to plan or research"); }
88
90
>
return [
91
>
{
92
>
command: 'yolo', sortText: 'z1_yolo',
93
>
options: [
94
>
{ arg: 'on', detail: setBypassDetail(), config: { [SessionConfigKey.AutoApprove]: AUTO_APPROVE_BYPASS } },
95
>
{ arg: 'off', detail: setDefaultDetail(), config: { [SessionConfigKey.AutoApprove]: AUTO_APPROVE_DEFAULT } }
96
>
],
97
>
},
98
>
{
99
>
command: 'allow-all', sortText: 'z1_allow-all',
100
>
options: [
101
>
{ arg: 'on', detail: setBypassDetail(), config: { [SessionConfigKey.AutoApprove]: AUTO_APPROVE_BYPASS } },
102
>
{ arg: 'off', detail: setDefaultDetail(), config: { [SessionConfigKey.AutoApprove]: AUTO_APPROVE_DEFAULT } }
103
>
],
104
>
},
105
>
{
106
>
command: 'autopilot', sortText: 'z1_autopilot',
107
>
options: [
108
>
{ arg: 'on', detail: autopilotOnDetail(), config: { [SessionConfigKey.Mode]: MODE_AUTOPILOT } },
109
>
{ arg: 'off', detail: exitAutopilotDetail(), config: { [SessionConfigKey.Mode]: MODE_INTERACTIVE } },
110
>
{ detail: autopilotPromptDetail(), config: { [SessionConfigKey.Mode]: MODE_AUTOPILOT }, argumentHint: autopilotArgumentHint() },
111
>
],
112
>
},
113
>
{
114
>
command: 'plan', sortText: 'z1_plan',
115
>
options: [
116
>
{ detail: planPromptDetail(), config: { [SessionConfigKey.Mode]: MODE_PLAN }, argumentHint: promptArgumentHint() },
117
>
],
118
>
},
119
>
{
120
>
command: 'goal', sortText: 'z1_goal',
121
>
options: [
122
>
{ detail: planPromptDetail(), config: { [SessionConfigKey.Mode]: MODE_PLAN }, argumentHint: promptArgumentHint() },
123
>
],
124
>
},
125
>
];
126
>
}
127
128
/**