refactor: 全面清理死代码 — 删除 348 行无用代码

删除文件:
- training-export.ts: 训练数据导出(零引用,UI 已移除)

删除函数:
- workspace.ts: isProcessAlive, getActiveProcessCount, execWorkspaceCommand, terminateWorkspaceCommand
- sqlite.ts: deleteMessagesBySession, getSkill, closeDatabase
- tool-registry.ts: isToolEnabled
- cron-manager.ts: clearAllTimers
- workspace-panel.ts: setOnToolTerminated, setWorkspaceDirPath

删除 UI:
- index.html: 训练数据导出按钮及说明
- settings-modal.ts: 训练数据导出事件绑定
This commit is contained in:
thzxx
2026-04-18 10:08:01 +08:00
parent 6c9ffa5135
commit d2468cd6fc
8 changed files with 0 additions and 348 deletions
@@ -44,10 +44,6 @@ let currentAiCommand: string | null = null;
/** 终止通知回调(由外部设置) */
let onToolTerminated: ((command: string) => void) | null = null;
/** 设置终止通知回调 */
export function setOnToolTerminated(cb: (command: string) => void): void {
onToolTerminated = cb;
}
function genId(): string {
return `ws_${Date.now()}_${++_counter}`;
@@ -628,17 +624,3 @@ export function getWorkspaceDirPath(): string {
return workspaceDir;
}
/** 设置工作空间目录 */
export async function setWorkspaceDirPath(dir: string): Promise<boolean> {
const bridge = window.metonaDesktop;
if (!bridge?.isDesktop) return false;
const result = await bridge.workspace.setDir(dir);
if (result.success && result.dir) {
workspaceDir = result.dir;
currentFileDir = workspaceDir;
logInfo('工作空间目录已更新', workspaceDir);
return true;
}
return false;
}