feat(ai): 移除 Excel 导入预检链路
- 删除 preflight_import 工具、预检卡、resolve 接口与 ui.import_preflight 事件 - 删除 imports.preflight 解析器与 PreflightReport 类型 - SYSTEM_PROMPT 改为上传 Excel 后直接确认列映射/策略并调用 start_import_wizard - 前端同步移除预检类型/组件/测试,保留导入向导
This commit is contained in:
@@ -47,9 +47,7 @@ import {
|
||||
} from './ai-chat.streaming';
|
||||
import {
|
||||
resolveFormConversationId,
|
||||
resolvePreflightConversationId,
|
||||
resolveReviewConversationId,
|
||||
resolveImportPreflight,
|
||||
submitForm,
|
||||
submitReview,
|
||||
confirmReviewStep,
|
||||
@@ -63,10 +61,7 @@ import {
|
||||
markReviewSubmittedOnMessage,
|
||||
} from './ai-chat.submissions';
|
||||
import { denyWriteTool, executeTool } from './ai-chat.tools';
|
||||
import {
|
||||
executePreflightImport,
|
||||
executeStartImportWizard,
|
||||
} from './ai-chat.tool-actions';
|
||||
import { executeStartImportWizard } from './ai-chat.tool-actions';
|
||||
export abstract class AiChatServiceBase implements AiChatServiceContext {
|
||||
readonly activeConversations = new Set<number>();
|
||||
|
||||
@@ -209,15 +204,6 @@ export abstract class AiChatServiceBase implements AiChatServiceContext {
|
||||
return executeStartImportWizard(this, messageId, call, context, emit);
|
||||
}
|
||||
|
||||
executePreflightImport(
|
||||
messageId: number,
|
||||
call: ModelToolCall,
|
||||
context: ReturnType<typeof AgentToolContextFactory.fromAuthenticatedUser>,
|
||||
emit: AiSseEmitter,
|
||||
): Promise<string> {
|
||||
return executePreflightImport(this, messageId, call, context, emit);
|
||||
}
|
||||
|
||||
listConversations(userId: number): Promise<PublicConversation[]> {
|
||||
return listConversations(this, userId);
|
||||
}
|
||||
@@ -318,10 +304,6 @@ export abstract class AiChatServiceBase implements AiChatServiceContext {
|
||||
return resolveReviewConversationId(this, userId, reviewId);
|
||||
}
|
||||
|
||||
resolvePreflightConversationId(userId: number, messageId: number): Promise<number> {
|
||||
return resolvePreflightConversationId(this, userId, messageId);
|
||||
}
|
||||
|
||||
submitForm(
|
||||
user: AuthenticatedUser,
|
||||
formId: string,
|
||||
@@ -348,21 +330,6 @@ export abstract class AiChatServiceBase implements AiChatServiceContext {
|
||||
return submitReview(this, user, reviewId, dto, signal, emit, onReady);
|
||||
}
|
||||
|
||||
resolveImportPreflight(
|
||||
user: AuthenticatedUser,
|
||||
messageId: number,
|
||||
dto: {
|
||||
clientRequestId: string;
|
||||
mapping?: Record<string, unknown>;
|
||||
settings?: Record<string, unknown>;
|
||||
},
|
||||
signal: AbortSignal,
|
||||
emit: AiSseEmitter,
|
||||
onReady: () => void,
|
||||
): Promise<void> {
|
||||
return resolveImportPreflight(this, user, messageId, dto, signal, emit, onReady);
|
||||
}
|
||||
|
||||
confirmReviewStep(
|
||||
user: AuthenticatedUser,
|
||||
reviewId: string,
|
||||
|
||||
Reference in New Issue
Block a user