注意
此功能目前处于公开预览,可能会发生更改。
使用此参考了解当前支持的密钥 managed-settings.json。
有关部署方法,请参阅 配置企业管理设置。
优先规则
当存在多个设置源时,客户端按以下顺序应用设置:
- 由服务器管理的设置
- 受 MDM 管理的设置
- 基于文件的配置
- 用户级设置
由 MDM 管理的设置具有更高优先级。 如果 MDM 管理的设置不可用时,客户端会先应用服务器管理的设置,再应用基于文件的设置。
支持的密钥
| 密钥 | 类型 | 接受的值 | Purpose |
|---|---|---|---|
permissions.disable | string | "disable" | 禁用绕过或 YOLO 样式允许的所有行为 |
enabledPlugins | object | 键格式: PLUGIN-NAME@MARKETPLACE-NAME; 值: true | 按密钥启用特定插件 |
extra | object | 具有 source.source ("github") 和 source.repo (OWNER/REPO) 的命名市场对象 | 添加用户可以访问的插件市场 |
strict | array | 包含 source 值的市场对象数组("github" 具有 repo,或 "git" 具有 url) | 仅允许从明确列出的应用市场安装插件 |
model | object | ||
default 设置为受支持的模型名称 | 定义默认模型治理设置 | ||
telemetry | object | ||
enabled(boolean)、endpoint(string)、protocol("otlp-http" 或 "otlp-grpc")、captureContent(boolean)、lock(boolean)、serviceName(string)、resource(object)、headers(object) | 为 VS Code 配置 OpenTelemetry 导出 |
配置示例
以下示例在一个托管设置文件中显示这些密钥。
{
"permissions": {
"disableBypassPermissionsMode": "disable"
},
"enabledPlugins": {
"my-plugin@agent-skills": true
},
"extraKnownMarketplaces": {
"agent-skills": {
"source": {
"source": "github",
"repo": "OWNER/REPO"
}
}
},
"strictKnownMarketplaces": [
{
"source": "github",
"repo": "OWNER/REPO"
}
],
"model": {
"default": "MODEL-NAME"
},
"telemetry": {
"enabled": true,
"endpoint": "https://otel-collector.example.com",
"protocol": "otlp-http",
"captureContent": false,
"lockCaptureContent": true,
"serviceName": "copilot",
"resourceAttributes": {
"deployment.environment": "production"
},
"headers": {
"Authorization": "Bearer TOKEN"
}
}
}