feat(web): 工作台 AI 模式与差旅/风险建议交互优化

- 新增 PersonalWorkbenchAiMode 组件、AI 侧边栏与 orb 机器人视觉资源
- 新增 aiApplicationDraftModel / aiExpenseDraftModel / aiWorkbenchConversationStore
  及业务准入 aiSidebarBusinessAccess,支撑 AI 模式下的申请与报销草稿
- 顶栏、侧边栏、工作台样式重构,适配 AI 模式切换与响应式布局
- 同步 steward plan/off_topic、差旅报销引导流、风险建议卡片等测试
This commit is contained in:
caoxiaozhu
2026-06-18 22:12:24 +08:00
parent a6674a1e76
commit 0cde1f8990
65 changed files with 8011 additions and 1608 deletions

View File

@@ -142,15 +142,29 @@ test('workbench model routing maps ontology result before entering assistant', (
)
})
test('workbench ambiguous travel flow uses steward fast path before ontology parsing', () => {
const fastPathIndex = appShellComposable.indexOf(
'fallbackSessionType === ASSISTANT_SCOPE_SESSION_STEWARD'
)
const ontologyParseIndex = appShellComposable.indexOf('fetchOntologyParse(')
test('workbench smart entry blocks unsupported non-business input before ontology parsing', () => {
const openSmartEntryStart = appShellComposable.indexOf('async function openSmartEntry(payload')
const closeSmartEntryStart = appShellComposable.indexOf('function closeSmartEntry(')
assert.ok(openSmartEntryStart >= 0, 'expected an openSmartEntry entry point')
assert.ok(closeSmartEntryStart > openSmartEntryStart, 'expected closeSmartEntry to follow openSmartEntry')
assert.ok(fastPathIndex >= 0, 'expected steward fallback fast path in smart entry routing')
const openSmartEntryBlock = appShellComposable.slice(openSmartEntryStart, closeSmartEntryStart)
const guardIndex = openSmartEntryBlock.indexOf('resolveAssistantScopeGuard(')
const blockedIndex = openSmartEntryBlock.indexOf('scopeGuard?.blocked')
const conversationIndex = openSmartEntryBlock.indexOf('buildUnsupportedBusinessScopeConversation(prompt')
const sessionTypeResolveIndex = openSmartEntryBlock.indexOf('resolveSmartEntrySessionType(payload)')
assert.ok(guardIndex >= 0, 'expected smart entry to use the business scope guard')
assert.ok(blockedIndex >= 0, 'expected smart entry to short-circuit blocked inputs')
assert.ok(conversationIndex >= 0, 'expected blocked smart entry inputs to seed an assistant conversation')
assert.ok(sessionTypeResolveIndex >= 0, 'expected smart entry to delegate session resolution')
assert.ok(
fastPathIndex < ontologyParseIndex,
'expected steward fallback to return before slow ontology parsing'
blockedIndex < sessionTypeResolveIndex,
'expected blocked inputs to stop before ontology-driven session resolution'
)
assert.ok(
conversationIndex < sessionTypeResolveIndex,
'expected unsupported input guidance to be prepared before session resolution'
)
})