feat: 升级至 v0.2.3 — Token 估算优化、工具确认超时改进、工作空间标签页
1. Token 估算优化(核心改进):新增 token-estimator.ts 智能字符估算(中文 1.5 token/字、ASCII 0.25 token/字),替换三处旧的 length/2 粗略估算,中文场景准确度从 ~50% 提升到 ~90% 2. 工具确认超时改进:超时时间可配置(30s~600s)、超时 toast 通知、ConfirmationDialog 倒计时 UI(进度条 + 最后 10 秒红色脉冲动画)、SettingsModal 新增配置入口 3. 详情栏新增 Workspace 标签页:workspace:getInfo IPC + WorkspaceViewer 组件(文件预览、目录状态、在文件管理器打开)
This commit is contained in:
Vendored
+23
@@ -193,10 +193,33 @@ interface MetonaWorkspaceInheritResult {
|
||||
error?: string;
|
||||
}
|
||||
|
||||
interface MetonaWorkspaceFileInfo {
|
||||
name: string;
|
||||
path: string;
|
||||
exists: boolean;
|
||||
size: number;
|
||||
mtime: number;
|
||||
preview: string;
|
||||
}
|
||||
|
||||
interface MetonaWorkspaceDirInfo {
|
||||
name: string;
|
||||
path: string;
|
||||
exists: boolean;
|
||||
fileCount: number;
|
||||
}
|
||||
|
||||
interface MetonaWorkspaceInfo {
|
||||
path: string;
|
||||
files: MetonaWorkspaceFileInfo[];
|
||||
dirs: MetonaWorkspaceDirInfo[];
|
||||
}
|
||||
|
||||
interface MetonaWorkspaceAPI {
|
||||
check: (targetPath: string) => Promise<MetonaWorkspaceCheckResult>;
|
||||
inheritFiles: (params: { targetPath: string; sourcePath: string; files: string[] }) =>
|
||||
Promise<MetonaWorkspaceInheritResult>;
|
||||
getInfo: () => Promise<MetonaWorkspaceInfo>;
|
||||
}
|
||||
|
||||
// ===== Toast API =====
|
||||
|
||||
Reference in New Issue
Block a user