反编译版本中 global.d.ts 声明的全局函数运行时未定义, 通过显式 import、stub 组件和全局 polyfill 修复。 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
13 lines
655 B
Markdown
13 lines
655 B
Markdown
# DEV-LOG
|
|
|
|
## 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` 时按同样模式处理
|