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:
@@ -10,13 +10,21 @@ export function resolveWorkbenchIntentActionRoute(frame = null) {
|
||||
if (frame.action === 'ask_policy') {
|
||||
return { nextStep: 'pass_through' }
|
||||
}
|
||||
if (frame.targetMode === 'current_context' && frame.safetyLevel === 'confirm_required') {
|
||||
return { nextStep: 'open_context_confirm' }
|
||||
if (frame.policyDecision === 'need_confirmation') {
|
||||
return {
|
||||
nextStep: 'open_context_confirm',
|
||||
riskLevel: frame.riskLevel,
|
||||
requiresSelection: Boolean(frame.requiresSelection),
|
||||
requiresConfirmation: Boolean(frame.requiresConfirmation)
|
||||
}
|
||||
}
|
||||
if (frame.targetMode === 'filtered_candidates' && QUERY_CANDIDATE_ACTIONS.has(frame.action)) {
|
||||
if (frame.policyDecision === 'query_candidates' && QUERY_CANDIDATE_ACTIONS.has(frame.action)) {
|
||||
return {
|
||||
nextStep: 'query_candidates',
|
||||
queryPrompt: frame.normalizedQuery || ''
|
||||
queryPrompt: frame.normalizedQuery || '',
|
||||
riskLevel: frame.riskLevel,
|
||||
requiresSelection: Boolean(frame.requiresSelection),
|
||||
requiresConfirmation: Boolean(frame.requiresConfirmation)
|
||||
}
|
||||
}
|
||||
return { nextStep: 'pass_through' }
|
||||
|
||||
Reference in New Issue
Block a user