fix: 修复 USER_TYPE=ant 时 TUI 无法启动的问题

反编译版本中 global.d.ts 声明的全局函数运行时未定义,
通过显式 import、stub 组件和全局 polyfill 修复。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
claude-code-best
2026-04-02 20:31:04 +08:00
parent ce29527a67
commit 4ab4506de2
9 changed files with 490 additions and 354 deletions

View File

@@ -0,0 +1,12 @@
// Stub — ant-only component, not available in decompiled build
import React from 'react';
export function AntModelSwitchCallout(_props: {
onDone: (selection: string, modelAlias?: string) => void;
}): React.ReactElement | null {
return null;
}
export function shouldShowModelSwitchCallout(): boolean {
return false;
}