Skip to content

Commit a668494

Browse files
committed
Move terminal auto approve to chat.tools, add deprecation messages
Fixes microsoft#258095
1 parent f5db653 commit a668494

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,13 @@ import { localize } from '../../../../../nls.js';
99
import { ConfigurationScope, type IConfigurationPropertySchema } from '../../../../../platform/configuration/common/configurationRegistry.js';
1010

1111
export const enum TerminalChatAgentToolsSettingId {
12-
AutoApprove = 'chat.agent.terminal.autoApprove',
12+
AutoApprove = 'chat.tools.terminal.autoApprove',
13+
14+
DeprecatedAutoApprove1 = 'chat.agent.terminal.allowList',
15+
DeprecatedAutoApprove2 = 'chat.agent.terminal.denyList',
16+
DeprecatedAutoApprove3 = 'github.copilot.chat.agent.terminal.allowList',
17+
DeprecatedAutoApprove4 = 'github.copilot.chat.agent.terminal.denyList',
18+
DeprecatedAutoApprove5 = 'chat.agent.terminal.autoApprove',
1319
}
1420

1521
export interface ITerminalChatAgentToolsConfiguration {
@@ -96,3 +102,16 @@ export const terminalChatAgentToolsConfiguration: IStringDictionary<IConfigurati
96102
},
97103
}
98104
};
105+
106+
for (const id of [
107+
TerminalChatAgentToolsSettingId.DeprecatedAutoApprove1,
108+
TerminalChatAgentToolsSettingId.DeprecatedAutoApprove2,
109+
TerminalChatAgentToolsSettingId.DeprecatedAutoApprove3,
110+
TerminalChatAgentToolsSettingId.DeprecatedAutoApprove4,
111+
TerminalChatAgentToolsSettingId.DeprecatedAutoApprove5,
112+
]) {
113+
terminalChatAgentToolsConfiguration[id] = {
114+
deprecated: true,
115+
markdownDeprecationMessage: localize('autoApprove.deprecated', 'Use {0} instead', `\`#${TerminalChatAgentToolsSettingId.AutoApprove}#\``)
116+
};
117+
}

0 commit comments

Comments
 (0)