- 重建 yolo-classifier-prompts/ 三个缺失的 prompt 文件 - dev.ts/build.ts 扫描 FEATURE_* 环境变量注入 Bun --feature - AUTO_MODE_ENABLED_DEFAULT 由 feature flag 决定,开 feature 即开 auto mode - 补充 docs/safety/auto-mode.mdx prompt 模板章节 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.5 KiB
Markdown
34 lines
1.5 KiB
Markdown
# DEV-LOG
|
|
|
|
## Auto Mode 补全 (2026-04-02)
|
|
|
|
反编译丢失了 auto mode 分类器的三个 prompt 模板文件,代码逻辑完整但无法运行。
|
|
|
|
**新增:**
|
|
- `yolo-classifier-prompts/auto_mode_system_prompt.txt` — 主系统提示词
|
|
- `yolo-classifier-prompts/permissions_external.txt` — 外部权限模板(用户规则替换默认值)
|
|
- `yolo-classifier-prompts/permissions_anthropic.txt` — 内部权限模板(用户规则追加)
|
|
|
|
**改动:**
|
|
- `scripts/dev.ts` + `build.ts` — 扫描 `FEATURE_*` 环境变量注入 Bun `--feature`
|
|
- `cli.tsx` — 启动时打印已启用的 feature
|
|
- `permissionSetup.ts` — `AUTO_MODE_ENABLED_DEFAULT` 由 `feature('TRANSCRIPT_CLASSIFIER')` 决定,开 feature 即开 auto mode
|
|
- `docs/safety/auto-mode.mdx` — 补充 prompt 模板章节
|
|
|
|
**用法:** `FEATURE_TRANSCRIPT_CLASSIFIER=1 bun run dev`
|
|
|
|
**注意:** prompt 模板为重建产物。
|
|
|
|
---
|
|
|
|
## USER_TYPE=ant TUI 修复 (2026-04-02)
|
|
|
|
`global.d.ts` 声明的全局函数在反编译版本运行时未定义,导致 `USER_TYPE=ant` 时 TUI 崩溃。
|
|
|
|
修复方式:显式 import / 本地 stub / 全局 stub / 新建 stub 文件。涉及文件:
|
|
`cli.tsx`, `model.ts`, `context.ts`, `effort.ts`, `thinking.ts`, `undercover.ts`, `Spinner.tsx`, `AntModelSwitchCallout.tsx`(新建), `UndercoverAutoCallout.tsx`(新建)
|
|
|
|
注意:
|
|
- `USER_TYPE=ant` 启用 alt-screen 全屏模式,中心区域满屏是预期行为
|
|
- `global.d.ts` 中剩余未 stub 的全局函数(`getAntModels` 等)遇到 `X is not defined` 时按同样模式处理
|