mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-02 00:09:30 +01:00
* Rename agent sandbox settings * refactoring for review comments * Update src/vs/workbench/contrib/terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.ts Update for deprecation Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
94 lines
6.8 KiB
TypeScript
94 lines
6.8 KiB
TypeScript
/*---------------------------------------------------------------------------------------------
|
|
* Copyright (c) Microsoft Corporation. All rights reserved.
|
|
* Licensed under the MIT License. See License.txt in the project root for license information.
|
|
*--------------------------------------------------------------------------------------------*/
|
|
|
|
import type { IConfigurationNode } from '../../../platform/configuration/common/configurationRegistry.js';
|
|
import { TerminalAccessibilityCommandId, defaultTerminalAccessibilityCommandsToSkipShell } from '../terminalContrib/accessibility/common/terminal.accessibility.js';
|
|
import { terminalAccessibilityConfiguration } from '../terminalContrib/accessibility/common/terminalAccessibilityConfiguration.js';
|
|
import { terminalAutoRepliesConfiguration } from '../terminalContrib/autoReplies/common/terminalAutoRepliesConfiguration.js';
|
|
import { TerminalChatCommandId, TerminalChatContextKeyStrings } from '../terminalContrib/chat/browser/terminalChat.js';
|
|
import { terminalInitialHintConfiguration } from '../terminalContrib/inlineHint/common/terminalInitialHintConfiguration.js';
|
|
import { terminalChatAgentToolsConfiguration, TerminalChatAgentToolsSettingId } from '../terminalContrib/chatAgentTools/common/terminalChatAgentToolsConfiguration.js';
|
|
import { terminalCommandGuideConfiguration } from '../terminalContrib/commandGuide/common/terminalCommandGuideConfiguration.js';
|
|
import { TerminalDeveloperCommandId } from '../terminalContrib/developer/common/terminal.developer.js';
|
|
import { defaultTerminalFindCommandToSkipShell } from '../terminalContrib/find/common/terminal.find.js';
|
|
import { defaultTerminalHistoryCommandsToSkipShell, terminalHistoryConfiguration } from '../terminalContrib/history/common/terminal.history.js';
|
|
import { terminalOscNotificationsConfiguration } from '../terminalContrib/notification/common/terminalNotificationConfiguration.js';
|
|
import { TerminalStickyScrollSettingId, terminalStickyScrollConfiguration } from '../terminalContrib/stickyScroll/common/terminalStickyScrollConfiguration.js';
|
|
import { defaultTerminalSuggestCommandsToSkipShell } from '../terminalContrib/suggest/common/terminal.suggest.js';
|
|
import { TerminalSuggestSettingId, terminalSuggestConfiguration } from '../terminalContrib/suggest/common/terminalSuggestConfiguration.js';
|
|
import { terminalTypeAheadConfiguration } from '../terminalContrib/typeAhead/common/terminalTypeAheadConfiguration.js';
|
|
import { terminalZoomConfiguration } from '../terminalContrib/zoom/common/terminal.zoom.js';
|
|
|
|
// HACK: Export some commands from `terminalContrib/` that are depended upon elsewhere. These are
|
|
// soft layer breakers between `terminal/` and `terminalContrib/` but there are difficulties in
|
|
// removing the dependency. These are explicitly defined here to avoid an eslint line override.
|
|
export const enum TerminalContribCommandId {
|
|
A11yFocusAccessibleBuffer = TerminalAccessibilityCommandId.FocusAccessibleBuffer,
|
|
DeveloperRestartPtyHost = TerminalDeveloperCommandId.RestartPtyHost,
|
|
OpenTerminalSettingsLink = TerminalChatCommandId.OpenTerminalSettingsLink,
|
|
DisableSessionAutoApproval = TerminalChatCommandId.DisableSessionAutoApproval,
|
|
FocusMostRecentChatTerminalOutput = TerminalChatCommandId.FocusMostRecentChatTerminalOutput,
|
|
FocusMostRecentChatTerminal = TerminalChatCommandId.FocusMostRecentChatTerminal,
|
|
ToggleChatTerminalOutput = TerminalChatCommandId.ToggleChatTerminalOutput,
|
|
FocusChatInstanceAction = TerminalChatCommandId.FocusChatInstanceAction,
|
|
ContinueInBackground = TerminalChatCommandId.ContinueInBackground,
|
|
}
|
|
|
|
// HACK: Export some settings from `terminalContrib/` that are depended upon elsewhere. These are
|
|
// soft layer breakers between `terminal/` and `terminalContrib/` but there are difficulties in
|
|
// removing the dependency. These are explicitly defined here to avoid an eslint line override.
|
|
export const enum TerminalContribSettingId {
|
|
StickyScrollEnabled = TerminalStickyScrollSettingId.Enabled,
|
|
SuggestEnabled = TerminalSuggestSettingId.Enabled,
|
|
AutoApprove = TerminalChatAgentToolsSettingId.AutoApprove,
|
|
EnableAutoApprove = TerminalChatAgentToolsSettingId.EnableAutoApprove,
|
|
ShellIntegrationTimeout = TerminalChatAgentToolsSettingId.ShellIntegrationTimeout,
|
|
OutputLocation = TerminalChatAgentToolsSettingId.OutputLocation,
|
|
AgentSandboxEnabled = TerminalChatAgentToolsSettingId.AgentSandboxEnabled,
|
|
DeprecatedAgentSandboxEnabled = TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxEnabled,
|
|
DeprecatedAgentSandboxNetworkAllowedDomains = TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxNetworkAllowedDomains,
|
|
DeprecatedAgentSandboxNetworkDeniedDomains = TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxNetworkDeniedDomains,
|
|
DeprecatedAgentSandboxLinuxFileSystem = TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxLinuxFileSystem,
|
|
DeprecatedAgentSandboxMacFileSystem = TerminalChatAgentToolsSettingId.DeprecatedAgentSandboxMacFileSystem,
|
|
AgentSandboxNetworkAllowedDomains = TerminalChatAgentToolsSettingId.AgentSandboxNetworkAllowedDomains,
|
|
AgentSandboxNetworkDeniedDomains = TerminalChatAgentToolsSettingId.AgentSandboxNetworkDeniedDomains,
|
|
AgentSandboxLinuxFileSystem = TerminalChatAgentToolsSettingId.AgentSandboxLinuxFileSystem,
|
|
AgentSandboxMacFileSystem = TerminalChatAgentToolsSettingId.AgentSandboxMacFileSystem,
|
|
}
|
|
|
|
// HACK: Export some context key strings from `terminalContrib/` that are depended upon elsewhere.
|
|
// These are soft layer breakers between `terminal/` and `terminalContrib/` but there are
|
|
// difficulties in removing the dependency. These are explicitly defined here to avoid an eslint
|
|
// line override.
|
|
export const enum TerminalContribContextKeyStrings {
|
|
ChatHasTerminals = TerminalChatContextKeyStrings.ChatHasTerminals,
|
|
ChatHasHiddenTerminals = TerminalChatContextKeyStrings.ChatHasHiddenTerminals,
|
|
}
|
|
|
|
// Export configuration schemes from terminalContrib - this is an exception to the eslint rule since
|
|
// they need to be declared at part of the rest of the terminal configuration
|
|
export const terminalContribConfiguration: IConfigurationNode['properties'] = {
|
|
...terminalAccessibilityConfiguration,
|
|
...terminalAutoRepliesConfiguration,
|
|
...terminalChatAgentToolsConfiguration,
|
|
...terminalInitialHintConfiguration,
|
|
...terminalCommandGuideConfiguration,
|
|
...terminalHistoryConfiguration,
|
|
...terminalOscNotificationsConfiguration,
|
|
...terminalStickyScrollConfiguration,
|
|
...terminalSuggestConfiguration,
|
|
...terminalTypeAheadConfiguration,
|
|
...terminalZoomConfiguration,
|
|
};
|
|
|
|
// Export commands to skip shell from terminalContrib - this is an exception to the eslint rule
|
|
// since they need to be included in the terminal module
|
|
export const defaultTerminalContribCommandsToSkipShell = [
|
|
...defaultTerminalAccessibilityCommandsToSkipShell,
|
|
...defaultTerminalFindCommandToSkipShell,
|
|
...defaultTerminalHistoryCommandsToSkipShell,
|
|
...defaultTerminalSuggestCommandsToSkipShell,
|
|
];
|