Skip to content

设置字段

命令行与 JSON 里的配置项。桌面界面见 设置

AutoC 用 JSON 存配置。交互终端里用 /settings 改常用项,或直接编辑 JSON — 两者写的是同一套字段,/settings 保存后会自动写入文件。

作用域

位置作用域
~/.autoc/agent/settings.json全局(所有工程)
.autoc/settings.json项目(当前工作目录,覆盖全局)

改路径、工具链等项后执行 /reload。各工具链的配置步骤在对应指南里(如 EB tresos),本节只列字段参考。

模型相关

AutoC 当前仅支持 WhyEngineer 账户下的模型。defaultProvider / defaultModel 等项对一般用户通常无需自行填写;登录与模型切换见 登录交互终端

全部设置项

模型与思考

设置项类型默认说明
defaultProviderstring-默认提供商
defaultModelstring-默认模型 ID
defaultThinkingLevelstring-offminimallowmediumhighxhigh
hideThinkingBlockbooleanfalse隐藏输出中的思考块
desktopNotificationsbooleantrue桌面端:后台需要注意时弹出系统通知 / 任务栏闪烁(目前用于 ask_user,可复用;仅全局)
thinkingBudgetsobject-各思考等级的自定义 token 预算

thinkingBudgets

json
{
  "thinkingBudgets": {
    "minimal": 1024,
    "low": 4096,
    "medium": 10240,
    "high": 32768
  }
}

界面与显示

设置项类型默认说明
themestring"dark"主题名(darklight 或自定义)
quietStartupbooleanfalse隐藏启动区
collapseChangelogbooleanfalse更新后显示精简 changelog
enableInstallTelemetrybooleantrue安装/更新后发送匿名版本上报(不控制更新检查本身)
doubleEscapeActionstring"tree"双击 Esc:treeforknone
treeFilterModestring"default"/tree 默认筛选:defaultno-toolsuser-onlylabeled-onlyall
editorPaddingXnumber0输入框水平内边距(0–3)
autocompleteMaxVisiblenumber5自动补全下拉可见条数(3–20)
showHardwareCursorbooleanfalse显示终端硬件光标

遥测与更新检查

enableInstallTelemetry 仅控制匿名安装/更新上报。关闭它不会关闭版本更新检查。

  • PI_SKIP_VERSION_CHECK=1:跳过版本更新检查
  • --offlinePI_OFFLINE=1:跳过启动时所有联网操作(含更新检查、包更新检查、遥测)

警告

设置项类型默认说明
warnings.anthropicExtraUsagebooleantrueAnthropic 订阅可能产生额外用量时是否提示

压缩(Compaction)

设置项类型默认说明
compaction.enabledbooleantrue启用自动上下文压缩
compaction.reserveTokensnumber16384为模型回复预留的 token
compaction.keepRecentTokensnumber20000保留的近期 token(不参与摘要)

分支摘要

设置项类型默认说明
branchSummary.reserveTokensnumber16384分支摘要预留 token
branchSummary.skipPromptbooleanfalse/tree 跳转时跳过「是否摘要废弃分支」提示(默认不摘要)

重试

设置项类型默认说明
retry.enabledbooleantrue瞬态错误时自动重试
retry.maxRetriesnumber3最大重试次数
retry.baseDelayMsnumber2000指数退避基础延迟(2s、4s、8s…)
retry.provider.timeoutMsnumberSDK 默认请求超时(毫秒)
retry.provider.maxRetriesnumberSDK 默认SDK 层重试次数
retry.provider.maxRetryDelayMsnumber60000服务端要求等待的上限(毫秒);0 表示不限制

消息投递

设置项类型默认说明
steeringModestring"one-at-a-time"转向消息:allone-at-a-time
followUpModestring"one-at-a-time"后续消息:allone-at-a-time
transportstring"sse"传输方式偏好:ssewebsocketauto

终端与图片

设置项类型默认说明
terminal.showImagesbooleantrue在终端显示图片(若支持)
terminal.imageWidthCellsnumber60行内图片宽度(字符格)
terminal.clearOnShrinkbooleanfalse内容变短时清空空行(可能闪烁)
images.autoResizebooleantrue发送前将图片缩放到最大 2000×2000
images.blockImagesbooleanfalse禁止向模型发送图片

Shell

设置项类型默认说明
shellPathstring-自定义 Shell 路径(如 Windows 上的 Cygwin)
shellCommandPrefixstring-每条 bash 命令前缀
npmCommandstring[]-npm 相关操作用的命令 argv

会话目录

设置项类型默认说明
sessionDirstring-会话文件目录;支持绝对/相对路径及 ~

优先级(高到低):--session-dir → 环境变量 PI_CODING_AGENT_SESSION_DIRsettings.json 中的 sessionDir

模型循环(Ctrl+P)

