2026-02-24 06:54:14 +00:00
|
|
|
import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
|
|
|
|
|
|
|
|
|
|
const routes: Array<RouteRecordRaw> = [
|
|
|
|
|
{
|
|
|
|
|
path: '/',
|
|
|
|
|
redirect: '/dashboard'
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/dashboard',
|
|
|
|
|
name: 'Dashboard',
|
|
|
|
|
component: () => import('@/views/dashboard/index.vue'),
|
|
|
|
|
meta: { title: '控制台' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/kb',
|
|
|
|
|
name: 'KBManagement',
|
|
|
|
|
component: () => import('@/views/kb/index.vue'),
|
|
|
|
|
meta: { title: '知识库管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/rag-lab',
|
|
|
|
|
name: 'RagLab',
|
|
|
|
|
component: () => import('@/views/rag-lab/index.vue'),
|
|
|
|
|
meta: { title: 'RAG 实验室' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/monitoring',
|
|
|
|
|
name: 'Monitoring',
|
|
|
|
|
component: () => import('@/views/monitoring/index.vue'),
|
|
|
|
|
meta: { title: '会话监控' }
|
feat(AISVC-T8): LLM配置管理与RAG调试输出支持 [AC-AISVC-42, AC-AISVC-43, AC-AISVC-44, AC-AISVC-45, AC-AISVC-46, AC-AISVC-47, AC-AISVC-48, AC-AISVC-49, AC-AISVC-50]
- 新增 LLMProviderFactory 工厂类支持 OpenAI/Ollama/Azure [AC-AISVC-42]
- 新增 LLMConfigManager 支持配置热更新 [AC-AISVC-43, AC-AISVC-44]
- 新增 LLM 管理 API 端点 [AC-AISVC-42~AC-AISVC-46]
- 更新 RAG 实验接口支持 AI 回复生成 [AC-AISVC-47, AC-AISVC-49]
- 新增 RAG 实验流式输出 SSE [AC-AISVC-48]
- 支持指定 LLM 提供者 [AC-AISVC-50]
- 更新 OpenAPI 契约添加 LLM 管理接口
- 更新前后端规范文档 v0.4.0 迭代
2026-02-24 17:25:53 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/embedding',
|
|
|
|
|
name: 'EmbeddingConfig',
|
|
|
|
|
component: () => import('@/views/admin/embedding/index.vue'),
|
|
|
|
|
meta: { title: '嵌入模型配置' }
|
2026-02-25 06:06:37 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/llm',
|
|
|
|
|
name: 'LLMConfig',
|
|
|
|
|
component: () => import('@/views/admin/llm/index.vue'),
|
|
|
|
|
meta: { title: 'LLM 模型配置' }
|
feat(ASA): 实现 Phase 8-12 前端管理页面 [AC-ASA-23~AC-ASA-44]
实现内容:
- Phase 8: Prompt 模板管理页面(列表、编辑、版本历史、发布/回滚)
- Phase 9: 多知识库管理页面(卡片列表、文档管理)
- Phase 10: 意图规则管理页面(动态表单、关键词/正则输入组件)
- Phase 11: 话术流程管理页面(步骤拖拽编辑、流程预览)
- Phase 12: 输出护栏管理页面(禁词管理、行为规则)
新增文件:
- src/types/prompt-template.ts, knowledge-base.ts, intent-rule.ts, script-flow.ts, guardrail.ts
- src/api/prompt-template.ts, knowledge-base.ts, intent-rule.ts, script-flow.ts, guardrail.ts
- src/views/admin/prompt-template/index.vue, components/TemplateDetail.vue
- src/views/admin/knowledge-base/index.vue, components/DocumentList.vue
- src/views/admin/intent-rule/index.vue, components/KeywordInput.vue, components/PatternInput.vue
- src/views/admin/script-flow/index.vue, components/FlowPreview.vue
- src/views/admin/guardrail/index.vue, components/ForbiddenWordsTab.vue, components/BehaviorRulesTab.vue
更新:
- src/router/index.ts - 添加 5 个新路由
- package.json - 添加 vuedraggable 依赖
- docs/progress/ai-service-admin-progress.md - 更新进度
- spec/ai-service-admin/tasks.md - 更新任务状态
2026-02-27 10:33:25 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/prompt-templates',
|
|
|
|
|
name: 'PromptTemplate',
|
|
|
|
|
component: () => import('@/views/admin/prompt-template/index.vue'),
|
|
|
|
|
meta: { title: 'Prompt 模板管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/knowledge-bases',
|
|
|
|
|
name: 'KnowledgeBase',
|
|
|
|
|
component: () => import('@/views/admin/knowledge-base/index.vue'),
|
|
|
|
|
meta: { title: '多知识库管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/intent-rules',
|
|
|
|
|
name: 'IntentRule',
|
|
|
|
|
component: () => import('@/views/admin/intent-rule/index.vue'),
|
|
|
|
|
meta: { title: '意图规则管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/script-flows',
|
|
|
|
|
name: 'ScriptFlow',
|
|
|
|
|
component: () => import('@/views/admin/script-flow/index.vue'),
|
|
|
|
|
meta: { title: '话术流程管理' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/guardrails',
|
|
|
|
|
name: 'Guardrail',
|
|
|
|
|
component: () => import('@/views/admin/guardrail/index.vue'),
|
|
|
|
|
meta: { title: '输出护栏管理' }
|
feat(v0.7.0-window2): implement flow simulation and guardrail testing/monitoring
Refs: AC-AISVC-101, AC-AISVC-102, AC-AISVC-103, AC-AISVC-104, AC-AISVC-105, AC-AISVC-106, AC-AISVC-107
Refs: AC-ASA-59, AC-ASA-60, AC-ASA-61, AC-ASA-62, AC-ASA-63, AC-ASA-64
Backend changes:
- New: ai-service/app/services/flow/tester.py (ScriptFlowTester)
- New: ai-service/app/services/guardrail/tester.py (GuardrailTester)
- New: ai-service/app/services/monitoring/flow_monitor.py (FlowMonitor)
- New: ai-service/app/services/monitoring/guardrail_monitor.py (GuardrailMonitor)
- Modified: ai-service/app/api/admin/script_flows.py (add POST /{flowId}/simulate)
- Modified: ai-service/app/api/admin/guardrails.py (add POST /test)
- Modified: ai-service/app/api/admin/monitoring.py (add flow/guardrail stats endpoints)
Frontend changes:
- New: SimulateDialog.vue (flow simulation dialog)
- New: TestDialog.vue (guardrail test dialog)
- New: ScriptFlows.vue (flow monitoring page)
- New: Guardrails.vue (guardrail monitoring page)
- Extended: API services (monitoring.ts, script-flow.ts, guardrail.ts)
- Updated: Router with new monitoring routes
2026-02-27 15:11:59 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/monitoring/intent-rules',
|
|
|
|
|
name: 'IntentRuleMonitoring',
|
|
|
|
|
component: () => import('@/views/admin/monitoring/IntentRules.vue'),
|
|
|
|
|
meta: { title: '意图规则监控' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/monitoring/prompt-templates',
|
|
|
|
|
name: 'PromptTemplateMonitoring',
|
|
|
|
|
component: () => import('@/views/admin/monitoring/PromptTemplates.vue'),
|
|
|
|
|
meta: { title: 'Prompt 模板监控' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/monitoring/script-flows',
|
|
|
|
|
name: 'ScriptFlowMonitoring',
|
|
|
|
|
component: () => import('@/views/admin/monitoring/ScriptFlows.vue'),
|
|
|
|
|
meta: { title: '话术流程监控' }
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/monitoring/guardrails',
|
|
|
|
|
name: 'GuardrailMonitoring',
|
|
|
|
|
component: () => import('@/views/admin/monitoring/Guardrails.vue'),
|
|
|
|
|
meta: { title: '输出护栏监控' }
|
2026-02-27 16:30:54 +00:00
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
path: '/admin/monitoring/conversations',
|
|
|
|
|
name: 'ConversationTracking',
|
|
|
|
|
component: () => import('@/views/admin/monitoring/ConversationTracking.vue'),
|
|
|
|
|
meta: { title: '对话追踪' }
|
2026-02-24 06:54:14 +00:00
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
const router = createRouter({
|
|
|
|
|
history: createWebHistory(),
|
|
|
|
|
routes
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
export default router
|