feat(web): AI 意图规划置信度阈值与动作策略细化
- workbenchAiIntentPlannerModel 新增 WORKBENCH_AI_INTENT_CONFIDENCE_THRESHOLD 与 isLowConfidenceTravelApplicationPlan,shouldRequestWorkbenchAiIntentPlan 增加业务关键词前置过滤 - resolveExecutableTravelApplicationPlan 区分 requestedSubmit 与提交确认(submitRequiresConfirmation),autoSubmit 不再直接置真 - workbenchIntentActionPolicy 改用 policyDecision 路由(need_confirmation/query_candidates),透传 riskLevel/requiresSelection/requiresConfirmation - workbenchIntentFrameModel 补充 query 动作识别,usePersonalWorkbenchAiMode/useWorkbenchAiActionRouter/useWorkbenchAiApplicationPreviewFlow 接入低置信度与确认流程 - 更新 intent-planner-model/intent-frame-model/application-gate-model/fast-preview 测试
This commit is contained in:
@@ -195,6 +195,9 @@ export function useWorkbenchAiApplicationPreviewFlow({
|
||||
if (normalized.validationIssues?.length || normalized.missingFields?.length) {
|
||||
return buildApplicationPreviewFooterMessage(normalized)
|
||||
}
|
||||
if (message?.submitRequiresConfirmation) {
|
||||
return '已识别到您希望直接提交。系统不会自动提交申请,请先核对申请核对表;确认无误后,点击下方“直接提交”按钮再进入提交确认。'
|
||||
}
|
||||
return '申请核对表已补齐,费用测算已同步。您仍可点击表格继续修改;确认无误后,可以点击下方按钮保存草稿或直接提交,也可以直接回复“保存草稿”或“提交”。'
|
||||
}
|
||||
|
||||
@@ -547,6 +550,8 @@ export function useWorkbenchAiApplicationPreviewFlow({
|
||||
id: pendingMessage.id,
|
||||
applicationPreview: preview,
|
||||
suggestedActions: buildInlineApplicationPreviewSuggestedActions(preview),
|
||||
requestedSubmit: Boolean(options.requestedSubmit),
|
||||
submitRequiresConfirmation: Boolean(options.submitRequiresConfirmation),
|
||||
stewardPlan: {
|
||||
streamStatus: 'completed',
|
||||
thinkingEvents: completeInlineThinkingEvents(resolveInlineThinkingEvents(pendingMessage))
|
||||
@@ -554,13 +559,7 @@ export function useWorkbenchAiApplicationPreviewFlow({
|
||||
text: content
|
||||
})
|
||||
replaceInlineMessage(pendingMessage.id, previewMessage)
|
||||
if (options.autoSubmit && normalizeApplicationPreview(preview).readyToSubmit) {
|
||||
await executeInlineApplicationPreviewAction(AI_APPLICATION_ACTION_SUBMIT, previewMessage, {
|
||||
confirmed: true,
|
||||
skipUserMessage: true,
|
||||
userText: options.userMessage || '直接提交'
|
||||
})
|
||||
} else if (options.autoSaveDraft) {
|
||||
if (options.autoSaveDraft) {
|
||||
await executeInlineApplicationPreviewAction(AI_APPLICATION_ACTION_SAVE_DRAFT, previewMessage, {
|
||||
skipUserMessage: true,
|
||||
userText: options.userMessage || '保存草稿'
|
||||
|
||||
Reference in New Issue
Block a user