设置项类型默认说明
enabledModelsstring[]-Ctrl+P 循环的模型模式(同 --models

EB tresos

快速开始见 EB tresos 配置/settings 可配 Install path、Project path、Include modules、Exclude modules。

设置项类型默认说明
eb.tresosPathstring-EB tresos 安装根目录(/settings → Install path)
eb.projectPathstring.工程目录(含 .project/settings → Project path)
eb.includeModulesstring[]-只加载列出的模块(名称区分大小写)
eb.excludeModulesstring[]-include 之后排除的模块(区分大小写)
eb.name / eb.target / eb.derivate / eb.pnstring-覆盖从 .project 解析出的显示信息

按工程限定模块示例(.autoc/settings.json):

json
{
  "eb": {
    "includeModules": ["Mcu", "Port"]
  }
}

达芬奇 Configurator

快速开始见 达芬奇 Configurator 配置/settings 可配路径与 Include / Exclude modules。

设置项类型默认说明
davinci.configuratorPathstring-安装根目录,必填(含 Core/DVCfgCmd.exe/settings → Configurator path)
davinci.projectPathstring.工程目录(/settings → Project path)
davinci.includeModulesstring[]-只加载列出的 ECUC 模块(区分大小写)
davinci.excludeModulesstring[]-include 之后排除(区分大小写)
davinci.name / davinci.derivativestring-覆盖 .dpa 解析的显示信息

ETAS ISOLAR

快速开始见 ETAS ISOLAR 配置/settings 可配 Install path、Project path、Data ARXML、Include / Exclude modules;autoAssignParams 等见下表

设置项类型默认说明
etas.installPathstring-ISOLAR-AB 安装根目录;未设置用 ISOLAR_HOME
etas.projectPathstring.工程目录(含 .project
etas.rtaosPathstring-独立 OS 工程(RTA-OS)的 .rtaos 文件(不能是文件夹;可在 ETAS 工程外)
etas.dataArxmlExcludestring[]-ECUC 值 ARXML 排除规则(相对 ETAS 工程,gitignore 语法);始终自动扫描后再排除
etas.externalModulesstring[]-EB+ETAS 混合:ETAS 侧模块配置名(区分大小写)
etas.autoAssignParamsstring[]-ISOLAR 自动赋值的参数 SHORT-NAME
etas.includeModulesstring[]-只加载列出的 ECUC 模块(区分大小写)
etas.excludeModulesstring[]-include 之后排除(区分大小写)
etas.namestring-覆盖 .project 显示名称

VCOS Studio

快速开始见 VCOS Studio 配置。安装页配 .venv/settings 可配工程路径与 Include / Exclude / External modules。

设置项类型默认说明
vcos.venvPathstring-Studio .venvinit_env 生成,应与 Studio 安装目录相邻);/settings 安装页
vcos.projectPathstring.工程目录(含 *.vcosproject
vcos.externalModulesstring[]-EB+VCOS 混合:VCOS 侧 ECUC 配置名(如 CanMcu,区分大小写)
vcos.includeModulesstring[]-只加载列出的 ECUC 模块(区分大小写)
vcos.excludeModulesstring[]-include 之后排除(区分大小写)
vcos.namestring-覆盖 .vcosproject 显示名称

ASW

设置项类型默认说明
autosar.systemTemplateExcludestring[]-系统级 ARXML 排除规则(相对打开工程,gitignore 语法);始终自动扫描后再排除;ECUC 不会并入
autosar.runnableFramework.outDirstringAppl/Source应用源码框架输出目录(相对打开工程);改完不必重载
autosar.runnableFramework.overwriteUnprotectedbooleanfalse为真时覆盖没有 USER CODE 保护区的已有文件

详见 ASW

License server

设置项类型默认说明
license.serverAddrstring-license server 地址(host:port,如 192.168.1.10:9847

TUI 中通过 /settings → License server 修改。企业部署见 企业授权

Markdown

设置项类型默认说明
markdown.codeBlockIndentstring" "代码块缩进

扩展资源路径

定义从何处加载扩展、技能、提示词模板与主题。

  • ~/.autoc/agent/settings.json 中的相对路径相对于 ~/.autoc/agent
  • .autoc/settings.json 中的相对路径相对于 .autoc
  • 支持绝对路径与 ~
设置项类型默认说明
packagesarray[]从 npm/git 包加载资源
extensionsstring[][]本地扩展路径或目录
skillsstring[][]本地技能路径或目录
promptsstring[][]本地提示词模板路径或目录
themesstring[][]本地主题路径或目录
enableSkillCommandsbooleantrue将技能注册为 /skill:名称 命令

数组支持 glob 与排除:!pattern 排除,+path / -path 强制包含/排除精确路径。

示例

json
{
  "theme": "dark",
  "defaultThinkingLevel": "medium",
  "compaction": {
    "enabled": true,
    "reserveTokens": 16384,
    "keepRecentTokens": 20000
  },
  "retry": {
    "enabled": true,
    "maxRetries": 3
  },
  "eb": {
    "tresosPath": "C:/EB/tresos",
    "projectPath": "."
  },
  "davinci": {
    "configuratorPath": "D:/Vector/DaVinciConfigurator",
    "projectPath": "."
  },
  "etas": {
    "installPath": "D:/ETAS/ISOLAR-AB",
    "projectPath": "."
  },
  "enabledModels": ["deepseek-*"]
}

项目覆盖示例

json
// ~/.autoc/agent/settings.json(全局)
{
  "theme": "dark",
  "compaction": { "enabled": true, "reserveTokens": 16384 }
}

// .autoc/settings.json(项目)
{
  "compaction": { "reserveTokens": 8192 }
}

// 合并结果
{
  "theme": "dark",
  "compaction": { "enabled": true, "reserveTokens": 8192 }
}

AUTOSAR BSW / ASW AI 配置助手