feat(ai-chat): AI 导入确认流程完善并清理代码质量
- 新增导入确认/映射解析辅助,支持预检后生成导入向导 - 抽取 parseAttachmentArgs/beginImportToolRun 等重复逻辑 - 双重类型断言改为运行时守卫,消除 aislop 告警
This commit is contained in:
@@ -5,7 +5,6 @@ import {
|
||||
executePreflightImport,
|
||||
executeRenderChart,
|
||||
executeRenderForm,
|
||||
executeRenderReview,
|
||||
executeStartImportWizard,
|
||||
} from './ai-chat.tool-actions';
|
||||
|
||||
@@ -91,17 +90,11 @@ export async function executeTool(
|
||||
return executeRenderForm(context, messageId, call, userId, emit);
|
||||
}
|
||||
if (call.name === 'preflight_import') {
|
||||
return executePreflightImport(context, messageId, call, userId, emit);
|
||||
return executePreflightImport(context, messageId, call, agentContext, emit);
|
||||
}
|
||||
if (call.name === 'start_import_wizard') {
|
||||
return executeStartImportWizard(context, messageId, call, agentContext, emit);
|
||||
}
|
||||
if (call.name === 'render_review') {
|
||||
if (reviewSubmitted) {
|
||||
return denyTool(context, messageId, call, 'render_review', '导入已确认,无需再次生成预览', '导入已确认', emit);
|
||||
}
|
||||
return executeRenderReview(context, messageId, call, userId, emit);
|
||||
}
|
||||
if (call.name === 'render_chart') {
|
||||
return executeRenderChart(context, messageId, call, emit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user