feat: 新增风险规则生成引擎与知识图谱可视化
后端新增风险规则自动生成和模板执行服务,支持从规则资产 批量生成并持久化风险规则文件;知识库入库日志增强图谱 查询和本地 RAG 回退,前端审计页面增加风险规则模型和流 程图组件,知识入库面板拆分为图谱可视化子组件,报销创 建页面增加引导式流程模型,更新知识库索引数据。
This commit is contained in:
@@ -11,6 +11,7 @@ import { useTravelReimbursementSessionState } from './useTravelReimbursementSess
|
||||
import { useTravelReimbursementReviewDrawer } from './useTravelReimbursementReviewDrawer.js'
|
||||
import { useTravelReimbursementSubmitComposer } from './useTravelReimbursementSubmitComposer.js'
|
||||
import { useTravelReimbursementReviewActions } from './useTravelReimbursementReviewActions.js'
|
||||
import { useTravelReimbursementGuidedFlow } from './useTravelReimbursementGuidedFlow.js'
|
||||
import { recognizeOcrFiles } from '../../services/ocr.js'
|
||||
import { fetchAgentRunDetail } from '../../services/agentAssets.js'
|
||||
import { deleteConversation, runOrchestrator } from '../../services/orchestrator.js'
|
||||
@@ -536,6 +537,7 @@ export default {
|
||||
currentInsight,
|
||||
reviewFilePreviews,
|
||||
composerUploadIntent,
|
||||
guidedFlowState,
|
||||
insightPanelCollapsed,
|
||||
sessionSwitchBusy,
|
||||
buildEmptySessionState,
|
||||
@@ -871,7 +873,8 @@ export default {
|
||||
})
|
||||
sessionRuntimeRefs = {
|
||||
attachedFiles,
|
||||
composerFilesExpanded
|
||||
composerFilesExpanded,
|
||||
guidedFlowState
|
||||
}
|
||||
const {
|
||||
confirmPendingAttachmentAssociationInternal,
|
||||
@@ -961,6 +964,34 @@ export default {
|
||||
|| composerBusinessTimeTags.value.length
|
||||
)
|
||||
)
|
||||
const {
|
||||
handleGuidedShortcut,
|
||||
handleGuidedComposerSubmit,
|
||||
handleGuidedSuggestedAction,
|
||||
resetGuidedFlowState
|
||||
} = useTravelReimbursementGuidedFlow({
|
||||
guidedFlowState,
|
||||
messages,
|
||||
composerDraft,
|
||||
attachedFiles,
|
||||
composerBusinessTimeTags,
|
||||
composerBusinessTimeDraftTouched,
|
||||
fileInputRef,
|
||||
submitting,
|
||||
reviewActionBusy,
|
||||
sessionSwitchBusy,
|
||||
createMessage,
|
||||
nextTick,
|
||||
scrollToBottom,
|
||||
persistSessionState,
|
||||
clearAttachedFiles,
|
||||
adjustComposerTextareaHeight,
|
||||
buildComposerBusinessTimeContext,
|
||||
openTravelCalculator,
|
||||
lockSuggestedActionMessage,
|
||||
submitExistingComposer: submitComposerInternal,
|
||||
toast
|
||||
})
|
||||
function toggleTravelCalculator() {
|
||||
return toggleTravelCalculatorInternal()
|
||||
}
|
||||
@@ -1050,6 +1081,7 @@ export default {
|
||||
reviewFilePreviews: reviewFilePreviews.value,
|
||||
composerDraft: composerDraft.value,
|
||||
composerUploadIntent: composerUploadIntent.value,
|
||||
guidedFlowState: guidedFlowState.value,
|
||||
insightPanelCollapsed: insightPanelCollapsed.value
|
||||
}),
|
||||
() => {
|
||||
@@ -1168,6 +1200,7 @@ export default {
|
||||
function resetCurrentSessionState() {
|
||||
const emptyState = buildEmptySessionState(activeSessionType.value)
|
||||
sessionSnapshots.value[activeSessionType.value] = emptyState
|
||||
resetGuidedFlowState()
|
||||
applySessionState(emptyState)
|
||||
resetFlowRun({ startedAt: 0, openDrawer: false })
|
||||
}
|
||||
@@ -1239,6 +1272,9 @@ export default {
|
||||
await switchSessionType(shortcut.targetSessionType)
|
||||
return
|
||||
}
|
||||
if (handleGuidedShortcut(shortcut)) {
|
||||
return
|
||||
}
|
||||
|
||||
const prompt = String(shortcut?.prompt || '').trim()
|
||||
if (!prompt) return
|
||||
@@ -1293,6 +1329,7 @@ export default {
|
||||
const actionType = String(action?.action_type || '').trim()
|
||||
if (!actionType || submitting.value || reviewActionBusy.value || sessionSwitchBusy.value) return
|
||||
if (message?.suggestedActionsLocked) return
|
||||
if (await handleGuidedSuggestedAction(message, action)) return
|
||||
|
||||
if (actionType === 'confirm_expense_intent') {
|
||||
const originalMessage = String(action?.payload?.original_message || message?.text || '').trim()
|
||||
@@ -1746,6 +1783,9 @@ export default {
|
||||
// submitting.value = true
|
||||
// recognizeOcrFiles(files)
|
||||
// submitting.value = false
|
||||
if (await handleGuidedComposerSubmit(options)) {
|
||||
return null
|
||||
}
|
||||
return submitComposerInternal(options)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user