设置
AutoC 用 JSON 存配置。用 /settings 改常用项,或直接编辑 JSON — 两者写的是同一套字段,/settings 保存后会自动写入文件。
作用域
| 位置 | 作用域 |
|---|---|
~/.autoc/agent/settings.json | 全局(所有工程) |
.autoc/settings.json | 项目(当前工作目录,覆盖全局) |
改路径、工具链等项后执行 /reload。各工具链的配置步骤在对应指南里(如 EB tresos),本节只列字段参考。
模型相关
AutoC 当前仅支持 WhyEngineer 账户下的模型。defaultProvider / defaultModel 等项对一般用户通常无需自行填写;登录与模型切换见 快速开始 与 使用 AutoC。
全部设置项
模型与思考
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
defaultProvider | string | - | 默认提供商 |
defaultModel | string | - | 默认模型 ID |
defaultThinkingLevel | string | - | off、minimal、low、medium、high、xhigh |
hideThinkingBlock | boolean | false | 隐藏输出中的思考块 |
thinkingBudgets | object | - | 各思考等级的自定义 token 预算 |
thinkingBudgets
{
"thinkingBudgets": {
"minimal": 1024,
"low": 4096,
"medium": 10240,
"high": 32768
}
}界面与显示
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
theme | string | "dark" | 主题名(dark、light 或自定义) |
quietStartup | boolean | false | 隐藏启动区 |
collapseChangelog | boolean | false | 更新后显示精简 changelog |
enableInstallTelemetry | boolean | true | 安装/更新后发送匿名版本上报(不控制更新检查本身) |
doubleEscapeAction | string | "tree" | 双击 Esc:tree、fork 或 none |
treeFilterMode | string | "default" | /tree 默认筛选:default、no-tools、user-only、labeled-only、all |
editorPaddingX | number | 0 | 输入框水平内边距(0–3) |
autocompleteMaxVisible | number | 5 | 自动补全下拉可见条数(3–20) |
showHardwareCursor | boolean | false | 显示终端硬件光标 |
遥测与更新检查
enableInstallTelemetry 仅控制匿名安装/更新上报。关闭它不会关闭版本更新检查。
PI_SKIP_VERSION_CHECK=1:跳过版本更新检查--offline或PI_OFFLINE=1:跳过启动时所有联网操作(含更新检查、包更新检查、遥测)
警告
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
warnings.anthropicExtraUsage | boolean | true | Anthropic 订阅可能产生额外用量时是否提示 |
压缩(Compaction)
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
compaction.enabled | boolean | true | 启用自动上下文压缩 |
compaction.reserveTokens | number | 16384 | 为模型回复预留的 token |
compaction.keepRecentTokens | number | 20000 | 保留的近期 token(不参与摘要) |
分支摘要
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
branchSummary.reserveTokens | number | 16384 | 分支摘要预留 token |
branchSummary.skipPrompt | boolean | false | /tree 跳转时跳过「是否摘要废弃分支」提示(默认不摘要) |
重试
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
retry.enabled | boolean | true | 瞬态错误时自动重试 |
retry.maxRetries | number | 3 | 最大重试次数 |
retry.baseDelayMs | number | 2000 | 指数退避基础延迟(2s、4s、8s…) |
retry.provider.timeoutMs | number | SDK 默认 | 请求超时(毫秒) |
retry.provider.maxRetries | number | SDK 默认 | SDK 层重试次数 |
retry.provider.maxRetryDelayMs | number | 60000 | 服务端要求等待的上限(毫秒);0 表示不限制 |
消息投递
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
steeringMode | string | "one-at-a-time" | 转向消息:all 或 one-at-a-time |
followUpMode | string | "one-at-a-time" | 后续消息:all 或 one-at-a-time |
transport | string | "sse" | 传输方式偏好:sse、websocket、auto |
终端与图片
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
terminal.showImages | boolean | true | 在终端显示图片(若支持) |
terminal.imageWidthCells | number | 60 | 行内图片宽度(字符格) |
terminal.clearOnShrink | boolean | false | 内容变短时清空空行(可能闪烁) |
images.autoResize | boolean | true | 发送前将图片缩放到最大 2000×2000 |
images.blockImages | boolean | false | 禁止向模型发送图片 |
Shell
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
shellPath | string | - | 自定义 Shell 路径(如 Windows 上的 Cygwin) |
shellCommandPrefix | string | - | 每条 bash 命令前缀 |
npmCommand | string[] | - | npm 相关操作用的命令 argv |
会话目录
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
sessionDir | string | - | 会话文件目录;支持绝对/相对路径及 ~ |
优先级(高到低):--session-dir → 环境变量 PI_CODING_AGENT_SESSION_DIR → settings.json 中的 sessionDir。
模型循环(Ctrl+P)
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
enabledModels | string[] | - | Ctrl+P 循环的模型模式(同 --models) |
EB tresos
快速开始见 EB tresos 配置。/settings 里的 Install path / Project path 对应下表前两行;includeModules 等仅 JSON 可配。
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
eb.tresosPath | string | - | EB tresos 安装根目录(/settings → Install path) |
eb.projectPath | string | .project | 工程路径(/settings → Project path) |
eb.includeModules | string[] | - | 只加载列出的模块(名称不区分大小写) |
eb.excludeModules | string[] | - | include 之后排除的模块 |
eb.name / eb.target / eb.derivate / eb.pn | string | - | 覆盖从 .project 解析出的显示信息 |
按工程限定模块示例(.autoc/settings.json):
{
"eb": {
"includeModules": ["Mcu", "Port"]
}
}达芬奇 Configurator
快速开始见 达芬奇 Configurator 配置。/settings 路径项对应下表前两行;includeModules 等仅 JSON 可配。
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
davinci.configuratorPath | string | ${SIP}/DaVinciConfigurator | 安装根目录(/settings → Configurator path) |
davinci.projectPath | string | . | 工程目录(/settings → Project path) |
davinci.includeModules | string[] | - | 只加载列出的 ECUC 模块 |
davinci.excludeModules | string[] | - | include 之后排除 |
davinci.name / davinci.derivative | string | - | 覆盖 .dpa 解析的显示信息 |
ETAS ISOLAR
快速开始见 ETAS ISOLAR 配置。/settings 可配 Install path、Project path、Data ARXML paths、External modules;includeModules / autoAssignParams 等见下表。
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
etas.installPath | string | - | ISOLAR-AB 安装根目录;未设置用 ISOLAR_HOME |
etas.projectPath | string | . | RTA-CAR 工程目录 |
etas.dataArxmlPaths | string[] | - | ECUC 值 ARXML;非空时仅加载所列文件 |
etas.externalModules | string[] | - | EB+ETAS 混合:ETAS 侧模块配置名 |
etas.autoAssignParams | string[] | - | ISOLAR 自动赋值的参数 SHORT-NAME |
etas.includeModules | string[] | - | 只加载列出的 ECUC 模块 |
etas.excludeModules | string[] | - | include 之后排除 |
etas.name | string | - | 覆盖 .project 显示名称 |
System Template
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
autosar.systemTemplatePaths | string[] | - | 系统级 ARXML 路径或 glob;也可用 /system import |
详见 System Template(Beta)。
License server
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
license.serverAddr | string | - | license server 地址(host:port,如 192.168.1.10:9847) |
TUI 中通过 /settings → License server 修改。企业部署见 企业授权。
Markdown
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
markdown.codeBlockIndent | string | " " | 代码块缩进 |
扩展资源路径
定义从何处加载扩展、技能、提示词模板与主题。
~/.autoc/agent/settings.json中的相对路径相对于~/.autoc/agent.autoc/settings.json中的相对路径相对于.autoc- 支持绝对路径与
~
| 设置项 | 类型 | 默认 | 说明 |
|---|---|---|---|
packages | array | [] | 从 npm/git 包加载资源 |
extensions | string[] | [] | 本地扩展路径或目录 |
skills | string[] | [] | 本地技能路径或目录 |
prompts | string[] | [] | 本地提示词模板路径或目录 |
themes | string[] | [] | 本地主题路径或目录 |
enableSkillCommands | boolean | true | 将技能注册为 /skill:名称 命令 |
数组支持 glob 与排除:!pattern 排除,+path / -path 强制包含/排除精确路径。
示例
{
"theme": "dark",
"defaultThinkingLevel": "medium",
"compaction": {
"enabled": true,
"reserveTokens": 16384,
"keepRecentTokens": 20000
},
"retry": {
"enabled": true,
"maxRetries": 3
},
"eb": {
"tresosPath": "C:/EB/tresos",
"projectPath": ".project"
},
"davinci": {
"configuratorPath": "${SIP}/DaVinciConfigurator",
"projectPath": "."
},
"etas": {
"installPath": "D:/ETAS/ISOLAR-AB",
"projectPath": "."
},
"enabledModels": ["deepseek-*"]
}项目覆盖示例
// ~/.autoc/agent/settings.json(全局)
{
"theme": "dark",
"compaction": { "enabled": true, "reserveTokens": 16384 }
}
// .autoc/settings.json(项目)
{
"compaction": { "reserveTokens": 8192 }
}
// 合并结果
{
"theme": "dark",
"compaction": { "enabled": true, "reserveTokens": 8192 }
}