refactor(ai-chat): 移除 excel_analyze/office_analyze 工具与 OfficeKit 依赖

- 删除 excel_analyze/office_analyze 两个 A2UI 工具(schema、分发、执行器、测试)
- 附件分析改为依赖上传时自动提取的文本与 preflight_import 报告 errorSamples
- 移除 @officecli/officecli 依赖及 OfficeCliService(PPT 上传不再自动提取文本)
- 保留 AiExcelReaderService(附件文本提取与导入预检仍使用)
This commit is contained in:
2026-08-05 22:26:05 +08:00
parent d1c933f032
commit 6249fefc64
15 changed files with 2 additions and 720 deletions

View File

@@ -2,8 +2,6 @@ import { AgentToolContextFactory } from '../agent-tools/agent-tool.types';
import type { AiChatServiceContext, AiSseEmitter, ModelToolCall } from './ai-chat.types';
import type { AiToolRun } from './entities';
import {
executeOfficeAnalyze,
executeExcelAnalyze,
executePreflightImport,
executeRenderChart,
executeRenderForm,
@@ -95,9 +93,6 @@ export async function executeTool(
if (call.name === 'preflight_import') {
return executePreflightImport(context, messageId, call, userId, emit);
}
if (call.name === 'excel_analyze') {
return executeExcelAnalyze(context, messageId, call, userId, emit);
}
if (call.name === 'start_import_wizard') {
return executeStartImportWizard(context, messageId, call, agentContext, emit);
}
@@ -110,9 +105,6 @@ export async function executeTool(
if (call.name === 'render_chart') {
return executeRenderChart(context, messageId, call, emit);
}
if (call.name === 'office_analyze') {
return executeOfficeAnalyze(context, messageId, call, userId, emit);
}
if ((call.name === 'create_student' || call.name === 'update_students') && !allowWriteTools) {
return denyWriteTool(context, messageId, call, emit);
}