1
>
/*---------------------------------------------------------------------------------------------
settings.ts
2
>
* Copyright (c) Microsoft Corporation. All rights reserved.
3
>
* Licensed under the MIT License. See License.txt in the project root for license information.
4
>
*--------------------------------------------------------------------------------------------*/
5
>
6
>
/**
7
>
* Setting IDs for agent sandboxing.
8
>
*/
9
>
export const enum AgentSandboxSettingId {
10
>
AgentSandboxEnabled = 'chat.agent.sandbox.enabled',
11
>
AgentSandboxWindowsEnabled = 'chat.agent.sandbox.enabledWindows',
12
>
AgentSandboxAllowNetwork = 'chat.agent.sandbox.allowNetwork',
13
>
AgentSandboxAllowUnsandboxedCommands = 'chat.agent.sandbox.allowUnsandboxedCommands',
14
>
AgentSandboxRetryWithAllowNetworkRequests = 'chat.agent.sandbox.retryWithAllowNetworkRequests',
15
>
AgentSandboxAllowAutoApprove = 'chat.agent.sandbox.allowAutoApprove',
16
>
AgentSandboxLinuxFileSystem = 'chat.agent.sandbox.fileSystem.linux',
17
>
AgentSandboxMacFileSystem = 'chat.agent.sandbox.fileSystem.mac',
18
>
AgentSandboxWindowsFileSystem = 'chat.agent.sandbox.fileSystem.windows',
19
>
AgentSandboxWindowsSchemaVersion = 'chat.agent.sandbox.advanced.windows.schemaVersion',
20
>
AgentSandboxAdvancedRuntime = 'chat.agent.sandbox.advanced.runtime',
21
>
DeprecatedAgentSandboxEnabled = 'chat.agent.sandbox',
22
>
DeprecatedAgentSandboxLinuxFileSystem = 'chat.agent.sandboxFileSystem.linux',
23
>
DeprecatedAgentSandboxMacFileSystem = 'chat.agent.sandboxFileSystem.mac',
24
>
}
25
>
26
>
export const enum AgentSandboxEnabledValue {
27
>
Off = 'off',
28
>
On = 'on',
29
>
AllowNetwork = 'allowNetwork',
30
>
}
31
>
32
>
export type AgentSandboxEnabledSettingValue = AgentSandboxEnabledValue | boolean;
33
>
34
>
export function normalizeAgentSandboxEnabledValue(value: AgentSandboxEnabledSettingValue): AgentSandboxEnabledValue {
35
if (value === true) {
36
return AgentSandboxEnabledValue.On;