Files
rag/.understand-anything/knowledge-graph.json
lacerate551 100d1a06eb init: RAG 知识库服务初始提交
- 后端 API(Flask + Gunicorn)
- RAG 引擎(混合检索 + 云端 Reranker + 引用溯源)
- 文档解析(MinerU + 多格式支持)
- Docker 生产部署配置
- 排除前端项目、敏感配置、模型文件
2026-06-04 17:35:27 +08:00

8540 lines
258 KiB
JSON
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
{
"version": "1.0.0",
"project": {
"name": "rag-agent",
"languages": [
"python",
"javascript",
"html",
"css",
"vue",
"dockerfile",
"yaml",
"markdown"
],
"frameworks": [
"Flask",
"Vue 3",
"Vite",
"Naive UI",
"Pinia",
"ChromaDB"
],
"description": "RAG 知识库服务 - 向量存储(ChromaDB)、关键词检索(BM25)、文档解析、知识库问答(Agentic RAG)",
"analyzedAt": "2026-05-26T05:41:38.020Z",
"gitCommitHash": "8c95336539b1070e8ad6d12e44783a2fd6b722cb"
},
"nodes": [
{
"id": "config:deploy/Dockerfile",
"type": "config",
"name": "Dockerfile",
"summary": "RAG 服务生产环境 Docker 镜像构建配置",
"tags": [
"docker",
"deployment",
"build"
],
"filePath": "deploy/Dockerfile",
"complexity": "simple"
},
{
"id": "config:deploy/docker-compose.yml",
"type": "config",
"name": "docker-compose.yml",
"summary": "开发环境 Compose 配置",
"tags": [
"docker",
"compose",
"development"
],
"filePath": "deploy/docker-compose.yml",
"complexity": "simple"
},
{
"id": "config:deploy/docker-compose.prod.yml",
"type": "config",
"name": "docker-compose.prod.yml",
"summary": "生产环境 Compose 配置",
"tags": [
"docker",
"compose",
"production"
],
"filePath": "deploy/docker-compose.prod.yml",
"complexity": "simple"
},
{
"id": "service:rag-service",
"type": "service",
"name": "rag-service",
"summary": "RAG 知识库服务容器",
"tags": [
"docker",
"service",
"rag"
],
"filePath": "deploy/docker-compose.yml",
"complexity": "simple"
},
{
"id": "service:python-base",
"type": "service",
"name": "python:3.10-slim",
"summary": "Python 3.10 精简版基础镜像",
"tags": [
"docker",
"base-image",
"python"
],
"filePath": "deploy/Dockerfile",
"complexity": "simple"
},
{
"id": "service:gunicorn",
"type": "service",
"name": "gunicorn",
"summary": "Python WSGI HTTP 服务器",
"tags": [
"wsgi",
"server",
"python"
],
"filePath": "deploy/Dockerfile",
"complexity": "simple"
},
{
"id": "document:AGENTS.md",
"type": "document",
"name": "AGENTS.md",
"summary": "项目开发指南文档定义项目定位、虚拟环境配置、项目结构、快速启动方式和API接口概览",
"tags": [
"documentation",
"guide",
"development"
],
"filePath": "AGENTS.md",
"complexity": "simple"
},
{
"id": "document:CHANGELOG.md",
"type": "document",
"name": "CHANGELOG.md",
"summary": "项目变更日志,记录从 v1.0.0 到 v6.5.0 的所有版本变更",
"tags": [
"documentation",
"changelog",
"version"
],
"filePath": "CHANGELOG.md",
"complexity": "simple"
},
{
"id": "document:CLAUDE.md",
"type": "document",
"name": "CLAUDE.md",
"summary": "Claude Code 项目指令文件定义项目定位、虚拟环境配置、项目结构和API接口",
"tags": [
"documentation",
"claude",
"guide"
],
"filePath": "CLAUDE.md",
"complexity": "simple"
},
{
"id": "document:README.md",
"type": "document",
"name": "README.md",
"summary": "项目主文档详细介绍功能特性、安装步骤、使用方法、技术架构、API接口和版本历史",
"tags": [
"documentation",
"readme",
"main"
],
"filePath": "README.md",
"complexity": "moderate"
},
{
"id": "config:config.example.py",
"type": "config",
"name": "config.example.py",
"summary": "API配置模板文件包含通义千问API、Serper API、Neo4j图数据库等配置项示例",
"tags": [
"python",
"config",
"template"
],
"filePath": "config.example.py",
"complexity": "simple"
},
{
"id": "config:config.py",
"type": "config",
"name": "config.py",
"summary": "实际API配置文件包含API密钥和数据库连接信息",
"tags": [
"python",
"config",
"secrets"
],
"filePath": "config.py",
"complexity": "simple"
},
{
"id": "config:requirements.txt",
"type": "config",
"name": "requirements.txt",
"summary": "Python依赖列表定义项目所需的所有第三方库",
"tags": [
"python",
"dependencies"
],
"filePath": "requirements.txt",
"complexity": "simple"
},
{
"id": "document:chat-ui/index.html",
"type": "document",
"name": "主聊天界面",
"summary": "RAG 知识库系统主界面,包含登录、聊天、会话管理、知识库管理等功能",
"tags": [
"html",
"frontend",
"chat",
"ui"
],
"filePath": "chat-ui/index.html",
"complexity": "moderate"
},
{
"id": "document:chat-ui/exam.html",
"type": "document",
"name": "出题系统界面",
"summary": "支持试卷生成、审核、批阅和报告查看的独立页面",
"tags": [
"html",
"frontend",
"exam",
"ui"
],
"filePath": "chat-ui/exam.html",
"complexity": "moderate"
},
{
"id": "document:chat-ui/api-test.html",
"type": "document",
"name": "API测试终端",
"summary": "开发者调试工具,支持所有后端接口的直接测试",
"tags": [
"html",
"frontend",
"testing",
"ui"
],
"filePath": "chat-ui/api-test.html",
"complexity": "moderate"
},
{
"id": "config:chat-ui/style.css",
"type": "config",
"name": "全局样式表",
"summary": "深色主题样式定义所有UI组件的视觉样式",
"tags": [
"css",
"frontend",
"styles",
"theme"
],
"filePath": "chat-ui/style.css",
"complexity": "moderate"
},
{
"id": "service:deploy/Dockerfile.prod",
"type": "service",
"name": "Dockerfile.prod",
"summary": "生产环境 Docker 镜像构建文件",
"tags": [
"docker",
"production",
"deployment"
],
"filePath": "deploy/Dockerfile.prod",
"complexity": "simple"
},
{
"id": "document:deploy/README.md",
"type": "document",
"name": "部署文档",
"summary": "包含部署配置、环境变量、资源要求和故障排查指南",
"tags": [
"documentation",
"deployment",
"configuration"
],
"filePath": "deploy/README.md",
"complexity": "simple"
},
{
"id": "config:deploy/gunicorn.conf.py",
"type": "config",
"name": "gunicorn.conf.py",
"summary": "Gunicorn WSGI 服务器配置Worker、超时、日志、钩子函数",
"tags": [
"python",
"gunicorn",
"wsgi",
"configuration"
],
"filePath": "deploy/gunicorn.conf.py",
"complexity": "simple"
},
{
"id": "document:docs/API与后端对接规范.md",
"type": "document",
"name": "API与后端对接规范",
"summary": "定义 RAG 服务与后端系统的 API 接口规范,包括认证、请求格式和响应格式",
"tags": [
"api",
"specification",
"backend",
"integration"
],
"filePath": "docs/API与后端对接规范.md",
"complexity": "simple"
},
{
"id": "document:docs/Agentic_RAG完整指南.md",
"type": "document",
"name": "Agentic RAG完整指南",
"summary": "详细介绍 Agentic RAG 系统的架构、组件和使用方法",
"tags": [
"agentic-rag",
"guide",
"architecture"
],
"filePath": "docs/Agentic_RAG完整指南.md",
"complexity": "moderate"
},
{
"id": "document:docs/Graph_RAG使用指南.md",
"type": "document",
"name": "Graph RAG使用指南",
"summary": "Graph RAG 功能的使用说明和配置方法",
"tags": [
"graph-rag",
"guide",
"knowledge-graph"
],
"filePath": "docs/Graph_RAG使用指南.md",
"complexity": "moderate"
},
{
"id": "document:docs/MinerU模型部署指南.md",
"type": "document",
"name": "MinerU模型部署指南",
"summary": "MinerU PDF 解析模型的部署和配置说明",
"tags": [
"mineru",
"deployment",
"pdf",
"model"
],
"filePath": "docs/MinerU模型部署指南.md",
"complexity": "moderate"
},
{
"id": "document:docs/RAG数据流程详解.md",
"type": "document",
"name": "RAG数据流程详解",
"summary": "RAG 系统的数据处理流程,包括文档解析、向量化、检索等环节",
"tags": [
"rag",
"data-flow",
"pipeline"
],
"filePath": "docs/RAG数据流程详解.md",
"complexity": "moderate"
},
{
"id": "document:docs/出题批卷系统设计.md",
"type": "document",
"name": "出题批卷系统设计",
"summary": "出题和批卷系统的功能设计和实现方案",
"tags": [
"exam",
"design",
"system"
],
"filePath": "docs/出题批卷系统设计.md",
"complexity": "moderate"
},
{
"id": "document:docs/开发与系统模块说明.md",
"type": "document",
"name": "开发与系统模块说明",
"summary": "项目模块结构和开发指南",
"tags": [
"development",
"modules",
"guide"
],
"filePath": "docs/开发与系统模块说明.md",
"complexity": "simple"
},
{
"id": "document:docs/数据库设计文档.md",
"type": "document",
"name": "数据库设计文档",
"summary": "数据库表结构设计和关系说明",
"tags": [
"database",
"design",
"schema"
],
"filePath": "docs/数据库设计文档.md",
"complexity": "moderate"
},
{
"id": "document:docs/架构与部署方案.md",
"type": "document",
"name": "架构与部署方案",
"summary": "系统架构设计和部署方案说明",
"tags": [
"architecture",
"deployment",
"design"
],
"filePath": "docs/架构与部署方案.md",
"complexity": "moderate"
},
{
"id": "document:docs/测试指南.md",
"type": "document",
"name": "测试指南",
"summary": "测试方法和测试用例说明",
"tags": [
"testing",
"guide",
"qa"
],
"filePath": "docs/测试指南.md",
"complexity": "simple"
},
{
"id": "document:docs/认证与权限配置指南.md",
"type": "document",
"name": "认证与权限配置指南",
"summary": "用户认证和权限管理的配置说明",
"tags": [
"authentication",
"authorization",
"security",
"guide"
],
"filePath": "docs/认证与权限配置指南.md",
"complexity": "simple"
},
{
"id": "file:tools/chunk_metrics.py",
"type": "file",
"name": "chunk_metrics.py",
"path": "tools/chunk_metrics.py",
"language": "python",
"description": "切片指标计算模块 - 提供切片质量评估的各项指标计算功能",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ChunkInfo",
"type": "class",
"name": "ChunkInfo",
"path": "tools/chunk_metrics.py",
"line_start": 20,
"line_end": 32,
"description": "切片信息数据类,包含 id、content、source、page、chunk_index、metadata 属性",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkInfo.length",
"type": "property",
"name": "length",
"path": "tools/chunk_metrics.py",
"line_start": 29,
"line_end": 32,
"description": "返回切片内容长度",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:Issue",
"type": "class",
"name": "Issue",
"path": "tools/chunk_metrics.py",
"line_start": 35,
"line_end": 43,
"description": "问题记录数据类,包含 severity、category、chunk_id、source、description、content_preview 属性",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:MetricResult",
"type": "class",
"name": "MetricResult",
"path": "tools/chunk_metrics.py",
"line_start": 46,
"line_end": 51,
"description": "指标计算结果数据类,包含 score、issues、details 属性",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ChunkMetrics",
"type": "class",
"name": "ChunkMetrics",
"path": "tools/chunk_metrics.py",
"line_start": 54,
"line_end": 406,
"description": "切片指标计算器,提供结构完整性、内容质量、语义连贯性评分",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.__init__",
"type": "method",
"name": "__init__",
"path": "tools/chunk_metrics.py",
"line_start": 75,
"line_end": 94,
"description": "初始化指标计算器,设置最小/最大切片长度、短切片阈值、乱码比例阈值",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.calculate_all_metrics",
"type": "method",
"name": "calculate_all_metrics",
"path": "tools/chunk_metrics.py",
"line_start": 96,
"line_end": 111,
"description": "计算所有指标,返回结构完整性、内容质量、语义连贯性评分",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.structure_score",
"type": "method",
"name": "structure_score",
"path": "tools/chunk_metrics.py",
"line_start": 113,
"line_end": 202,
"description": "结构完整性评分,评估碎片化程度、过长切片、长度分布合理性",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.content_quality_score",
"type": "method",
"name": "content_quality_score",
"path": "tools/chunk_metrics.py",
"line_start": 204,
"line_end": 290,
"description": "内容质量评分,检测乱码、空白切片、结构噪音(目录等)",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.coherence_score",
"type": "method",
"name": "coherence_score",
"path": "tools/chunk_metrics.py",
"line_start": 292,
"line_end": 349,
"description": "语义连贯性评分,评估边界断裂(句子是否在中间被截断)",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.get_length_distribution",
"type": "method",
"name": "get_length_distribution",
"path": "tools/chunk_metrics.py",
"line_start": 351,
"line_end": 382,
"description": "获取长度分布统计",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_metrics.py:ChunkMetrics.get_file_statistics",
"type": "method",
"name": "get_file_statistics",
"path": "tools/chunk_metrics.py",
"line_start": 384,
"line_end": 405,
"description": "按文件统计切片信息",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_optimization_suggestions",
"type": "function",
"name": "generate_optimization_suggestions",
"path": "tools/chunk_metrics.py",
"line_start": 408,
"line_end": 462,
"description": "根据指标结果生成优化建议",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py",
"type": "file",
"name": "chunk_analyzer.py",
"path": "tools/chunk_analyzer.py",
"language": "python",
"description": "切片效果分析器 - 分析 RAG 向量库中的切片质量,生成评估报告",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AnalysisResult",
"type": "class",
"name": "AnalysisResult",
"path": "tools/chunk_analyzer.py",
"line_start": 38,
"line_end": 64,
"description": "分析结果数据类,包含评分、分布、问题列表、优化建议等",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ChunkAnalyzer",
"type": "class",
"name": "ChunkAnalyzer",
"path": "tools/chunk_analyzer.py",
"line_start": 67,
"line_end": 298,
"description": "切片效果分析器主类",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer.__init__",
"type": "method",
"name": "__init__",
"path": "tools/chunk_analyzer.py",
"line_start": 70,
"line_end": 88,
"description": "初始化分析器,创建 ChunkMetrics 实例",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"type": "method",
"name": "analyze",
"path": "tools/chunk_analyzer.py",
"line_start": 90,
"line_end": 168,
"description": "分析指定知识库的切片质量,返回 AnalysisResult",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer._load_chunks",
"type": "method",
"name": "_load_chunks",
"path": "tools/chunk_analyzer.py",
"line_start": 170,
"line_end": 219,
"description": "从向量库加载切片数据",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer._llm_evaluate",
"type": "method",
"name": "_llm_evaluate",
"path": "tools/chunk_analyzer.py",
"line_start": 221,
"line_end": 243,
"description": "LLM 辅助评估(可选)",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer._empty_result",
"type": "method",
"name": "_empty_result",
"path": "tools/chunk_analyzer.py",
"line_start": 245,
"line_end": 261,
"description": "返回空结果",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_analyzer.py:ChunkAnalyzer.export_result",
"type": "method",
"name": "export_result",
"path": "tools/chunk_analyzer.py",
"line_start": 263,
"line_end": 297,
"description": "导出分析结果到 JSON 文件",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:print_summary",
"type": "function",
"name": "print_summary",
"path": "tools/chunk_analyzer.py",
"line_start": 300,
"line_end": 348,
"description": "打印分析摘要到控制台",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:main",
"type": "function",
"name": "main",
"path": "main.py",
"line": 27,
"description": "主函数,解析命令行参数并启动 Flask 应用",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_report.py",
"type": "file",
"name": "chunk_report.py",
"path": "tools/chunk_report.py",
"language": "python",
"description": "切片分析 HTML 报告生成器 - 将分析结果转换为交互式 HTML 报告",
"complexity": "moderate"
},
{
"id": "file:tools/chunk_report.py:HTML_TEMPLATE",
"type": "variable",
"name": "HTML_TEMPLATE",
"path": "tools/chunk_report.py",
"line_start": 29,
"line_end": 396,
"description": "HTML 报告模板字符串",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_score_class",
"type": "function",
"name": "get_score_class",
"path": "tools/chunk_report.py",
"line_start": 399,
"line_end": 408,
"description": "根据分数返回 CSS 样式类名",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_distribution_bars",
"type": "function",
"name": "generate_distribution_bars",
"path": "tools/chunk_report.py",
"line_start": 411,
"line_end": 428,
"description": "生成长度分布柱状图 HTML",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_issues_html",
"type": "function",
"name": "generate_issues_html",
"path": "tools/chunk_report.py",
"line_start": 431,
"line_end": 451,
"description": "生成问题列表 HTML",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_file_rows",
"type": "function",
"name": "generate_file_rows",
"path": "tools/chunk_report.py",
"line_start": 454,
"line_end": 470,
"description": "生成文件统计表格行 HTML",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_suggestions_html",
"type": "function",
"name": "generate_suggestions_html",
"path": "tools/chunk_report.py",
"line_start": 473,
"line_end": 482,
"description": "生成优化建议 HTML",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_llm_section",
"type": "function",
"name": "generate_llm_section",
"path": "tools/chunk_report.py",
"line_start": 485,
"line_end": 511,
"description": "生成 LLM 评估部分 HTML",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:generate_report",
"type": "function",
"name": "generate_report",
"path": "tools/chunk_report.py",
"line_start": 514,
"line_end": 573,
"description": "生成 HTML 报告主函数",
"complexity": "moderate"
},
{
"id": "file:tools/clean_vector_store.py",
"type": "file",
"name": "clean_vector_store.py",
"path": "tools/clean_vector_store.py",
"language": "python",
"description": "清理向量库脚本 - 删除所有向量库,只保留空的 public_kb",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:clean_vector_store",
"type": "function",
"name": "clean_vector_store",
"path": "tools/clean_vector_store.py",
"line_start": 20,
"line_end": 71,
"description": "清理向量库,删除 chroma 和 BM25 目录,重建空目录",
"complexity": "moderate"
},
{
"id": "file:tools/export_chunks.py",
"type": "file",
"name": "export_chunks.py",
"path": "tools/export_chunks.py",
"language": "python",
"description": "切片导出工具 - 将向量库中的切片导出为可读的 Markdown 格式",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:export_collection_chunks",
"type": "function",
"name": "export_collection_chunks",
"path": "tools/export_chunks.py",
"line_start": 23,
"line_end": 103,
"description": "导出单个向量库的切片,按文件分组生成 Markdown",
"complexity": "moderate"
},
{
"id": "module:api/__init__.py",
"type": "module",
"name": "api",
"path": "api/__init__.py",
"description": "Flask 应用工厂模块,负责创建和配置 Flask 应用实例",
"symbols": [
"create_app"
],
"complexity": "moderate"
},
{
"id": "module:api/chat_routes.py",
"type": "module",
"name": "chat_routes",
"path": "api/chat_routes.py",
"description": "聊天和 RAG 问答 API 路由",
"symbols": [
"chat_bp",
"chat",
"rag",
"rag_stream",
"search",
"chat_with_llm"
],
"complexity": "moderate"
},
{
"id": "module:api/kb_routes.py",
"type": "module",
"name": "kb_routes",
"path": "api/kb_routes.py",
"description": "向量库管理 API 路由",
"symbols": [
"kb_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/document_routes.py",
"type": "module",
"name": "document_routes",
"path": "api/document_routes.py",
"description": "文档管理 API 路由",
"symbols": [
"document_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/sync_routes.py",
"type": "module",
"name": "sync_routes",
"path": "api/sync_routes.py",
"description": "同步服务 API 路由",
"symbols": [
"sync_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/session_routes.py",
"type": "module",
"name": "session_routes",
"path": "api/session_routes.py",
"description": "会话管理 API 路由",
"symbols": [
"session_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/feedback_routes.py",
"type": "module",
"name": "feedback_routes",
"path": "api/feedback_routes.py",
"description": "用户反馈 API 路由",
"symbols": [
"feedback_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/audit_routes.py",
"type": "module",
"name": "audit_routes",
"path": "api/audit_routes.py",
"description": "审计日志 API 路由",
"symbols": [
"audit_bp",
"get_audit_logs"
],
"complexity": "moderate"
},
{
"id": "module:api/auth_routes.py",
"type": "module",
"name": "auth_routes",
"path": "api/auth_routes.py",
"description": "认证相关 API 路由",
"symbols": [
"auth_bp",
"get_stats",
"get_current_user",
"get_users",
"update_user"
],
"complexity": "moderate"
},
{
"id": "module:api/image_routes.py",
"type": "module",
"name": "image_routes",
"path": "api/image_routes.py",
"description": "图片管理 API 路由",
"symbols": [
"image_bp"
],
"complexity": "moderate"
},
{
"id": "module:api/response_utils.py",
"type": "module",
"name": "response_utils",
"path": "api/response_utils.py",
"description": "统一响应格式工具模块",
"symbols": [
"success_response",
"error_response"
],
"complexity": "moderate"
},
{
"id": "module:auth/__init__.py",
"type": "module",
"name": "auth",
"path": "auth/__init__.py",
"description": "认证与安全模块入口",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:auth/gateway.py",
"type": "module",
"name": "gateway",
"path": "auth/gateway.py",
"description": "网关认证模块,从 Header 读取用户信息",
"symbols": [
"require_gateway_auth",
"require_role",
"get_user_permissions",
"get_current_user",
"get_auth_manager",
"get_accessible_collections",
"check_collection_permission",
"can_create_collection",
"can_delete_collection",
"require_collection_permission",
"_FakeAuthManager"
],
"complexity": "moderate"
},
{
"id": "module:auth/security.py",
"type": "module",
"name": "security",
"path": "auth/security.py",
"description": "安全模块Prompt 注入防护、输入验证、输出过滤",
"symbols": [
"validate_query",
"sanitize_user_input",
"filter_response",
"is_safe_response",
"AgentConstraints"
],
"complexity": "moderate"
},
{
"id": "module:data/__init__.py",
"type": "module",
"name": "data",
"path": "data/__init__.py",
"description": "数据目录入口,统一数据库结构",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:data/db.py",
"type": "module",
"name": "db",
"path": "data/db.py",
"description": "数据库连接管理模块",
"symbols": [
"get_connection",
"get_raw_connection",
"init_databases",
"get_db_stats",
"row_to_dict",
"rows_to_list",
"json_parse",
"json_stringify",
"DB_PATHS",
"DATA_DIR"
],
"complexity": "moderate"
},
{
"id": "module:main.py",
"type": "module",
"name": "main",
"path": "main.py",
"description": "统一启动入口",
"symbols": [
"main"
],
"complexity": "moderate"
},
{
"id": "module:parsers/__init__.py",
"type": "module",
"name": "parsers",
"path": "parsers/__init__.py",
"description": "文档解析器模块入口",
"symbols": [
"_parse_with_pandas"
],
"complexity": "moderate"
},
{
"id": "module:parsers/excel_parser.py",
"type": "module",
"name": "excel_parser",
"path": "parsers/excel_parser.py",
"description": "Excel 解析模块Pandas 管道)",
"symbols": [
"UnifiedChunk",
"parse_excel",
"_detect_header_row",
"_df_to_markdown",
"get_table_meta",
"convert_to_rag_format",
"parse_xlsx_enhanced",
"get_excel_chunks_for_rag"
],
"complexity": "moderate"
},
{
"id": "module:parsers/pdf_odl.py",
"type": "module",
"name": "pdf_odl",
"path": "parsers/pdf_odl.py",
"description": "PDF 解析模块",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:parsers/docx_docling.py",
"type": "module",
"name": "docx_docling",
"path": "parsers/docx_docling.py",
"description": "Word 文档解析模块",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:parsers/mineru_parser.py",
"type": "module",
"name": "mineru_parser",
"path": "parsers/mineru_parser.py",
"description": "MinerU 统一解析模块",
"symbols": [
"parse_with_mineru",
"parse_docx_with_mineru",
"parse_xlsx_with_mineru"
],
"complexity": "moderate"
},
{
"id": "module:parsers/table_parser.py",
"type": "module",
"name": "table_parser",
"path": "parsers/table_parser.py",
"description": "表格解析模块",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:exam_pkg/__init__.py",
"type": "module",
"name": "exam_pkg",
"path": "exam_pkg/__init__.py",
"description": "考试系统模块入口",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:exam_pkg/api.py",
"type": "module",
"name": "exam_api",
"path": "exam_pkg/api.py",
"description": "出题系统 API 路由",
"symbols": [
"exam_bp",
"api_health"
],
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:create_app",
"type": "function",
"name": "create_app",
"path": "api/__init__.py",
"line": 42,
"description": "Flask 应用工厂函数,创建并配置 Flask 应用实例",
"complexity": "moderate"
},
{
"id": "file:chat_bp",
"type": "variable",
"name": "chat_bp",
"path": "api/chat_routes.py",
"line": 107,
"description": "聊天路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:kb_bp",
"type": "variable",
"name": "kb_bp",
"path": "api/kb_routes.py",
"line": 43,
"description": "向量库管理路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:document_bp",
"type": "variable",
"name": "document_bp",
"path": "api/document_routes.py",
"line": 54,
"description": "文档管理路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:sync_bp",
"type": "variable",
"name": "sync_bp",
"path": "api/sync_routes.py",
"line": 42,
"description": "同步服务路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:session_bp",
"type": "variable",
"name": "session_bp",
"path": "api/session_routes.py",
"line": 14,
"description": "会话管理路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:feedback_bp",
"type": "variable",
"name": "feedback_bp",
"path": "api/feedback_routes.py",
"line": 37,
"description": "用户反馈路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:audit_bp",
"type": "variable",
"name": "audit_bp",
"path": "api/audit_routes.py",
"line": 15,
"description": "审计日志路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:auth_bp",
"type": "variable",
"name": "auth_bp",
"path": "api/auth_routes.py",
"line": 21,
"description": "认证路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:image_bp",
"type": "variable",
"name": "image_bp",
"path": "api/image_routes.py",
"line": 14,
"description": "图片管理路由 Blueprint",
"complexity": "moderate"
},
{
"id": "file:exam_bp",
"type": "variable",
"name": "exam_bp",
"path": "exam_pkg/api.py",
"line": 36,
"description": "出题系统路由 Blueprint",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:require_gateway_auth",
"type": "function",
"name": "require_gateway_auth",
"path": "auth/gateway.py",
"line": 82,
"description": "网关认证装饰器,从 Header 读取用户信息",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:_FakeAuthManager",
"type": "class",
"name": "_FakeAuthManager",
"path": "auth/gateway.py",
"line": 232,
"description": "兼容旧代码的假 AuthManager",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:validate_query",
"type": "function",
"name": "validate_query",
"path": "auth/security.py",
"line": 69,
"description": "验证用户查询是否安全",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:filter_response",
"type": "function",
"name": "filter_response",
"path": "auth/security.py",
"line": 128,
"description": "过滤响应中的敏感信息",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:success_response",
"type": "function",
"name": "success_response",
"path": "api/response_utils.py",
"line": 16,
"description": "构造成功响应",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:error_response",
"type": "function",
"name": "error_response",
"path": "api/response_utils.py",
"line": 52,
"description": "构造错误响应",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:parse_excel",
"type": "function",
"name": "parse_excel",
"path": "parsers/excel_parser.py",
"line": 50,
"description": "解析 Excel 文件,输出 UnifiedChunk 列表",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:UnifiedChunk",
"type": "class",
"name": "UnifiedChunk",
"path": "parsers/excel_parser.py",
"line": 29,
"description": "统一内部 Schema - 与 MinerUChunk 兼容",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:_detect_header_row",
"type": "function",
"name": "_detect_header_row",
"path": "parsers/excel_parser.py",
"line": 198,
"description": "检测表头行位置",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:_df_to_markdown",
"type": "function",
"name": "_df_to_markdown",
"path": "parsers/excel_parser.py",
"line": 252,
"description": "将 DataFrame 转换为 Markdown 表格格式",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:parse_with_mineru",
"type": "function",
"name": "parse_with_mineru",
"path": "parsers/mineru_parser.py",
"line": 127,
"description": "使用 MinerU 解析文档",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:parse_docx_with_mineru",
"type": "function",
"name": "parse_docx_with_mineru",
"path": "parsers/mineru_parser.py",
"line": 1033,
"description": "Word 文档解析别名",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:parse_xlsx_with_mineru",
"type": "function",
"name": "parse_xlsx_with_mineru",
"path": "parsers/mineru_parser.py",
"line": 1038,
"description": "Excel 解析别名",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:chat",
"type": "function",
"name": "chat",
"path": "api/chat_routes.py",
"line": 1063,
"description": "普通聊天模式 - 直接使用LLM回复",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:chat_with_llm",
"type": "function",
"name": "chat_with_llm",
"path": "api/chat_routes.py",
"line": 917,
"description": "普通聊天 - 使用 LLM 直接回复",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_audit_logs",
"type": "function",
"name": "get_audit_logs",
"path": "api/audit_routes.py",
"line": 20,
"description": "获取审计日志",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:api_health",
"type": "function",
"name": "api_health",
"path": "exam_pkg/api.py",
"line": 196,
"description": "健康检查",
"complexity": "moderate"
},
{
"id": "file:core/__init__.py",
"type": "file",
"name": "__init__.py",
"path": "core/__init__.py",
"language": "python",
"description": "RAG 核心引擎模块入口,导出 RAGEngine、BM25Index、split_text 等核心组件",
"complexity": "moderate"
},
{
"id": "file:core/engine.py",
"type": "file",
"name": "engine.py",
"path": "core/engine.py",
"language": "python",
"description": "RAG 引擎核心实现,包含向量检索、重排序、混合检索等功能",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:RAGEngine",
"type": "class",
"name": "RAGEngine",
"path": "core/engine.py",
"line_start": 206,
"description": "RAG 引擎主类,管理嵌入模型、向量库、重排序器等资源",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ONNXReranker",
"type": "class",
"name": "ONNXReranker",
"path": "core/engine.py",
"line_start": 137,
"description": "ONNX 格式重排序器,用于候选文档重排序",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_engine",
"type": "function",
"name": "get_engine",
"path": "core/engine.py",
"line_start": 1928,
"description": "获取 RAGEngine 单例实例",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:_get_device",
"type": "function",
"name": "_get_device",
"path": "core/engine.py",
"line_start": 108,
"description": "获取计算设备配置CPU/GPU/MPS",
"complexity": "moderate"
},
{
"id": "file:core/bm25_index.py",
"type": "file",
"name": "bm25_index.py",
"path": "core/bm25_index.py",
"language": "python",
"description": "BM25 关键词检索索引实现",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:BM25Index",
"type": "class",
"name": "BM25Index",
"path": "knowledge/base.py",
"description": "BM25 索引类(从 knowledge.base 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_bm25_indexer",
"type": "function",
"name": "get_bm25_indexer",
"path": "core/bm25_index.py",
"line_start": 110,
"description": "获取 BM25 索引器实例",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:init_bm25_indexer",
"type": "function",
"name": "init_bm25_indexer",
"path": "core/bm25_index.py",
"line_start": 123,
"description": "初始化 BM25 索引器",
"complexity": "moderate"
},
{
"id": "file:core/chunker.py",
"type": "file",
"name": "chunker.py",
"path": "core/chunker.py",
"language": "python",
"description": "文本分块器,支持语义分块和长度限制",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:split_text_with_limit",
"type": "function",
"name": "split_text_with_limit",
"path": "core/chunker.py",
"line_start": 19,
"description": "带长度限制的文本分块",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:merge_short_chunks",
"type": "function",
"name": "merge_short_chunks",
"path": "core/chunker.py",
"line_start": 95,
"description": "合并过短的分块",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:filter_chunks_by_section",
"type": "function",
"name": "filter_chunks_by_section",
"path": "core/chunker.py",
"line_start": 135,
"description": "按章节过滤分块",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:extract_section_mention",
"type": "function",
"name": "extract_section_mention",
"path": "core/chunker.py",
"line_start": 184,
"description": "从查询中提取章节提及",
"complexity": "moderate"
},
{
"id": "file:core/agentic.py",
"type": "file",
"name": "agentic.py",
"path": "core/agentic.py",
"language": "python",
"description": "Agentic RAG 智能问答主类,组合多个 Mixin 实现完整问答流程",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AgenticRAG",
"type": "class",
"name": "AgenticRAG",
"path": "core/agentic.py",
"line_start": 68,
"description": "Agentic RAG 主类,继承多个 Mixin 实现智能问答",
"complexity": "moderate"
},
{
"id": "file:core/agentic_base.py",
"type": "file",
"name": "agentic_base.py",
"path": "core/agentic_base.py",
"language": "python",
"description": "Agentic RAG 基础模块,定义常量和共享配置",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py",
"type": "file",
"name": "agentic_query.py",
"path": "core/agentic_query.py",
"language": "python",
"description": "查询重写 Mixin包含查询改写、实体补全、专业术语映射",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QueryRewriteMixin",
"type": "class",
"name": "QueryRewriteMixin",
"path": "core/agentic_query.py",
"line_start": 15,
"description": "查询重写方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py:QueryRewriteMixin._rewrite_query",
"type": "method",
"name": "_rewrite_query",
"path": "core/agentic_query.py",
"line_start": 18,
"description": "增强版查询重写,将口语化表达转为专业术语",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py:QueryRewriteMixin._apply_professional_mapping",
"type": "method",
"name": "_apply_professional_mapping",
"path": "core/agentic_query.py",
"line_start": 54,
"description": "应用口语化到专业术语映射",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py:QueryRewriteMixin._complete_entities",
"type": "method",
"name": "_complete_entities",
"path": "core/agentic_query.py",
"line_start": 81,
"description": "实体补全,利用对话历史补充缺失的实体",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py:QueryRewriteMixin._detect_image_reference",
"type": "method",
"name": "_detect_image_reference",
"path": "core/agentic_query.py",
"line_start": 123,
"description": "检测图片指代查询并重写",
"complexity": "moderate"
},
{
"id": "file:core/agentic_query.py:QueryRewriteMixin._llm_rewrite",
"type": "method",
"name": "_llm_rewrite",
"path": "core/agentic_query.py",
"line_start": 252,
"description": "LLM 深度重写查询",
"complexity": "moderate"
},
{
"id": "file:core/agentic_search.py",
"type": "file",
"name": "agentic_search.py",
"path": "core/agentic_search.py",
"language": "python",
"description": "检索 Mixin包含知识库检索、网络搜索、图谱检索",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:SearchMixin",
"type": "class",
"name": "SearchMixin",
"path": "core/agentic_search.py",
"line_start": 19,
"description": "检索功能方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_search.py:SearchMixin._graph_search",
"type": "method",
"name": "_graph_search",
"path": "core/agentic_search.py",
"line_start": 22,
"description": "执行图谱检索",
"complexity": "moderate"
},
{
"id": "file:core/agentic_search.py:SearchMixin._web_search",
"type": "method",
"name": "_web_search",
"path": "core/agentic_search.py",
"line_start": 56,
"description": "网络搜索(使用 Serper API",
"complexity": "moderate"
},
{
"id": "file:core/agentic_search.py:SearchMixin._web_search_flow",
"type": "method",
"name": "_web_search_flow",
"path": "core/agentic_search.py",
"line_start": 105,
"description": "网络搜索流程",
"complexity": "moderate"
},
{
"id": "file:core/agentic_search.py:SearchMixin._is_kb_result_sufficient",
"type": "method",
"name": "_is_kb_result_sufficient",
"path": "core/agentic_search.py",
"line_start": 158,
"description": "判断知识库检索结果是否充分",
"complexity": "moderate"
},
{
"id": "file:core/agentic_answer.py",
"type": "file",
"name": "agentic_answer.py",
"path": "core/agentic_answer.py",
"language": "python",
"description": "答案生成 Mixin包含答案生成、上下文构建、融合回答",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AnswerMixin",
"type": "class",
"name": "AnswerMixin",
"path": "core/agentic_answer.py",
"line_start": 15,
"description": "答案生成方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_answer.py:AnswerMixin._generate_fused_answer",
"type": "method",
"name": "_generate_fused_answer",
"path": "core/agentic_answer.py",
"line_start": 18,
"description": "生成融合答案,智能处理多源信息",
"complexity": "moderate"
},
{
"id": "file:core/agentic_answer.py:AnswerMixin._build_context_string",
"type": "method",
"name": "_build_context_string",
"path": "core/agentic_answer.py",
"line_start": 40,
"description": "构建上下文字符串FAQ 优先策略",
"complexity": "moderate"
},
{
"id": "file:core/agentic_answer.py:AnswerMixin._verify_and_refine_answer",
"type": "method",
"name": "_verify_and_refine_answer",
"path": "core/agentic_answer.py",
"line_start": 163,
"description": "验证并精炼答案,防止幻觉",
"complexity": "moderate"
},
{
"id": "file:core/agentic_answer.py:AnswerMixin._direct_answer",
"type": "method",
"name": "_direct_answer",
"path": "core/agentic_answer.py",
"line_start": 221,
"description": "直接使用 LLM 回答(无知识库检索)",
"complexity": "moderate"
},
{
"id": "file:core/agentic_citation.py",
"type": "file",
"name": "agentic_citation.py",
"path": "core/agentic_citation.py",
"language": "python",
"description": "引用处理 Mixin包含来源提取、引用构建",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:CitationMixin",
"type": "class",
"name": "CitationMixin",
"path": "core/agentic_citation.py",
"line_start": 15,
"description": "引用处理方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_citation.py:CitationMixin._extract_sources",
"type": "method",
"name": "_extract_sources",
"path": "core/agentic_citation.py",
"line_start": 18,
"description": "提取来源列表,返回结构化定位信息",
"complexity": "moderate"
},
{
"id": "file:core/agentic_citation.py:CitationMixin._build_citation",
"type": "method",
"name": "_build_citation",
"path": "core/agentic_citation.py",
"line_start": 163,
"description": "根据文档类型构建定位信息",
"complexity": "moderate"
},
{
"id": "file:core/agentic_citation.py:CitationMixin._attach_citations",
"type": "method",
"name": "_attach_citations",
"path": "core/agentic_citation.py",
"line_start": 217,
"description": "将引用信息附加到答案",
"complexity": "moderate"
},
{
"id": "file:core/agentic_media.py",
"type": "file",
"name": "agentic_media.py",
"path": "core/agentic_media.py",
"language": "python",
"description": "富媒体处理 Mixin包含图表查找、图片提取",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:RichMediaMixin",
"type": "class",
"name": "RichMediaMixin",
"path": "core/agentic_media.py",
"line_start": 16,
"description": "富媒体处理方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_media.py:RichMediaMixin._find_figure",
"type": "method",
"name": "_find_figure",
"path": "core/agentic_media.py",
"line_start": 19,
"description": "精确查找图表,带 fallback",
"complexity": "moderate"
},
{
"id": "file:core/agentic_media.py:RichMediaMixin._get_images_for_source",
"type": "method",
"name": "_get_images_for_source",
"path": "core/agentic_media.py",
"line_start": 93,
"description": "从向量库获取指定文件的所有图片",
"complexity": "moderate"
},
{
"id": "file:core/agentic_media.py:RichMediaMixin._extract_rich_media",
"type": "method",
"name": "_extract_rich_media",
"path": "core/agentic_media.py",
"line_start": 143,
"description": "从检索结果中提取富媒体(图片、表格)",
"complexity": "moderate"
},
{
"id": "file:core/agentic_quality.py",
"type": "file",
"name": "agentic_quality.py",
"path": "core/agentic_quality.py",
"language": "python",
"description": "质量评估 Mixin包含置信度门控、质量评估、推理反思",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QualityMixin",
"type": "class",
"name": "QualityMixin",
"path": "core/agentic_quality.py",
"line_start": 14,
"description": "质量评估方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_quality.py:QualityMixin._need_graph_search",
"type": "method",
"name": "_need_graph_search",
"path": "core/agentic_quality.py",
"line_start": 17,
"description": "判断是否需要图谱检索",
"complexity": "moderate"
},
{
"id": "file:core/agentic_quality.py:QualityMixin._check_confidence_gate",
"type": "method",
"name": "_check_confidence_gate",
"path": "core/agentic_quality.py",
"line_start": 39,
"description": "检查置信度门控",
"complexity": "moderate"
},
{
"id": "file:core/agentic_quality.py:QualityMixin._assess_quality",
"type": "method",
"name": "_assess_quality",
"path": "core/agentic_quality.py",
"line_start": 51,
"description": "多维质量评估",
"complexity": "moderate"
},
{
"id": "file:core/agentic_quality.py:QualityMixin._think",
"type": "method",
"name": "_think",
"path": "core/agentic_quality.py",
"line_start": 77,
"description": "Agent 思考:决定下一步行动",
"complexity": "moderate"
},
{
"id": "file:core/agentic_context.py",
"type": "file",
"name": "agentic_context.py",
"path": "core/agentic_context.py",
"language": "python",
"description": "上下文处理 Mixin包含上下文压缩、去重、Token 控制",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ContextMixin",
"type": "class",
"name": "ContextMixin",
"path": "core/agentic_context.py",
"line_start": 14,
"description": "上下文处理方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_context.py:ContextMixin._compress_contexts",
"type": "method",
"name": "_compress_contexts",
"path": "core/agentic_context.py",
"line_start": 17,
"description": "上下文压缩三步走Rerank 过滤 → 去重 → Token 控制",
"complexity": "moderate"
},
{
"id": "file:core/agentic_context.py:ContextMixin._rerank_filter",
"type": "method",
"name": "_rerank_filter",
"path": "core/agentic_context.py",
"line_start": 33,
"description": "Rerank 过滤,保留相关性分数 >= 阈值的上下文",
"complexity": "moderate"
},
{
"id": "file:core/agentic_context.py:ContextMixin._deduplicate_contexts",
"type": "method",
"name": "_deduplicate_contexts",
"path": "core/agentic_context.py",
"line_start": 43,
"description": "去重,基于内容相似度去重",
"complexity": "moderate"
},
{
"id": "file:core/agentic_context.py:ContextMixin._truncate_to_tokens",
"type": "method",
"name": "_truncate_to_tokens",
"path": "core/agentic_context.py",
"line_start": 67,
"description": "Token 控制,截断到最大 Token 数",
"complexity": "moderate"
},
{
"id": "file:core/agentic_meta.py",
"type": "file",
"name": "agentic_meta.py",
"path": "core/agentic_meta.py",
"language": "python",
"description": "元问题处理 Mixin包含元问题判断和知识库元数据回答",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:MetaQuestionMixin",
"type": "class",
"name": "MetaQuestionMixin",
"path": "core/agentic_meta.py",
"line_start": 14,
"description": "元问题处理方法 Mixin",
"complexity": "moderate"
},
{
"id": "file:core/agentic_meta.py:MetaQuestionMixin._is_meta_question",
"type": "method",
"name": "_is_meta_question",
"path": "core/agentic_meta.py",
"line_start": 17,
"description": "判断是否为元问题(关于知识库本身的问题)",
"complexity": "moderate"
},
{
"id": "file:core/agentic_meta.py:MetaQuestionMixin._answer_meta_question",
"type": "method",
"name": "_answer_meta_question",
"path": "core/agentic_meta.py",
"line_start": 37,
"description": "回答元问题(关于知识库本身的问题)",
"complexity": "moderate"
},
{
"id": "file:core/constants.py",
"type": "file",
"name": "constants.py",
"path": "core/constants.py",
"language": "python",
"description": "公共常量定义,统一管理 RAG 系统中的常量值",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_empty_result",
"type": "function",
"name": "get_empty_result",
"path": "core/constants.py",
"line_start": 28,
"description": "返回空检索结果的深拷贝,避免副作用",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_empty_result_flat",
"type": "function",
"name": "get_empty_result_flat",
"path": "core/constants.py",
"line_start": 33,
"description": "返回扁平空检索结果的深拷贝",
"complexity": "moderate"
},
{
"id": "file:core/query_classifier.py",
"type": "file",
"name": "query_classifier.py",
"path": "core/query_classifier.py",
"language": "python",
"description": "查询分类器,分层查询分类与检索配置生成",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QueryType",
"type": "class",
"name": "QueryType",
"path": "core/query_classifier.py",
"line_start": 25,
"description": "查询类型枚举META, REALTIME, SIMPLE, FACT, ENUMERATION 等)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ClassifiedQuery",
"type": "class",
"name": "ClassifiedQuery",
"path": "core/query_classifier.py",
"line_start": 38,
"description": "分类后的查询结果数据类",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QueryClassifier",
"type": "class",
"name": "QueryClassifier",
"path": "core/query_classifier.py",
"line_start": 66,
"description": "分层查询分类器",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:classify_query",
"type": "function",
"name": "classify_query",
"path": "core/query_classifier.py",
"line_start": 487,
"description": "便捷函数:分类查询",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:is_enumeration_query",
"type": "function",
"name": "is_enumeration_query",
"path": "core/query_classifier.py",
"line_start": 502,
"description": "判断是否为枚举/清单类问题",
"complexity": "moderate"
},
{
"id": "file:core/llm_utils.py",
"type": "file",
"name": "llm_utils.py",
"path": "core/llm_utils.py",
"language": "python",
"description": "LLM 调用工具函数,统一管理 LLM 调用",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:call_llm",
"type": "function",
"name": "call_llm",
"path": "core/llm_utils.py",
"line_start": 15,
"description": "统一的 LLM 调用函数",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:call_llm_stream",
"type": "function",
"name": "call_llm_stream",
"path": "core/llm_utils.py",
"line_start": 79,
"description": "流式 LLM 调用",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:call_llm_with_retry",
"type": "function",
"name": "call_llm_with_retry",
"path": "core/llm_utils.py",
"line_start": 133,
"description": "带重试的 LLM 调用",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:parse_json_from_response",
"type": "function",
"name": "parse_json_from_response",
"path": "core/llm_utils.py",
"line_start": 170,
"description": "从响应中解析 JSON",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:quick_ask",
"type": "function",
"name": "quick_ask",
"path": "core/llm_utils.py",
"line_start": 228,
"description": "快速问答",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:quick_yes_no",
"type": "function",
"name": "quick_yes_no",
"path": "core/llm_utils.py",
"line_start": 250,
"description": "快速是/否判断",
"complexity": "moderate"
},
{
"id": "file:core/llm_budget.py",
"type": "file",
"name": "llm_budget.py",
"path": "core/llm_budget.py",
"language": "python",
"description": "LLM 预算控制,管理调用频率和成本",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:CallType",
"type": "class",
"name": "CallType",
"path": "core/llm_budget.py",
"line_start": 23,
"description": "调用类型枚举",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:LLMBudgetController",
"type": "class",
"name": "LLMBudgetController",
"path": "core/llm_budget.py",
"line_start": 54,
"description": "LLM 预算控制器",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_budget_controller",
"type": "function",
"name": "get_budget_controller",
"path": "core/llm_budget.py",
"line_start": 212,
"description": "获取预算控制器实例",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:should_use_agent",
"type": "function",
"name": "should_use_agent",
"path": "core/llm_budget.py",
"line_start": 242,
"description": "判断是否应该使用 Agent 模式",
"complexity": "moderate"
},
{
"id": "file:core/cache.py",
"type": "file",
"name": "cache.py",
"path": "core/cache.py",
"language": "python",
"description": "缓存管理LRU 缓存和 RAG 缓存管理器",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:LRUCache",
"type": "class",
"name": "LRUCache",
"path": "core/cache.py",
"line_start": 52,
"description": "LRU 缓存实现",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:RAGCacheManager",
"type": "class",
"name": "RAGCacheManager",
"path": "core/cache.py",
"line_start": 137,
"description": "RAG 缓存管理器",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_cache_manager",
"type": "function",
"name": "get_cache_manager",
"path": "core/cache.py",
"line_start": 364,
"description": "获取缓存管理器实例",
"complexity": "moderate"
},
{
"id": "file:core/confidence_gate.py",
"type": "file",
"name": "confidence_gate.py",
"path": "core/confidence_gate.py",
"language": "python",
"description": "置信度门控,判断检索结果是否足够",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:GateAction",
"type": "class",
"name": "GateAction",
"path": "core/confidence_gate.py",
"line_start": 30,
"description": "门控动作枚举",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:ConfidenceGate",
"type": "class",
"name": "ConfidenceGate",
"path": "core/confidence_gate.py",
"line_start": 50,
"description": "置信度门控类",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:create_gate",
"type": "function",
"name": "create_gate",
"path": "core/confidence_gate.py",
"line_start": 279,
"description": "创建置信度门控实例",
"complexity": "moderate"
},
{
"id": "file:core/loop_guard.py",
"type": "file",
"name": "loop_guard.py",
"path": "core/loop_guard.py",
"language": "python",
"description": "循环保护,防止无限迭代",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:GuardDecision",
"type": "class",
"name": "GuardDecision",
"path": "core/loop_guard.py",
"line_start": 30,
"description": "保护决策枚举",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:LoopGuard",
"type": "class",
"name": "LoopGuard",
"path": "core/loop_guard.py",
"line_start": 60,
"description": "循环保护类",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:create_guard",
"type": "function",
"name": "create_guard",
"path": "core/loop_guard.py",
"line_start": 307,
"description": "创建循环保护实例",
"complexity": "moderate"
},
{
"id": "file:core/mmr.py",
"type": "file",
"name": "mmr.py",
"path": "core/mmr.py",
"language": "python",
"description": "MMR最大边际相关性重排序用于去重和多样性",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:cosine_similarity",
"type": "function",
"name": "cosine_similarity",
"path": "core/query_expansion.py",
"description": "计算余弦相似度",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:mmr_rerank",
"type": "function",
"name": "mmr_rerank",
"path": "core/mmr.py",
"line_start": 30,
"description": "MMR 重排序",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:mmr_filter_by_content",
"type": "function",
"name": "mmr_filter_by_content",
"path": "core/mmr.py",
"line_start": 111,
"description": "基于内容的 MMR 过滤",
"complexity": "moderate"
},
{
"id": "file:core/quality_assessor.py",
"type": "file",
"name": "quality_assessor.py",
"path": "core/quality_assessor.py",
"language": "python",
"description": "质量评估器,多维度评估检索结果质量",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QualityDimension",
"type": "class",
"name": "QualityDimension",
"path": "core/quality_assessor.py",
"line_start": 32,
"description": "质量维度枚举",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:QualityAssessor",
"type": "class",
"name": "QualityAssessor",
"path": "core/quality_assessor.py",
"line_start": 62,
"description": "质量评估器类",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:create_assessor",
"type": "function",
"name": "create_assessor",
"path": "core/quality_assessor.py",
"line_start": 481,
"description": "创建质量评估器实例",
"complexity": "moderate"
},
{
"id": "file:core/intent_analyzer.py",
"type": "file",
"name": "intent_analyzer.py",
"path": "core/intent_analyzer.py",
"language": "python",
"description": "意图分析器,分析用户查询意图",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:IntentAnalysis",
"type": "class",
"name": "IntentAnalysis",
"path": "core/intent_analyzer.py",
"line_start": 30,
"description": "意图分析结果数据类",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:IntentAnalyzer",
"type": "class",
"name": "IntentAnalyzer",
"path": "core/intent_analyzer.py",
"line_start": 69,
"description": "意图分析器类",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_intent_analyzer",
"type": "function",
"name": "get_intent_analyzer",
"path": "core/intent_analyzer.py",
"line_start": 465,
"description": "获取意图分析器实例",
"complexity": "moderate"
},
{
"id": "file:core/adaptive_topk.py",
"type": "file",
"name": "adaptive_topk.py",
"path": "core/adaptive_topk.py",
"language": "python",
"description": "自适应 TopK根据查询复杂度动态调整检索数量",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AdaptiveConfig",
"type": "class",
"name": "AdaptiveConfig",
"path": "core/adaptive_topk.py",
"line_start": 24,
"description": "自适应配置数据类",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AdaptiveTopK",
"type": "class",
"name": "AdaptiveTopK",
"path": "core/adaptive_topk.py",
"line_start": 42,
"description": "自适应 TopK 类",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:AdaptiveTopKWithStats",
"type": "class",
"name": "AdaptiveTopKWithStats",
"path": "core/adaptive_topk.py",
"line_start": 140,
"description": "带统计的自适应 TopK 类",
"complexity": "moderate"
},
{
"id": "file:dev-ui/index.html",
"type": "file",
"name": "index.html",
"path": "dev-ui/index.html",
"language": "html",
"description": "应用入口 HTML 文件,挂载 Vue 应用到 #app",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/request.js",
"type": "file",
"name": "request.js",
"path": "dev-ui/src/api/request.js",
"language": "javascript",
"description": "Axios 请求实例配置,包含认证拦截器和响应解包逻辑",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/auth.js",
"type": "file",
"name": "auth.js",
"path": "dev-ui/src/api/auth.js",
"language": "javascript",
"description": "认证相关 API登录、用户信息、用户管理、密码修改",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/chat.js",
"type": "file",
"name": "chat.js",
"path": "dev-ui/src/api/chat.js",
"language": "javascript",
"description": "聊天和 RAG 相关 API普通聊天、搜索、知识库路由、SSE 流式问答",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/document.js",
"type": "file",
"name": "document.js",
"path": "dev-ui/src/api/document.js",
"language": "javascript",
"description": "文档管理 API上传、删除、切片操作、预览 URL 生成",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/kb.js",
"type": "file",
"name": "kb.js",
"path": "dev-ui/src/api/kb.js",
"language": "javascript",
"description": "知识库管理 API集合 CRUD、文档同步、废弃/恢复、重新索引",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/sync.js",
"type": "file",
"name": "sync.js",
"path": "dev-ui/src/api/sync.js",
"language": "javascript",
"description": "同步服务 API状态查询、触发同步、变更历史、监控启停",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/audit.js",
"type": "file",
"name": "audit.js",
"path": "dev-ui/src/api/audit.js",
"language": "javascript",
"description": "审计日志 API查询操作日志",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/feedback.js",
"type": "file",
"name": "feedback.js",
"path": "dev-ui/src/api/feedback.js",
"language": "javascript",
"description": "反馈与 FAQ API提交反馈、统计、黑名单、FAQ 管理",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/session.js",
"type": "file",
"name": "session.js",
"path": "dev-ui/src/api/session.js",
"language": "javascript",
"description": "会话管理 API获取会话列表、历史记录、删除和清空",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/image.js",
"type": "file",
"name": "image.js",
"path": "dev-ui/src/api/image.js",
"language": "javascript",
"description": "图片管理 API图片列表、统计、详情",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/api/exam.js",
"type": "file",
"name": "exam.js",
"path": "dev-ui/src/api/exam.js",
"language": "javascript",
"description": "出题系统 API生成题目、批改答案、健康检查",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/composables/useTheme.js",
"type": "file",
"name": "useTheme.js",
"path": "dev-ui/src/composables/useTheme.js",
"language": "javascript",
"description": "主题切换 Composable基于 app store 管理明暗主题",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/composables/useMarkdown.js",
"type": "file",
"name": "useMarkdown.js",
"path": "dev-ui/src/composables/useMarkdown.js",
"language": "javascript",
"description": "Markdown 渲染 Composable支持 KaTeX 公式和代码高亮",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/composables/useSSE.js",
"type": "file",
"name": "useSSE.js",
"path": "dev-ui/src/composables/useSSE.js",
"language": "javascript",
"description": "SSE 流式请求 Composable支持中断和错误处理",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/layouts/MainLayout.vue",
"type": "component",
"name": "MainLayout",
"path": "dev-ui/src/layouts/MainLayout.vue",
"description": "主布局组件,包含侧边导航和内容区域",
"metadata": {
"language": "vue",
"kind": "layout",
"referenced_by": [
"router"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/FileViewer.vue",
"type": "file",
"name": "FileViewer.vue",
"path": "dev-ui/src/components/FileViewer.vue",
"language": "vue",
"description": "文件预览容器,根据文件扩展名动态选择对应查看器组件",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/ChunkDocumentView.vue",
"type": "file",
"name": "ChunkDocumentView.vue",
"path": "dev-ui/src/components/ChunkDocumentView.vue",
"language": "vue",
"description": "文档切片视图组件,支持切片选择、合并、编辑、删除操作",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/PdfViewer.vue",
"type": "file",
"name": "PdfViewer.vue",
"path": "dev-ui/src/components/viewers/PdfViewer.vue",
"language": "vue",
"description": "PDF 文件查看器,支持翻页、缩放、适应宽度",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/DocxViewer.vue",
"type": "file",
"name": "DocxViewer.vue",
"path": "dev-ui/src/components/viewers/DocxViewer.vue",
"language": "vue",
"description": "Word 文档查看器,使用 mammoth 库转换为 HTML",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/ExcelViewer.vue",
"type": "file",
"name": "ExcelViewer.vue",
"path": "dev-ui/src/components/viewers/ExcelViewer.vue",
"language": "vue",
"description": "Excel 表格查看器,使用 xlsx 库解析并展示为数据表",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/TextViewer.vue",
"type": "file",
"name": "TextViewer.vue",
"path": "dev-ui/src/components/viewers/TextViewer.vue",
"language": "vue",
"description": "纯文本文件查看器,支持 txt/csv/json/log 等格式",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/MarkdownViewer.vue",
"type": "file",
"name": "MarkdownViewer.vue",
"path": "dev-ui/src/components/viewers/MarkdownViewer.vue",
"language": "vue",
"description": "Markdown 文件查看器,渲染为 HTML 并支持公式",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/viewers/ImageViewer.vue",
"type": "file",
"name": "ImageViewer.vue",
"path": "dev-ui/src/components/viewers/ImageViewer.vue",
"language": "vue",
"description": "图片查看器,支持缩放和适应操作",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/request.js:request",
"type": "function",
"name": "request",
"path": "dev-ui/src/api/request.js",
"line": 1,
"description": "Axios 实例,配置了 baseURL、超时、认证拦截器和响应解包",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:login",
"type": "function",
"name": "login",
"path": "dev-ui/src/api/auth.js",
"line": 3,
"description": "用户登录接口",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:getMe",
"type": "function",
"name": "getMe",
"path": "dev-ui/src/api/auth.js",
"line": 6,
"description": "获取当前用户信息",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:getUsers",
"type": "function",
"name": "getUsers",
"path": "dev-ui/src/api/auth.js",
"line": 9,
"description": "获取用户列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:updateUser",
"type": "function",
"name": "updateUser",
"path": "dev-ui/src/api/auth.js",
"line": 12,
"description": "更新用户信息",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:changePassword",
"type": "function",
"name": "changePassword",
"path": "dev-ui/src/api/auth.js",
"line": 15,
"description": "修改密码",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:getStats",
"type": "function",
"name": "getStats",
"path": "dev-ui/src/api/auth.js",
"line": 18,
"description": "获取系统统计",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/auth.js:getHealth",
"type": "function",
"name": "getHealth",
"path": "dev-ui/src/api/auth.js",
"line": 21,
"description": "健康检查",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/chat.js:sendChat",
"type": "function",
"name": "sendChat",
"path": "dev-ui/src/api/chat.js",
"line": 3,
"description": "发送普通聊天消息",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/chat.js:sendSearch",
"type": "function",
"name": "sendSearch",
"path": "dev-ui/src/api/chat.js",
"line": 6,
"description": "执行混合检索",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/chat.js:testKbRoute",
"type": "function",
"name": "testKbRoute",
"path": "dev-ui/src/api/chat.js",
"line": 9,
"description": "测试知识库路由",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/chat.js:sendRagStream",
"type": "function",
"name": "sendRagStream",
"path": "dev-ui/src/api/chat.js",
"line": 13,
"description": "SSE 流式 RAG 问答请求",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:getDocuments",
"type": "function",
"name": "getDocuments",
"path": "dev-ui/src/api/document.js",
"line": 3,
"description": "获取文档列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:uploadDocument",
"type": "function",
"name": "uploadDocument",
"path": "dev-ui/src/api/document.js",
"line": 6,
"description": "上传单个文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:batchUploadDocuments",
"type": "function",
"name": "batchUploadDocuments",
"path": "dev-ui/src/api/document.js",
"line": 13,
"description": "批量上传文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:getDocumentStatus",
"type": "function",
"name": "getDocumentStatus",
"path": "dev-ui/src/api/document.js",
"line": 20,
"description": "获取文档状态",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:updateDocument",
"type": "function",
"name": "updateDocument",
"path": "dev-ui/src/api/document.js",
"line": 23,
"description": "更新文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:deleteDocument",
"type": "function",
"name": "deleteDocument",
"path": "dev-ui/src/api/document.js",
"line": 29,
"description": "删除文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:getDocumentChunks",
"type": "function",
"name": "getDocumentChunks",
"path": "dev-ui/src/api/document.js",
"line": 32,
"description": "获取文档切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:createChunk",
"type": "function",
"name": "createChunk",
"path": "dev-ui/src/api/document.js",
"line": 35,
"description": "创建切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:updateChunk",
"type": "function",
"name": "updateChunk",
"path": "dev-ui/src/api/document.js",
"line": 38,
"description": "更新切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:deleteChunk",
"type": "function",
"name": "deleteChunk",
"path": "dev-ui/src/api/document.js",
"line": 41,
"description": "删除切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:deleteChunksBySource",
"type": "function",
"name": "deleteChunksBySource",
"path": "dev-ui/src/api/document.js",
"line": 44,
"description": "按来源批量删除切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/document.js:getDocumentRawUrl",
"type": "function",
"name": "getDocumentRawUrl",
"path": "dev-ui/src/api/document.js",
"line": 48,
"description": "生成文档预览 URL",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:getCollections",
"type": "function",
"name": "getCollections",
"path": "dev-ui/src/api/kb.js",
"line": 3,
"description": "获取知识库集合列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:createCollection",
"type": "function",
"name": "createCollection",
"path": "dev-ui/src/api/kb.js",
"line": 6,
"description": "创建知识库集合",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:updateCollection",
"type": "function",
"name": "updateCollection",
"path": "dev-ui/src/api/kb.js",
"line": 9,
"description": "更新知识库集合",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:deleteCollection",
"type": "function",
"name": "deleteCollection",
"path": "dev-ui/src/api/kb.js",
"line": 12,
"description": "删除知识库集合",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:getCollectionDocuments",
"type": "function",
"name": "getCollectionDocuments",
"path": "dev-ui/src/api/kb.js",
"line": 15,
"description": "获取集合下的文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:getCollectionChunks",
"type": "function",
"name": "getCollectionChunks",
"path": "dev-ui/src/api/kb.js",
"line": 18,
"description": "获取集合下的切片",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:syncDocuments",
"type": "function",
"name": "syncDocuments",
"path": "dev-ui/src/api/kb.js",
"line": 21,
"description": "同步文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:deprecateDocument",
"type": "function",
"name": "deprecateDocument",
"path": "dev-ui/src/api/kb.js",
"line": 24,
"description": "废弃文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:restoreDocument",
"type": "function",
"name": "restoreDocument",
"path": "dev-ui/src/api/kb.js",
"line": 27,
"description": "恢复文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:getDocumentVersions",
"type": "function",
"name": "getDocumentVersions",
"path": "dev-ui/src/api/kb.js",
"line": 30,
"description": "获取文档版本历史",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:updateImageDescriptions",
"type": "function",
"name": "updateImageDescriptions",
"path": "dev-ui/src/api/kb.js",
"line": 33,
"description": "更新图片描述",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:reindexCollection",
"type": "function",
"name": "reindexCollection",
"path": "dev-ui/src/api/kb.js",
"line": 36,
"description": "重新索引集合",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/kb.js:syncVlmCache",
"type": "function",
"name": "syncVlmCache",
"path": "dev-ui/src/api/kb.js",
"line": 39,
"description": "同步 VLM 缓存",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:getSyncStatus",
"type": "function",
"name": "getSyncStatus",
"path": "dev-ui/src/api/sync.js",
"line": 3,
"description": "获取同步状态",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:triggerSync",
"type": "function",
"name": "triggerSync",
"path": "dev-ui/src/api/sync.js",
"line": 6,
"description": "触发同步",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:getSyncHistory",
"type": "function",
"name": "getSyncHistory",
"path": "dev-ui/src/api/sync.js",
"line": 9,
"description": "获取同步历史",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:getSyncChanges",
"type": "function",
"name": "getSyncChanges",
"path": "dev-ui/src/api/sync.js",
"line": 12,
"description": "获取同步变更",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:startSyncMonitor",
"type": "function",
"name": "startSyncMonitor",
"path": "dev-ui/src/api/sync.js",
"line": 15,
"description": "启动同步监控",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/sync.js:stopSyncMonitor",
"type": "function",
"name": "stopSyncMonitor",
"path": "dev-ui/src/api/sync.js",
"line": 18,
"description": "停止同步监控",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/audit.js:getAuditLogs",
"type": "function",
"name": "getAuditLogs",
"path": "dev-ui/src/api/audit.js",
"line": 3,
"description": "获取审计日志",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:submitFeedback",
"type": "function",
"name": "submitFeedback",
"path": "dev-ui/src/api/feedback.js",
"line": 3,
"description": "提交反馈",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getFeedbackStats",
"type": "function",
"name": "getFeedbackStats",
"path": "dev-ui/src/api/feedback.js",
"line": 6,
"description": "获取反馈统计",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getFeedbackList",
"type": "function",
"name": "getFeedbackList",
"path": "dev-ui/src/api/feedback.js",
"line": 9,
"description": "获取反馈列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getBadCases",
"type": "function",
"name": "getBadCases",
"path": "dev-ui/src/api/feedback.js",
"line": 12,
"description": "获取差评案例",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getBlacklist",
"type": "function",
"name": "getBlacklist",
"path": "dev-ui/src/api/feedback.js",
"line": 15,
"description": "获取黑名单",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getWeeklyReport",
"type": "function",
"name": "getWeeklyReport",
"path": "dev-ui/src/api/feedback.js",
"line": 18,
"description": "获取周报",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getMonthlyReport",
"type": "function",
"name": "getMonthlyReport",
"path": "dev-ui/src/api/feedback.js",
"line": 21,
"description": "获取月报",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getFaqs",
"type": "function",
"name": "getFaqs",
"path": "dev-ui/src/api/feedback.js",
"line": 25,
"description": "获取 FAQ 列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:createFaq",
"type": "function",
"name": "createFaq",
"path": "dev-ui/src/api/feedback.js",
"line": 28,
"description": "创建 FAQ",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:updateFaq",
"type": "function",
"name": "updateFaq",
"path": "dev-ui/src/api/feedback.js",
"line": 31,
"description": "更新 FAQ",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:deleteFaq",
"type": "function",
"name": "deleteFaq",
"path": "dev-ui/src/api/feedback.js",
"line": 34,
"description": "删除 FAQ",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:approveFaq",
"type": "function",
"name": "approveFaq",
"path": "dev-ui/src/api/feedback.js",
"line": 37,
"description": "批准 FAQ",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:getFaqSuggestions",
"type": "function",
"name": "getFaqSuggestions",
"path": "dev-ui/src/api/feedback.js",
"line": 40,
"description": "获取 FAQ 建议",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:approveFaqSuggestion",
"type": "function",
"name": "approveFaqSuggestion",
"path": "dev-ui/src/api/feedback.js",
"line": 43,
"description": "批准 FAQ 建议",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/feedback.js:rejectFaqSuggestion",
"type": "function",
"name": "rejectFaqSuggestion",
"path": "dev-ui/src/api/feedback.js",
"line": 46,
"description": "拒绝 FAQ 建议",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/session.js:getSessions",
"type": "function",
"name": "getSessions",
"path": "dev-ui/src/api/session.js",
"line": 3,
"description": "获取会话列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/session.js:getHistory",
"type": "function",
"name": "getHistory",
"path": "dev-ui/src/api/session.js",
"line": 6,
"description": "获取会话历史",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/session.js:deleteSession",
"type": "function",
"name": "deleteSession",
"path": "dev-ui/src/api/session.js",
"line": 9,
"description": "删除会话",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/session.js:clearSession",
"type": "function",
"name": "clearSession",
"path": "dev-ui/src/api/session.js",
"line": 12,
"description": "清空会话",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/image.js:getImageList",
"type": "function",
"name": "getImageList",
"path": "dev-ui/src/api/image.js",
"line": 3,
"description": "获取图片列表",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/image.js:getImageStats",
"type": "function",
"name": "getImageStats",
"path": "dev-ui/src/api/image.js",
"line": 6,
"description": "获取图片统计",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/image.js:getImageInfo",
"type": "function",
"name": "getImageInfo",
"path": "dev-ui/src/api/image.js",
"line": 9,
"description": "获取图片详情",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/exam.js:generateExam",
"type": "function",
"name": "generateExam",
"path": "dev-ui/src/api/exam.js",
"line": 3,
"description": "生成考试题目",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/exam.js:gradeExam",
"type": "function",
"name": "gradeExam",
"path": "dev-ui/src/api/exam.js",
"line": 6,
"description": "批改考试答案",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/api/exam.js:getExamHealth",
"type": "function",
"name": "getExamHealth",
"path": "dev-ui/src/api/exam.js",
"line": 9,
"description": "出题系统健康检查",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useTheme.js:useTheme",
"type": "function",
"name": "useTheme",
"path": "dev-ui/src/composables/useTheme.js",
"line": 5,
"description": "主题 Composable返回 theme、isDark、toggle",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useMarkdown.js:escapeHtml",
"type": "function",
"name": "escapeHtml",
"path": "dev-ui/src/composables/useMarkdown.js",
"line": 14,
"description": "HTML 转义函数",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useMarkdown.js:useMarkdown",
"type": "function",
"name": "useMarkdown",
"path": "dev-ui/src/composables/useMarkdown.js",
"line": 47,
"description": "Markdown Composable返回 render 函数",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useSSE.js:useSSE",
"type": "function",
"name": "useSSE",
"path": "dev-ui/src/composables/useSSE.js",
"line": 3,
"description": "SSE Composable返回 isStreaming、startStream、abort",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useSSE.js:startStream",
"type": "function",
"name": "startStream",
"path": "dev-ui/src/composables/useSSE.js",
"line": 8,
"description": "启动 SSE 流式请求",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/composables/useSSE.js:abort",
"type": "function",
"name": "abort",
"path": "dev-ui/src/composables/useSSE.js",
"line": 62,
"description": "中止 SSE 流式请求",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/layouts/MainLayout.vue:renderIcon",
"type": "function",
"name": "renderIcon",
"path": "dev-ui/src/layouts/MainLayout.vue",
"line": 116,
"description": "渲染菜单图标的辅助函数",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/layouts/MainLayout.vue:handleMenuSelect",
"type": "function",
"name": "handleMenuSelect",
"path": "dev-ui/src/layouts/MainLayout.vue",
"line": 144,
"description": "处理菜单选择,跳转路由",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/layouts/MainLayout.vue:handleLogout",
"type": "function",
"name": "handleLogout",
"path": "dev-ui/src/layouts/MainLayout.vue",
"line": 149,
"description": "处理退出登录",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/FileViewer.vue:download",
"type": "function",
"name": "download",
"path": "dev-ui/src/components/FileViewer.vue",
"line": 51,
"description": "下载文件",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/ChunkDocumentView.vue:toggleSelect",
"type": "function",
"name": "toggleSelect",
"path": "dev-ui/src/components/ChunkDocumentView.vue",
"line": 66,
"description": "切换切片选择状态,支持 Ctrl 多选",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/PdfViewer.vue:loadPdf",
"type": "function",
"name": "loadPdf",
"path": "dev-ui/src/components/viewers/PdfViewer.vue",
"line": 38,
"description": "加载 PDF 文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/PdfViewer.vue:renderPage",
"type": "function",
"name": "renderPage",
"path": "dev-ui/src/components/viewers/PdfViewer.vue",
"line": 52,
"description": "渲染当前页",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/PdfViewer.vue:fitWidth",
"type": "function",
"name": "fitWidth",
"path": "dev-ui/src/components/viewers/PdfViewer.vue",
"line": 69,
"description": "适应宽度缩放",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/DocxViewer.vue:loadDocx",
"type": "function",
"name": "loadDocx",
"path": "dev-ui/src/components/viewers/DocxViewer.vue",
"line": 22,
"description": "加载并转换 Word 文档",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/ExcelViewer.vue:loadExcel",
"type": "function",
"name": "loadExcel",
"path": "dev-ui/src/components/viewers/ExcelViewer.vue",
"line": 28,
"description": "加载并解析 Excel 文件",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/TextViewer.vue:loadText",
"type": "function",
"name": "loadText",
"path": "dev-ui/src/components/viewers/TextViewer.vue",
"line": 20,
"description": "加载文本文件内容",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/MarkdownViewer.vue:loadMd",
"type": "function",
"name": "loadMd",
"path": "dev-ui/src/components/viewers/MarkdownViewer.vue",
"line": 22,
"description": "加载并渲染 Markdown 文件",
"complexity": "moderate"
},
{
"id": "function:dev-ui/src/components/viewers/ImageViewer.vue:fitImage",
"type": "function",
"name": "fitImage",
"path": "dev-ui/src/components/viewers/ImageViewer.vue",
"line": 25,
"description": "重置图片缩放",
"complexity": "moderate"
},
{
"id": "class:dev-ui/src/composables/useMarkdown.js:md",
"type": "class",
"name": "md",
"path": "dev-ui/src/composables/useMarkdown.js",
"line": 4,
"description": "MarkdownIt 实例,配置了 KaTeX 公式渲染",
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/main.js",
"type": "file",
"name": "main.js",
"path": "dev-ui/src/main.js",
"description": "Vue 应用入口文件,初始化 Pinia 状态管理、路由和 Naive UI 组件库",
"metadata": {
"language": "javascript",
"kind": "entry",
"framework": "vue3"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/router/index.js",
"type": "file",
"name": "router/index.js",
"path": "dev-ui/src/router/index.js",
"description": "Vue Router 配置文件,定义应用路由和导航守卫,包含认证检查逻辑",
"metadata": {
"language": "javascript",
"kind": "router",
"routes": [
"Login",
"Chat",
"KnowledgeBase",
"Documents",
"Sync",
"Feedback",
"Images",
"Audit",
"Exam",
"Settings"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/App.vue",
"type": "component",
"name": "App",
"path": "dev-ui/src/App.vue",
"description": "根组件,配置 Naive UI 主题、国际化Provider 和全局样式,响应暗色主题切换",
"metadata": {
"language": "vue",
"kind": "component",
"ui_framework": "naive-ui"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/app.js",
"type": "store",
"name": "useAppStore",
"path": "dev-ui/src/stores/app.js",
"description": "应用状态存储,管理主题切换(暗色/亮色)",
"metadata": {
"language": "javascript",
"kind": "store",
"state": [
"isDark"
],
"actions": [
"toggleTheme"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/auth.js",
"type": "store",
"name": "useAuthStore",
"path": "dev-ui/src/stores/auth.js",
"description": "认证状态存储,管理用户令牌、用户信息、登录状态和本地存储持久化",
"metadata": {
"language": "javascript",
"kind": "store",
"state": [
"token",
"user"
],
"getters": [
"isLoggedIn",
"isAdmin"
],
"actions": [
"setAuth",
"logout"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/chat.js",
"type": "store",
"name": "useChatStore",
"path": "dev-ui/src/stores/chat.js",
"description": "聊天状态存储,管理会话列表、消息记录、知识库选择和 RAG 流水线步骤",
"metadata": {
"language": "javascript",
"kind": "store",
"state": [
"sessions",
"currentSessionId",
"messages",
"collections",
"selectedCollections",
"mode",
"isStreaming",
"pipelineSteps"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/document.js",
"type": "store",
"name": "useDocumentStore",
"path": "dev-ui/src/stores/document.js",
"description": "文档状态存储(已不存在,可能在 batch 8 中)",
"metadata": {
"language": "javascript",
"kind": "store",
"status": "file_not_found"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/feedback.js",
"type": "store",
"name": "useFeedbackStore",
"path": "dev-ui/src/stores/feedback.js",
"description": "反馈状态存储(已不存在,可能在 batch 8 中)",
"metadata": {
"language": "javascript",
"kind": "store",
"status": "file_not_found"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/kb.js",
"type": "store",
"name": "useKbStore",
"path": "dev-ui/src/stores/kb.js",
"description": "知识库状态存储,管理向量库集合、当前选中集合、文档和切片列表",
"metadata": {
"language": "javascript",
"kind": "store",
"state": [
"collections",
"currentCollection",
"documents",
"chunks"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/stores/session.js",
"type": "store",
"name": "useSessionStore",
"path": "dev-ui/src/stores/session.js",
"description": "会话状态存储(已不存在,可能在 batch 8 中)",
"metadata": {
"language": "javascript",
"kind": "store",
"status": "file_not_found"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Chat.vue",
"type": "component",
"name": "Chat",
"path": "dev-ui/src/views/Chat.vue",
"description": "聊天主页面组件包含会话列表、消息展示、RAG 流水线可视化、流式输出、引用标注和图片预览功能",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"session_management",
"chat_messages",
"rag_pipeline",
"streaming",
"citations",
"image_preview",
"feedback"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Login.vue",
"type": "component",
"name": "Login",
"path": "dev-ui/src/views/Login.vue",
"description": "登录页面组件,包含用户名密码表单、后端健康检查和登录成功后跳转",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"login_form",
"health_check",
"redirect"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Settings.vue",
"type": "component",
"name": "Settings",
"path": "dev-ui/src/views/Settings.vue",
"description": "设置页面组件,包含用户管理表格、密码修改表单和系统统计信息展示",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"user_management",
"password_change",
"system_stats"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/KnowledgeBase.vue",
"type": "component",
"name": "KnowledgeBase",
"path": "dev-ui/src/views/KnowledgeBase.vue",
"description": "知识库管理页面组件,管理向量库集合的 CRUD、文档列表、切片查看编辑和批量操作",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"collection_crud",
"document_list",
"chunk_management",
"reindex",
"vlm_sync"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Documents.vue",
"type": "component",
"name": "Documents",
"path": "dev-ui/src/views/Documents.vue",
"description": "文档管理页面组件,支持文档上传、删除、状态查看、版本历史和文件预览",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"document_upload",
"document_status",
"version_history",
"file_preview",
"deprecate_restore"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Sync.vue",
"type": "component",
"name": "Sync",
"path": "dev-ui/src/views/Sync.vue",
"description": "同步服务管理页面,显示同步状态、触发手动同步、启停监控和查看变更日志",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"sync_status",
"manual_sync",
"monitor_control",
"change_log"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Feedback.vue",
"type": "component",
"name": "Feedback",
"path": "dev-ui/src/views/Feedback.vue",
"description": "反馈管理页面包含反馈列表、统计、FAQ 管理、FAQ 建议、差评分析和黑名单功能",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"feedback_list",
"statistics",
"faq_management",
"suggestions",
"bad_cases",
"blacklist",
"quality_reports"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Images.vue",
"type": "component",
"name": "Images",
"path": "dev-ui/src/views/Images.vue",
"description": "图片浏览页面,展示图片列表、统计信息和图片详情预览弹窗",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"image_gallery",
"image_stats",
"image_detail_modal"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Audit.vue",
"type": "component",
"name": "Audit",
"path": "dev-ui/src/views/Audit.vue",
"description": "审计日志页面,支持按操作类型、时间范围筛选和查看详细日志记录",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"audit_log_filter",
"audit_table"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/views/Exam.vue",
"type": "component",
"name": "Exam",
"path": "dev-ui/src/views/Exam.vue",
"description": "出题系统页面,支持按集合和文档生成题目、选择题型和难度、以及答案批改评分",
"metadata": {
"language": "vue",
"kind": "view",
"features": [
"question_generation",
"grade_answers",
"collection_selector",
"difficulty_slider"
]
},
"complexity": "moderate"
},
{
"id": "file:chat-ui/app.js",
"type": "file",
"name": "chat-ui/app.js",
"path": "chat-ui/app.js",
"description": "旧版 Chat UI 应用文件(配置选项与认证体系)",
"metadata": {
"language": "javascript",
"kind": "legacy",
"status": "minimal_content"
},
"complexity": "moderate"
},
{
"id": "file:chat-ui/api-test.js",
"type": "file",
"name": "chat-ui/api-test.js",
"path": "chat-ui/api-test.js",
"description": "API 测试文件(仅头部注释)",
"metadata": {
"language": "javascript",
"kind": "test",
"status": "minimal_content"
},
"complexity": "moderate"
},
{
"id": "file:chat-ui/exam.js",
"type": "file",
"name": "chat-ui/exam.js",
"path": "chat-ui/exam.js",
"description": "出题系统测试页面 JS 文件",
"metadata": {
"language": "javascript",
"kind": "legacy",
"status": "minimal_content"
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/composables/useSSE",
"type": "composable",
"name": "useSSE",
"path": "dev-ui/src/composables/useSSE.js",
"description": "SSE (Server-Sent Events) 组合式函数,处理流式响应",
"metadata": {
"language": "javascript",
"kind": "composable",
"referenced_by": [
"Chat.vue"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/composables/useMarkdown",
"type": "composable",
"name": "useMarkdown",
"path": "dev-ui/src/composables/useMarkdown.js",
"description": "Markdown 渲染组合式函数",
"metadata": {
"language": "javascript",
"kind": "composable",
"referenced_by": [
"Chat.vue"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/chat",
"type": "module",
"name": "api/chat",
"path": "dev-ui/src/api/chat.js",
"description": "聊天 API 模块,提供 sendChat 和 sendSearch 接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"sendChat",
"sendSearch"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/session",
"type": "module",
"name": "api/session",
"path": "dev-ui/src/api/session.js",
"description": "会话 API 模块,提供会话列表、历史记录和删除接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getSessions",
"getHistory",
"deleteSession"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/kb",
"type": "module",
"name": "api/kb",
"path": "dev-ui/src/api/kb.js",
"description": "知识库 API 模块,提供集合管理接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getCollections"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/document",
"type": "module",
"name": "api/document",
"path": "dev-ui/src/api/document.js",
"description": "文档 API 模块,提供文档列表接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getDocuments"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/feedback",
"type": "module",
"name": "api/feedback",
"path": "dev-ui/src/api/feedback.js",
"description": "反馈 API 模块,提供反馈提交和管理接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"submitFeedback",
"getFeedbackList",
"getFeedbackStats",
"getBadCases",
"getBlacklist",
"getWeeklyReport",
"getMonthlyReport",
"getFaqs",
"createFaq",
"updateFaq",
"deleteFaq",
"approveFaq",
"getFaqSuggestions",
"approveFaqSuggestion",
"rejectFaqSuggestion"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/auth",
"type": "module",
"name": "api/auth",
"path": "dev-ui/src/api/auth.js",
"description": "认证 API 模块,提供登录、用户列表、密码修改和健康检查接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"login",
"getHealth",
"getUsers",
"changePassword",
"getStats"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/sync",
"type": "module",
"name": "api/sync",
"path": "dev-ui/src/api/sync.js",
"description": "同步 API 模块,提供同步状态、触发同步、历史和监控接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getSyncStatus",
"triggerSync",
"getSyncHistory",
"getSyncChanges",
"startSyncMonitor",
"stopSyncMonitor"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/image",
"type": "module",
"name": "api/image",
"path": "dev-ui/src/api/image.js",
"description": "图片 API 模块,提供图片列表、统计和详情接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getImageList",
"getImageStats",
"getImageInfo"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/audit",
"type": "module",
"name": "api/audit",
"path": "dev-ui/src/api/audit.js",
"description": "审计日志 API 模块",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"getAuditLogs"
]
},
"complexity": "moderate"
},
{
"id": "module:dev-ui/src/api/exam",
"type": "module",
"name": "api/exam",
"path": "dev-ui/src/api/exam.js",
"description": "出题 API 模块,提供题目生成和批改接口",
"metadata": {
"language": "javascript",
"kind": "api_module",
"functions": [
"generateExam",
"gradeExam"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/ChunkDocumentView",
"type": "component",
"name": "ChunkDocumentView",
"path": "dev-ui/src/components/ChunkDocumentView.vue",
"description": "切片文档视图组件,以文档形式展示切片列表",
"metadata": {
"language": "vue",
"kind": "component",
"referenced_by": [
"KnowledgeBase.vue"
]
},
"complexity": "moderate"
},
{
"id": "file:dev-ui/src/components/FileViewer",
"type": "component",
"name": "FileViewer",
"path": "dev-ui/src/components/FileViewer.vue",
"description": "文件预览组件,支持多种文档格式的在线预览",
"metadata": {
"language": "vue",
"kind": "component",
"referenced_by": [
"Documents.vue"
]
},
"complexity": "moderate"
},
{
"id": "file:repositories/__init__.py",
"type": "file",
"name": "__init__.py",
"path": "repositories/__init__.py",
"description": "Repository 模块初始化,提供数据访问层抽象",
"complexity": "moderate"
},
{
"id": "file:repositories/session_repo.py",
"type": "file",
"name": "session_repo.py",
"path": "repositories/session_repo.py",
"description": "会话存储接口定义",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:BaseSessionRepo",
"type": "class",
"name": "BaseSessionRepo",
"path": "repositories/session_repo.py",
"description": "会话存储抽象基类,定义会话管理的标准接口",
"methods": [
"get_history",
"add_message",
"create_session",
"get_user_sessions"
],
"complexity": "moderate"
},
{
"id": "file:BaseSessionRepo.get_history",
"type": "method",
"name": "get_history",
"path": "repositories/session_repo.py",
"description": "获取会话历史记录",
"complexity": "moderate"
},
{
"id": "file:BaseSessionRepo.add_message",
"type": "method",
"name": "add_message",
"path": "repositories/session_repo.py",
"description": "添加消息到会话",
"complexity": "moderate"
},
{
"id": "file:BaseSessionRepo.create_session",
"type": "method",
"name": "create_session",
"path": "repositories/session_repo.py",
"description": "创建新会话",
"complexity": "moderate"
},
{
"id": "file:BaseSessionRepo.get_user_sessions",
"type": "method",
"name": "get_user_sessions",
"path": "repositories/session_repo.py",
"description": "获取用户的会话列表",
"complexity": "moderate"
},
{
"id": "file:core/query_expansion.py",
"type": "file",
"name": "query_expansion.py",
"path": "core/query_expansion.py",
"description": "查询扩展模块,扩展查询词提升召回率",
"complexity": "moderate"
},
{
"id": "file:DOMAIN_TERMS",
"type": "variable",
"name": "DOMAIN_TERMS",
"path": "core/query_expansion.py",
"description": "领域术语词典,包含报销、人事等业务术语映射",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_domain_terms",
"type": "function",
"name": "get_domain_terms",
"path": "core/query_expansion.py",
"description": "从领域词典获取扩展词",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:expand_query_safe",
"type": "function",
"name": "expand_query_safe",
"path": "core/query_expansion.py",
"description": "安全的查询扩展(带相似度过滤)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:expand_query_data_driven",
"type": "function",
"name": "expand_query_data_driven",
"path": "core/query_expansion.py",
"description": "数据驱动的查询扩展,从向量库查找相似查询",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:extract_keywords",
"type": "function",
"name": "extract_keywords",
"path": "core/query_expansion.py",
"description": "从文本中提取关键词",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:merge_expansion_results",
"type": "function",
"name": "merge_expansion_results",
"path": "core/query_expansion.py",
"description": "合并多个扩展查询的检索结果",
"complexity": "moderate"
},
{
"id": "file:storage/__init__.py",
"type": "file",
"name": "__init__.py",
"path": "storage/__init__.py",
"description": "存储模块初始化,提供统一的文件存储抽象层",
"complexity": "moderate"
},
{
"id": "file:services/__init__.py",
"type": "file",
"name": "__init__.py",
"path": "services/__init__.py",
"description": "业务服务模块初始化,包含会话管理、反馈、纲要生成",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:SessionManager",
"type": "class",
"name": "SessionManager",
"path": "services/session.py",
"description": "会话管理器(从 services.session 导入)",
"complexity": "moderate"
},
{
"id": "file:graph/graph_manager.py",
"type": "file",
"name": "graph_manager.py",
"path": "graph/graph_manager.py",
"description": "Neo4j 图谱管理模块,管理知识图谱的构建、查询和更新",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:Entity",
"type": "class",
"name": "Entity",
"path": "graph/graph_manager.py",
"description": "实体数据类,包含名称、类型和属性",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:Relation",
"type": "class",
"name": "Relation",
"path": "graph/graph_manager.py",
"description": "关系数据类,包含头实体、关系类型和尾实体",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:Triple",
"type": "class",
"name": "Triple",
"path": "graph/graph_manager.py",
"description": "三元组数据类 (头实体, 关系, 尾实体)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:GraphManager",
"type": "class",
"name": "GraphManager",
"path": "graph/graph_manager.py",
"description": "Neo4j 图谱管理器,管理知识图谱的构建、查询和更新",
"methods": [
"connect",
"close",
"create_entity",
"get_entity",
"delete_entity",
"create_relation",
"get_relations",
"build_from_triples",
"clear_graph",
"search_subgraph",
"get_entity_neighbors",
"search_by_relation",
"get_stats",
"_sanitize_relation_type"
],
"complexity": "moderate"
},
{
"id": "file:GraphManager.connect",
"type": "method",
"name": "connect",
"path": "graph/graph_manager.py",
"description": "连接 Neo4j 数据库",
"complexity": "moderate"
},
{
"id": "file:GraphManager.close",
"type": "method",
"name": "close",
"path": "graph/graph_manager.py",
"description": "关闭 Neo4j 连接",
"complexity": "moderate"
},
{
"id": "file:GraphManager.create_entity",
"type": "method",
"name": "create_entity",
"path": "graph/graph_manager.py",
"description": "创建实体节点",
"complexity": "moderate"
},
{
"id": "file:GraphManager.get_entity",
"type": "method",
"name": "get_entity",
"path": "graph/graph_manager.py",
"description": "获取实体信息",
"complexity": "moderate"
},
{
"id": "file:GraphManager.delete_entity",
"type": "method",
"name": "delete_entity",
"path": "graph/graph_manager.py",
"description": "删除实体及其关系",
"complexity": "moderate"
},
{
"id": "file:GraphManager.create_relation",
"type": "method",
"name": "create_relation",
"path": "graph/graph_manager.py",
"description": "创建关系",
"complexity": "moderate"
},
{
"id": "file:GraphManager.get_relations",
"type": "method",
"name": "get_relations",
"path": "graph/graph_manager.py",
"description": "获取实体的关系",
"complexity": "moderate"
},
{
"id": "file:GraphManager.build_from_triples",
"type": "method",
"name": "build_from_triples",
"path": "graph/graph_manager.py",
"description": "从三元组批量构建图谱",
"complexity": "moderate"
},
{
"id": "file:GraphManager.clear_graph",
"type": "method",
"name": "clear_graph",
"path": "graph/graph_manager.py",
"description": "清空整个图谱",
"complexity": "moderate"
},
{
"id": "file:GraphManager.search_subgraph",
"type": "method",
"name": "search_subgraph",
"path": "graph/graph_manager.py",
"description": "根据实体名称搜索子图,支持权限过滤",
"complexity": "moderate"
},
{
"id": "file:GraphManager.get_entity_neighbors",
"type": "method",
"name": "get_entity_neighbors",
"path": "graph/graph_manager.py",
"description": "获取实体的邻居节点",
"complexity": "moderate"
},
{
"id": "file:GraphManager.search_by_relation",
"type": "method",
"name": "search_by_relation",
"path": "graph/graph_manager.py",
"description": "按关系类型搜索",
"complexity": "moderate"
},
{
"id": "file:GraphManager.get_stats",
"type": "method",
"name": "get_stats",
"path": "graph/graph_manager.py",
"description": "获取图谱统计信息",
"complexity": "moderate"
},
{
"id": "file:GraphManager._sanitize_relation_type",
"type": "method",
"name": "_sanitize_relation_type",
"path": "graph/graph_manager.py",
"description": "将关系类型转换为 Neo4j 兼容格式",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_graph_manager",
"type": "function",
"name": "get_graph_manager",
"path": "graph/graph_manager.py",
"description": "获取图谱管理器实例的便捷函数",
"complexity": "moderate"
},
{
"id": "file:core/semantic_cache.py",
"type": "file",
"name": "semantic_cache.py",
"path": "core/semantic_cache.py",
"description": "语义缓存模块,使用 FAISS 向量索引实现高性能缓存",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:SemanticCache",
"type": "class",
"name": "SemanticCache",
"path": "core/semantic_cache.py",
"description": "语义缓存类,使用 FAISS 实现高性能向量检索",
"methods": [
"get",
"set",
"clear",
"get_stats",
"_get_faiss",
"_get_numpy",
"_set_faiss",
"_set_numpy",
"_normalize"
],
"complexity": "moderate"
},
{
"id": "file:SemanticCache.get",
"type": "method",
"name": "get",
"path": "core/semantic_cache.py",
"description": "查找语义缓存",
"complexity": "moderate"
},
{
"id": "file:SemanticCache.set",
"type": "method",
"name": "set",
"path": "core/semantic_cache.py",
"description": "存储到语义缓存",
"complexity": "moderate"
},
{
"id": "file:SemanticCache.clear",
"type": "method",
"name": "clear",
"path": "core/semantic_cache.py",
"description": "清空缓存",
"complexity": "moderate"
},
{
"id": "file:SemanticCache.get_stats",
"type": "method",
"name": "get_stats",
"path": "core/semantic_cache.py",
"description": "获取统计信息",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_semantic_cache",
"type": "function",
"name": "get_semantic_cache",
"path": "core/semantic_cache.py",
"description": "获取全局语义缓存实例",
"complexity": "moderate"
},
{
"id": "file:core/status_codes.py",
"type": "file",
"name": "status_codes.py",
"path": "core/status_codes.py",
"description": "统一的业务状态码定义",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_status_message",
"type": "function",
"name": "get_status_message",
"path": "core/status_codes.py",
"description": "根据状态码获取默认消息",
"complexity": "moderate"
},
{
"id": "file:knowledge/__init__.py",
"type": "file",
"name": "__init__.py",
"path": "knowledge/__init__.py",
"description": "知识库管理模块初始化",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:KnowledgeBaseManager",
"type": "class",
"name": "KnowledgeBaseManager",
"path": "knowledge/manager.py",
"description": "多向量库管理器(从 knowledge.manager 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:KnowledgeBaseRouter",
"type": "class",
"name": "KnowledgeBaseRouter",
"path": "knowledge/router.py",
"description": "知识库路由器(从 knowledge.router 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:KnowledgeSyncService",
"type": "class",
"name": "KnowledgeSyncService",
"path": "knowledge/sync.py",
"description": "知识库同步服务(从 knowledge.sync 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:CollectionInfo",
"type": "class",
"name": "CollectionInfo",
"path": "knowledge/base.py",
"description": "向量库信息类(从 knowledge.base 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:SearchResult",
"type": "class",
"name": "SearchResult",
"path": "knowledge/base.py",
"description": "检索结果类(从 knowledge.base 导入)",
"complexity": "moderate"
},
{
"id": "file:PUBLIC_KB_NAME",
"type": "variable",
"name": "PUBLIC_KB_NAME",
"path": "knowledge/base.py",
"description": "公开知识库名称常量(从 knowledge.base 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:FileProvider",
"type": "class",
"name": "FileProvider",
"path": "storage/file_provider.py",
"description": "文件提供者抽象类(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:FileInfo",
"type": "class",
"name": "FileInfo",
"path": "storage/file_provider.py",
"description": "文件信息类(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:LocalFileProvider",
"type": "class",
"name": "LocalFileProvider",
"path": "storage/file_provider.py",
"description": "本地文件提供者(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:SMBFileProvider",
"type": "class",
"name": "SMBFileProvider",
"path": "storage/file_provider.py",
"description": "SMB 文件提供者(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:S3FileProvider",
"type": "class",
"name": "S3FileProvider",
"path": "storage/file_provider.py",
"description": "S3 文件提供者(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:HttpFileProvider",
"type": "class",
"name": "HttpFileProvider",
"path": "storage/file_provider.py",
"description": "HTTP 文件提供者(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_file_provider",
"type": "function",
"name": "get_file_provider",
"path": "storage/file_provider.py",
"description": "获取文件提供者实例(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:reset_provider",
"type": "function",
"name": "reset_provider",
"path": "storage/file_provider.py",
"description": "重置文件提供者(从 storage.file_provider 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:get_file_for_parsing",
"type": "function",
"name": "get_file_for_parsing",
"path": "storage/file_fetcher.py",
"description": "获取文件用于解析(从 storage.file_fetcher 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:cleanup_temp_file",
"type": "function",
"name": "cleanup_temp_file",
"path": "storage/file_fetcher.py",
"description": "清理临时文件(从 storage.file_fetcher 导入)",
"complexity": "moderate"
},
{
"id": "class:__nofilepath__:FileFetcher",
"type": "class",
"name": "FileFetcher",
"path": "storage/file_fetcher.py",
"description": "文件获取器类(从 storage.file_fetcher 导入)",
"complexity": "moderate"
},
{
"id": "function:__nofilepath__:fetch_file",
"type": "function",
"name": "fetch_file",
"path": "storage/file_fetcher.py",
"description": "获取文件(从 storage.file_fetcher 导入)",
"complexity": "moderate"
},
{
"id": "module:repositories/__init__.py",
"type": "module",
"name": "repositories",
"filePath": "repositories/__init__.py",
"description": "Repository 模块初始化文件,提供数据访问层抽象,支持开发环境和生产环境的不同实现",
"symbols": [],
"complexity": "moderate"
},
{
"id": "module:repositories/session_repo.py",
"type": "module",
"name": "session_repo",
"filePath": "repositories/session_repo.py",
"description": "会话存储接口模块,定义会话管理的抽象接口",
"symbols": [
"BaseSessionRepo"
],
"complexity": "moderate"
},
{
"id": "class:repositories/session_repo.py:BaseSessionRepo",
"type": "class",
"name": "BaseSessionRepo",
"filePath": "repositories/session_repo.py",
"description": "会话存储抽象基类,定义会话管理的标准接口",
"methods": [
"get_history",
"add_message",
"create_session",
"get_user_sessions"
],
"isAbstract": true,
"complexity": "moderate"
},
{
"id": "module:repositories/stateless_session_repo.py",
"type": "module",
"name": "stateless_session_repo",
"filePath": "repositories/stateless_session_repo.py",
"description": "无状态会话存储实现(生产环境),不存储会话数据,历史由后端传入",
"symbols": [
"StatelessSessionRepo"
],
"complexity": "moderate"
},
{
"id": "class:repositories/stateless_session_repo.py:StatelessSessionRepo",
"type": "class",
"name": "StatelessSessionRepo",
"filePath": "repositories/stateless_session_repo.py",
"description": "生产环境无状态会话存储实现,所有操作返回空或占位符",
"methods": [
"get_history",
"add_message",
"create_session",
"get_user_sessions"
],
"extends": "BaseSessionRepo",
"complexity": "moderate"
},
{
"id": "module:repositories/sqlite_session_repo.py",
"type": "module",
"name": "sqlite_session_repo",
"filePath": "repositories/sqlite_session_repo.py",
"description": "SQLite 会话存储实现(开发环境),使用本地 SQLite 数据库存储会话数据",
"symbols": [
"SQLiteSessionRepo"
],
"complexity": "moderate"
},
{
"id": "class:repositories/sqlite_session_repo.py:SQLiteSessionRepo",
"type": "class",
"name": "SQLiteSessionRepo",
"filePath": "repositories/sqlite_session_repo.py",
"description": "开发环境 SQLite 存储实现,支持会话历史持久化",
"methods": [
"get_history",
"add_message",
"update_last_active",
"create_session",
"get_user_sessions"
],
"extends": "BaseSessionRepo",
"complexity": "moderate"
},
{
"id": "module:services/__init__.py",
"type": "module",
"name": "services",
"filePath": "services/__init__.py",
"description": "业务服务模块初始化文件,包含会话管理、反馈、纲要生成等服务",
"symbols": [
"SessionManager"
],
"complexity": "moderate"
},
{
"id": "module:services/session.py",
"type": "module",
"name": "session",
"filePath": "services/session.py",
"description": "会话管理器模块,支持多用户对话历史、历史压缩、会话过期清理",
"symbols": [
"SessionManager"
],
"complexity": "moderate"
},
{
"id": "class:services/session.py:SessionManager",
"type": "class",
"name": "SessionManager",
"filePath": "services/session.py",
"description": "会话管理器,提供多用户会话隔离、对话历史持久化、历史压缩、会话过期清理等功能",
"methods": [
"create_session",
"get_or_create_session",
"add_message",
"get_history",
"get_history_text",
"build_context",
"clear_history",
"delete_session",
"cleanup_expired_sessions",
"get_user_sessions",
"get_stats"
],
"complexity": "moderate"
},
{
"id": "module:services/feedback.py",
"type": "module",
"name": "feedback",
"filePath": "services/feedback.py",
"description": "问答质量闭环服务模块实现用户反馈、FAQ自动沉淀、质量分析报告功能",
"symbols": [
"Feedback",
"FAQ",
"QualityReport",
"FeedbackDB",
"FeedbackService",
"create_feedback_service"
],
"complexity": "moderate"
},
{
"id": "file:Feedback",
"type": "dataclass",
"name": "Feedback",
"filePath": "services/feedback.py",
"description": "用户反馈数据类包含会话ID、问题、答案、评分、原因等字段",
"fields": [
"id",
"session_id",
"query",
"answer",
"sources",
"rating",
"reason",
"user_id",
"created_at"
],
"complexity": "moderate"
},
{
"id": "file:FAQ",
"type": "dataclass",
"name": "FAQ",
"filePath": "services/feedback.py",
"description": "FAQ条目数据类包含问题、答案、来源文档、频率、评分、状态等字段",
"fields": [
"id",
"question",
"answer",
"source_documents",
"frequency",
"avg_rating",
"status",
"created_at",
"updated_at"
],
"complexity": "moderate"
},
{
"id": "file:QualityReport",
"type": "dataclass",
"name": "QualityReport",
"filePath": "services/feedback.py",
"description": "质量报告数据类,包含报告类型、时间范围、统计数据、高频问题、低分问题、改进建议等",
"fields": [
"id",
"report_type",
"start_date",
"end_date",
"total_queries",
"total_feedback",
"positive_count",
"negative_count",
"avg_rating",
"satisfaction_rate",
"high_freq_queries",
"low_rating_queries",
"improvement_suggestions",
"created_at"
],
"complexity": "moderate"
},
{
"id": "class:services/feedback.py:FeedbackDB",
"type": "class",
"name": "FeedbackDB",
"filePath": "services/feedback.py",
"description": "反馈数据库管理类处理反馈、FAQ、FAQ建议、质量报告的数据库操作",
"methods": [
"add_feedback",
"get_feedback",
"get_feedbacks",
"get_feedback_stats",
"add_faq",
"get_faq",
"get_faqs",
"update_faq",
"delete_faq",
"add_faq_suggestion",
"get_faq_suggestions",
"approve_faq_suggestion",
"reject_faq_suggestion",
"save_report",
"get_report",
"get_latest_report"
],
"complexity": "moderate"
},
{
"id": "class:services/feedback.py:FeedbackService",
"type": "class",
"name": "FeedbackService",
"filePath": "services/feedback.py",
"description": "问答质量闭环服务类实现反馈提交、FAQ推荐、质量报告生成、负反馈降权等功能",
"methods": [
"submit_feedback",
"approve_and_sync_faq",
"get_high_freq_queries",
"get_low_rating_queries",
"get_low_rated_sources",
"get_chunk_blacklist",
"generate_report"
],
"complexity": "moderate"
},
{
"id": "function:services/feedback.py:create_feedback_service",
"type": "function",
"name": "create_feedback_service",
"filePath": "services/feedback.py",
"description": "创建反馈服务实例的便捷函数",
"parameters": [
"faq_threshold"
],
"returns": "Tuple[FeedbackDB, FeedbackService]",
"complexity": "moderate"
},
{
"id": "module:services/outline.py",
"type": "module",
"name": "outline",
"filePath": "services/outline.py",
"description": "纲要生成与关联推荐服务模块,实现自动化纲要生成和文档关联推荐功能",
"symbols": [
"OutlineNode",
"DocumentOutline",
"Recommendation",
"OutlineDB",
"OutlineGenerator",
"RecommendationService",
"create_services"
],
"complexity": "moderate"
},
{
"id": "file:OutlineNode",
"type": "dataclass",
"name": "OutlineNode",
"filePath": "services/outline.py",
"description": "纲要节点数据类,支持树形结构,包含标题、摘要、层级、顺序、页码等字段",
"fields": [
"id",
"title",
"summary",
"level",
"order",
"page",
"children"
],
"methods": [
"to_dict",
"from_dict"
],
"complexity": "moderate"
},
{
"id": "file:DocumentOutline",
"type": "dataclass",
"name": "DocumentOutline",
"filePath": "services/outline.py",
"description": "文档纲要数据类包含文档ID、名称、页数、内容哈希、生成时间、纲要节点列表",
"fields": [
"document_id",
"document_name",
"total_pages",
"content_hash",
"generated_at",
"outline"
],
"methods": [
"to_dict",
"from_dict"
],
"complexity": "moderate"
},
{
"id": "file:Recommendation",
"type": "dataclass",
"name": "Recommendation",
"filePath": "services/outline.py",
"description": "推荐结果数据类包含文档ID、名称、摘要、相似度、标签得分、综合得分、标签、推荐理由",
"fields": [
"document_id",
"document_name",
"summary",
"similarity",
"tag_score",
"final_score",
"tags",
"reason"
],
"methods": [
"to_dict"
],
"complexity": "moderate"
},
{
"id": "class:services/outline.py:OutlineDB",
"type": "class",
"name": "OutlineDB",
"filePath": "services/outline.py",
"description": "纲要缓存数据库管理类,处理纲要缓存、文档向量、推荐缓存的数据库操作",
"methods": [
"save_outline",
"get_outline",
"delete_outline",
"list_outlines",
"save_document_vector",
"get_document_vector",
"get_all_document_vectors",
"save_recommendations",
"get_recommendations"
],
"complexity": "moderate"
},
{
"id": "class:services/outline.py:OutlineGenerator",
"type": "class",
"name": "OutlineGenerator",
"filePath": "services/outline.py",
"description": "纲要生成服务类使用LLM提取文档章节结构支持JSON、Markdown、Markmap格式导出",
"methods": [
"generate_outline",
"export_outline",
"batch_generate"
],
"complexity": "moderate"
},
{
"id": "class:services/outline.py:RecommendationService",
"type": "class",
"name": "RecommendationService",
"filePath": "services/outline.py",
"description": "关联推荐服务类,基于向量相似度和标签匹配推荐相关文档",
"methods": [
"get_recommendations",
"compute_all_vectors"
],
"complexity": "moderate"
},
{
"id": "function:services/outline.py:create_services",
"type": "function",
"name": "create_services",
"filePath": "services/outline.py",
"description": "创建服务实例的便捷函数",
"parameters": [
"documents_path",
"chroma_collection",
"embedding_model"
],
"returns": "Tuple[OutlineDB, OutlineGenerator, RecommendationService]",
"complexity": "moderate"
},
{
"id": "module:storage/__init__.py",
"type": "module",
"name": "storage",
"filePath": "storage/__init__.py",
"description": "存储模块初始化文件,提供统一的文件存储抽象层,支持多种存储后端",
"symbols": [
"FileProvider",
"FileInfo",
"LocalFileProvider",
"SMBFileProvider",
"S3FileProvider",
"HttpFileProvider",
"get_file_provider",
"reset_provider",
"get_file_for_parsing",
"cleanup_temp_file",
"FileFetcher",
"fetch_file"
],
"complexity": "moderate"
},
{
"id": "module:storage/file_provider.py",
"type": "module",
"name": "file_provider",
"filePath": "storage/file_provider.py",
"description": "文件存储提供者模块支持本地、SMB/CIFS、S3、HTTP等多种存储后端",
"symbols": [
"FileInfo",
"FileProvider",
"LocalFileProvider",
"SMBFileProvider",
"S3FileProvider",
"HttpFileProvider",
"get_file_provider",
"reset_provider"
],
"complexity": "moderate"
},
{
"id": "file:FileInfo",
"type": "dataclass",
"name": "FileInfo",
"filePath": "storage/file_provider.py",
"description": "文件信息数据类包含路径、大小、MIME类型、最后修改时间、额外元数据",
"fields": [
"path",
"size",
"content_type",
"last_modified",
"metadata"
],
"complexity": "moderate"
},
{
"id": "class:storage/file_provider.py:FileProvider",
"type": "class",
"name": "FileProvider",
"filePath": "storage/file_provider.py",
"description": "文件存储提供者抽象基类,定义文件获取、流式访问、信息查询、文件列表等标准接口",
"methods": [
"get_file",
"get_file_stream",
"get_file_info",
"list_files",
"exists"
],
"isAbstract": true,
"complexity": "moderate"
},
{
"id": "class:storage/file_provider.py:LocalFileProvider",
"type": "class",
"name": "LocalFileProvider",
"filePath": "storage/file_provider.py",
"description": "本地文件系统提供者,处理本地文件读写操作,包含路径穿越安全检查",
"methods": [
"get_file",
"get_file_stream",
"get_file_info",
"list_files",
"exists"
],
"extends": "FileProvider",
"complexity": "moderate"
},
{
"id": "class:storage/file_provider.py:SMBFileProvider",
"type": "class",
"name": "SMBFileProvider",
"filePath": "storage/file_provider.py",
"description": "SMB/CIFS 文件共享提供者,支持 Windows 共享目录访问",
"methods": [
"get_file",
"get_file_stream",
"get_file_info",
"list_files",
"exists"
],
"extends": "FileProvider",
"complexity": "moderate"
},
{
"id": "class:storage/file_provider.py:S3FileProvider",
"type": "class",
"name": "S3FileProvider",
"filePath": "storage/file_provider.py",
"description": "S3 兼容对象存储提供者,支持 AWS S3、MinIO、阿里云 OSS、腾讯云 COS 等",
"methods": [
"get_file",
"get_file_stream",
"get_file_info",
"list_files",
"exists"
],
"extends": "FileProvider",
"complexity": "moderate"
},
{
"id": "class:storage/file_provider.py:HttpFileProvider",
"type": "class",
"name": "HttpFileProvider",
"filePath": "storage/file_provider.py",
"description": "HTTP API 文件提供者,通过 HTTP API 获取文件,适合企业自建文件管理系统",
"methods": [
"get_file",
"get_file_stream",
"get_file_info",
"list_files",
"exists"
],
"extends": "FileProvider",
"complexity": "moderate"
},
{
"id": "function:storage/file_provider.py:get_file_provider",
"type": "function",
"name": "get_file_provider",
"filePath": "storage/file_provider.py",
"description": "获取全局文件提供者实例(单例模式),根据配置创建对应的提供者",
"returns": "FileProvider",
"complexity": "moderate"
},
{
"id": "function:storage/file_provider.py:reset_provider",
"type": "function",
"name": "reset_provider",
"filePath": "storage/file_provider.py",
"description": "重置文件提供者实例(用于测试)",
"complexity": "moderate"
},
{
"id": "module:storage/file_fetcher.py",
"type": "module",
"name": "file_fetcher",
"filePath": "storage/file_fetcher.py",
"description": "企业文件系统集成助手模块,提供便捷方法从企业文件系统获取文件并进行向量化",
"symbols": [
"get_file_for_parsing",
"cleanup_temp_file",
"FileFetcher",
"fetch_file"
],
"complexity": "moderate"
},
{
"id": "function:storage/file_fetcher.py:get_file_for_parsing",
"type": "function",
"name": "get_file_for_parsing",
"filePath": "storage/file_fetcher.py",
"description": "获取用于解析的文件路径,根据配置自动从本地或企业文件系统获取文件",
"parameters": [
"file_path",
"use_file_provider"
],
"returns": "Tuple[str, bool]",
"complexity": "moderate"
},
{
"id": "function:storage/file_fetcher.py:cleanup_temp_file",
"type": "function",
"name": "cleanup_temp_file",
"filePath": "storage/file_fetcher.py",
"description": "清理临时文件",
"parameters": [
"file_path",
"is_temp"
],
"complexity": "moderate"
},
{
"id": "class:storage/file_fetcher.py:FileFetcher",
"type": "class",
"name": "FileFetcher",
"filePath": "storage/file_fetcher.py",
"description": "文件获取上下文管理器,自动处理临时文件清理",
"methods": [
"__enter__",
"__exit__"
],
"properties": [
"path"
],
"complexity": "moderate"
},
{
"id": "function:storage/file_fetcher.py:fetch_file",
"type": "function",
"name": "fetch_file",
"filePath": "storage/file_fetcher.py",
"description": "获取文件的上下文管理器便捷函数",
"parameters": [
"file_path"
],
"returns": "FileFetcher",
"complexity": "moderate"
}
],
"edges": [
{
"source": "config:deploy/docker-compose.yml",
"target": "config:deploy/Dockerfile",
"type": "uses",
"weight": 0.6,
"direction": "forward"
},
{
"source": "config:deploy/docker-compose.prod.yml",
"target": "config:deploy/Dockerfile",
"type": "uses",
"weight": 0.6,
"direction": "forward"
},
{
"source": "config:deploy/docker-compose.yml",
"target": "service:rag-service",
"type": "defines",
"weight": 0.8,
"direction": "forward"
},
{
"source": "config:deploy/docker-compose.prod.yml",
"target": "service:rag-service",
"type": "defines",
"weight": 0.8,
"direction": "forward"
},
{
"source": "config:deploy/Dockerfile",
"target": "service:python-base",
"type": "extends",
"weight": 0.7,
"direction": "forward"
},
{
"source": "config:deploy/Dockerfile",
"target": "service:gunicorn",
"type": "uses",
"weight": 0.6,
"direction": "forward"
},
{
"source": "service:rag-service",
"target": "service:gunicorn",
"type": "depends_on",
"weight": 0.6,
"direction": "forward"
},
{
"source": "document:README.md",
"target": "config:config.example.py",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "config:config.py",
"target": "config:config.example.py",
"type": "derived_from",
"weight": 0.6,
"direction": "forward"
},
{
"source": "document:README.md",
"target": "config:requirements.txt",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:AGENTS.md",
"target": "config:requirements.txt",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:CLAUDE.md",
"target": "config:requirements.txt",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:README.md",
"target": "document:CHANGELOG.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:AGENTS.md",
"target": "document:CLAUDE.md",
"type": "similar_to",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:README.md",
"target": "document:AGENTS.md",
"type": "extends",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:chat-ui/index.html",
"target": "config:chat-ui/style.css",
"type": "imports",
"weight": 0.7,
"direction": "forward"
},
{
"source": "document:chat-ui/exam.html",
"target": "config:chat-ui/style.css",
"type": "imports",
"weight": 0.7,
"direction": "forward"
},
{
"source": "document:chat-ui/api-test.html",
"target": "config:chat-ui/style.css",
"type": "imports",
"weight": 0.7,
"direction": "forward"
},
{
"source": "document:chat-ui/index.html",
"target": "document:chat-ui/exam.html",
"type": "navigates_to",
"weight": 0.3,
"direction": "forward"
},
{
"source": "document:chat-ui/index.html",
"target": "document:chat-ui/api-test.html",
"type": "navigates_to",
"weight": 0.3,
"direction": "forward"
},
{
"source": "document:deploy/README.md",
"target": "service:deploy/Dockerfile.prod",
"type": "documents",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:deploy/README.md",
"target": "config:deploy/gunicorn.conf.py",
"type": "documents",
"weight": 0.5,
"direction": "forward"
},
{
"source": "service:deploy/Dockerfile.prod",
"target": "config:deploy/gunicorn.conf.py",
"type": "uses",
"weight": 0.6,
"direction": "forward"
},
{
"source": "document:docs/API与后端对接规范.md",
"target": "document:docs/Agentic_RAG完整指南.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:docs/API与后端对接规范.md",
"target": "document:docs/数据库设计文档.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:docs/出题批卷系统设计.md",
"target": "document:docs/数据库设计文档.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:docs/测试指南.md",
"target": "document:docs/Agentic_RAG完整指南.md",
"type": "tests",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:docs/架构与部署方案.md",
"target": "document:docs/MinerU模型部署指南.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "document:docs/开发与系统模块说明.md",
"target": "document:docs/架构与部署方案.md",
"type": "references",
"weight": 0.5,
"direction": "forward"
},
{
"source": "class:__nofilepath__:ChunkInfo",
"target": "file:tools/chunk_metrics.py",
"type": "contained_in",
"description": "ChunkInfo 定义在 chunk_metrics.py 中",
"direction": "forward"
},
{
"source": "class:__nofilepath__:Issue",
"target": "file:tools/chunk_metrics.py",
"type": "contained_in",
"description": "Issue 定义在 chunk_metrics.py 中",
"direction": "forward"
},
{
"source": "class:__nofilepath__:MetricResult",
"target": "file:tools/chunk_metrics.py",
"type": "contained_in",
"description": "MetricResult 定义在 chunk_metrics.py 中",
"direction": "forward"
},
{
"source": "class:__nofilepath__:ChunkMetrics",
"target": "file:tools/chunk_metrics.py",
"type": "contained_in",
"description": "ChunkMetrics 定义在 chunk_metrics.py 中",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkInfo.length",
"target": "class:__nofilepath__:ChunkInfo",
"type": "contained_in",
"description": "length 属性属于 ChunkInfo",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.__init__",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "__init__ 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.calculate_all_metrics",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "calculate_all_metrics 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.structure_score",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "structure_score 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.content_quality_score",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "content_quality_score 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.coherence_score",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "coherence_score 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.get_length_distribution",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "get_length_distribution 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.get_file_statistics",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "contained_in",
"description": "get_file_statistics 方法属于 ChunkMetrics",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_optimization_suggestions",
"target": "file:tools/chunk_metrics.py",
"type": "contained_in",
"description": "generate_optimization_suggestions 定义在 chunk_metrics.py 中",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.calculate_all_metrics",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.structure_score",
"type": "calls",
"description": "calculate_all_metrics 调用 structure_score",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.calculate_all_metrics",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.content_quality_score",
"type": "calls",
"description": "calculate_all_metrics 调用 content_quality_score",
"direction": "forward"
},
{
"source": "file:tools/chunk_metrics.py:ChunkMetrics.calculate_all_metrics",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.coherence_score",
"type": "calls",
"description": "calculate_all_metrics 调用 coherence_score",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py",
"target": "file:tools/chunk_metrics.py",
"type": "imports",
"description": "导入 ChunkInfo, ChunkMetrics, MetricResult, Issue, generate_optimization_suggestions",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AnalysisResult",
"target": "file:tools/chunk_analyzer.py",
"type": "contained_in",
"description": "AnalysisResult 定义在 chunk_analyzer.py 中",
"direction": "forward"
},
{
"source": "class:__nofilepath__:ChunkAnalyzer",
"target": "file:tools/chunk_analyzer.py",
"type": "contained_in",
"description": "ChunkAnalyzer 定义在 chunk_analyzer.py 中",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.__init__",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "__init__ 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "analyze 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer._load_chunks",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "_load_chunks 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer._llm_evaluate",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "_llm_evaluate 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer._empty_result",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "_empty_result 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.export_result",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "contained_in",
"description": "export_result 方法属于 ChunkAnalyzer",
"direction": "forward"
},
{
"source": "function:__nofilepath__:print_summary",
"target": "file:tools/chunk_analyzer.py",
"type": "contained_in",
"description": "print_summary 定义在 chunk_analyzer.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "file:tools/chunk_analyzer.py",
"type": "contained_in",
"description": "main 定义在 chunk_analyzer.py 中",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.__init__",
"target": "class:__nofilepath__:ChunkMetrics",
"type": "calls",
"description": "__init__ 创建 ChunkMetrics 实例",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_analyzer.py:ChunkAnalyzer._load_chunks",
"type": "calls",
"description": "analyze 调用 _load_chunks 加载切片",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.structure_score",
"type": "calls",
"description": "analyze 调用 structure_score 计算结构评分",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.content_quality_score",
"type": "calls",
"description": "analyze 调用 content_quality_score 计算内容质量",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.coherence_score",
"type": "calls",
"description": "analyze 调用 coherence_score 计算语义连贯性",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "function:__nofilepath__:generate_optimization_suggestions",
"type": "calls",
"description": "analyze 调用 generate_optimization_suggestions 生成建议",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_analyzer.py:ChunkAnalyzer._llm_evaluate",
"type": "calls",
"description": "analyze 调用 _llm_evaluate 进行 LLM 评估",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.get_length_distribution",
"type": "calls",
"description": "analyze 调用 get_length_distribution 获取分布",
"direction": "forward"
},
{
"source": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"target": "file:tools/chunk_metrics.py:ChunkMetrics.get_file_statistics",
"type": "calls",
"description": "analyze 调用 get_file_statistics 获取文件统计",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "class:__nofilepath__:ChunkAnalyzer",
"type": "calls",
"description": "main 创建 ChunkAnalyzer 实例",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "file:tools/chunk_analyzer.py:ChunkAnalyzer.analyze",
"type": "calls",
"description": "main 调用 analyze 执行分析",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "function:__nofilepath__:print_summary",
"type": "calls",
"description": "main 调用 print_summary 打印摘要",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "file:tools/chunk_analyzer.py:ChunkAnalyzer.export_result",
"type": "calls",
"description": "main 调用 export_result 导出结果",
"direction": "forward"
},
{
"source": "file:tools/chunk_report.py:HTML_TEMPLATE",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "HTML_TEMPLATE 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:get_score_class",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "get_score_class 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_distribution_bars",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_distribution_bars 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_issues_html",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_issues_html 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_file_rows",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_file_rows 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_suggestions_html",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_suggestions_html 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_llm_section",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_llm_section 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "generate_report 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "file:tools/chunk_report.py",
"type": "contained_in",
"description": "main 定义在 chunk_report.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:get_score_class",
"type": "calls",
"description": "generate_report 调用 get_score_class",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:generate_distribution_bars",
"type": "calls",
"description": "generate_report 调用 generate_distribution_bars",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:generate_issues_html",
"type": "calls",
"description": "generate_report 调用 generate_issues_html",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:generate_file_rows",
"type": "calls",
"description": "generate_report 调用 generate_file_rows",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:generate_suggestions_html",
"type": "calls",
"description": "generate_report 调用 generate_suggestions_html",
"direction": "forward"
},
{
"source": "function:__nofilepath__:generate_report",
"target": "function:__nofilepath__:generate_llm_section",
"type": "calls",
"description": "generate_report 调用 generate_llm_section",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "function:__nofilepath__:generate_report",
"type": "calls",
"description": "main 调用 generate_report",
"direction": "forward"
},
{
"source": "function:__nofilepath__:clean_vector_store",
"target": "file:tools/clean_vector_store.py",
"type": "contained_in",
"description": "clean_vector_store 定义在 clean_vector_store.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:export_collection_chunks",
"target": "file:tools/export_chunks.py",
"type": "contained_in",
"description": "export_collection_chunks 定义在 export_chunks.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "file:tools/export_chunks.py",
"type": "contained_in",
"description": "main 定义在 export_chunks.py 中",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "function:__nofilepath__:export_collection_chunks",
"type": "calls",
"description": "main 调用 export_collection_chunks",
"direction": "forward"
},
{
"source": "module:main.py",
"target": "module:api/__init__.py",
"type": "imports",
"description": "main 导入 create_app",
"direction": "forward"
},
{
"source": "function:__nofilepath__:main",
"target": "function:__nofilepath__:create_app",
"type": "calls",
"description": "main 函数调用 create_app 创建应用",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/chat_routes.py",
"type": "imports",
"description": "应用工厂导入 chat_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/kb_routes.py",
"type": "imports",
"description": "应用工厂导入 kb_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/document_routes.py",
"type": "imports",
"description": "应用工厂导入 document_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/sync_routes.py",
"type": "imports",
"description": "应用工厂导入 sync_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/session_routes.py",
"type": "imports",
"description": "应用工厂导入 session_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/feedback_routes.py",
"type": "imports",
"description": "应用工厂导入 feedback_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/audit_routes.py",
"type": "imports",
"description": "应用工厂导入 audit_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/auth_routes.py",
"type": "imports",
"description": "应用工厂导入 auth_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:api/image_routes.py",
"type": "imports",
"description": "应用工厂导入 image_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:exam_pkg/api.py",
"type": "imports",
"description": "应用工厂导入 exam_bp",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "应用工厂导入认证模块",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:auth/security.py",
"type": "imports",
"description": "应用工厂导入安全模块",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "module:data/db.py",
"type": "imports",
"description": "应用工厂导入数据库模块",
"direction": "forward"
},
{
"source": "module:api/__init__.py",
"target": "function:__nofilepath__:create_app",
"type": "contains",
"description": "模块包含 create_app 函数",
"direction": "forward"
},
{
"source": "module:api/chat_routes.py",
"target": "file:chat_bp",
"type": "contains",
"description": "模块包含 chat_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/chat_routes.py",
"target": "function:__nofilepath__:chat",
"type": "contains",
"description": "模块包含 chat 函数",
"direction": "forward"
},
{
"source": "module:api/chat_routes.py",
"target": "function:__nofilepath__:chat_with_llm",
"type": "contains",
"description": "模块包含 chat_with_llm 函数",
"direction": "forward"
},
{
"source": "module:api/chat_routes.py",
"target": "module:auth/security.py",
"type": "imports",
"description": "chat_routes 导入 validate_query, filter_response",
"direction": "forward"
},
{
"source": "module:api/chat_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "chat_routes 导入 require_gateway_auth",
"direction": "forward"
},
{
"source": "function:__nofilepath__:chat",
"target": "function:__nofilepath__:validate_query",
"type": "calls",
"description": "chat 函数调用 validate_query 验证输入",
"direction": "forward"
},
{
"source": "function:__nofilepath__:chat",
"target": "function:__nofilepath__:chat_with_llm",
"type": "calls",
"description": "chat 函数调用 chat_with_llm",
"direction": "forward"
},
{
"source": "function:__nofilepath__:chat",
"target": "function:__nofilepath__:filter_response",
"type": "calls",
"description": "chat 函数调用 filter_response 过滤输出",
"direction": "forward"
},
{
"source": "module:api/kb_routes.py",
"target": "file:kb_bp",
"type": "contains",
"description": "模块包含 kb_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/kb_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "kb_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/document_routes.py",
"target": "file:document_bp",
"type": "contains",
"description": "模块包含 document_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/document_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "document_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/document_routes.py",
"target": "module:parsers/__init__.py",
"type": "imports",
"description": "document_routes 导入解析器模块",
"direction": "forward"
},
{
"source": "module:api/sync_routes.py",
"target": "file:sync_bp",
"type": "contains",
"description": "模块包含 sync_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/sync_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "sync_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/session_routes.py",
"target": "file:session_bp",
"type": "contains",
"description": "模块包含 session_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/session_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "session_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/feedback_routes.py",
"target": "file:feedback_bp",
"type": "contains",
"description": "模块包含 feedback_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/feedback_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "feedback_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/audit_routes.py",
"target": "file:audit_bp",
"type": "contains",
"description": "模块包含 audit_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/audit_routes.py",
"target": "function:__nofilepath__:get_audit_logs",
"type": "contains",
"description": "模块包含 get_audit_logs 函数",
"direction": "forward"
},
{
"source": "module:api/audit_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "audit_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/auth_routes.py",
"target": "file:auth_bp",
"type": "contains",
"description": "模块包含 auth_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/auth_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "auth_routes 导入认证模块",
"direction": "forward"
},
{
"source": "module:api/image_routes.py",
"target": "file:image_bp",
"type": "contains",
"description": "模块包含 image_bp Blueprint",
"direction": "forward"
},
{
"source": "module:api/image_routes.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "image_routes 导入认证装饰器",
"direction": "forward"
},
{
"source": "module:api/response_utils.py",
"target": "function:__nofilepath__:success_response",
"type": "contains",
"description": "模块包含 success_response 函数",
"direction": "forward"
},
{
"source": "module:api/response_utils.py",
"target": "function:__nofilepath__:error_response",
"type": "contains",
"description": "模块包含 error_response 函数",
"direction": "forward"
},
{
"source": "module:auth/__init__.py",
"target": "module:auth/gateway.py",
"type": "imports",
"description": "auth 模块导入 gateway",
"direction": "forward"
},
{
"source": "module:auth/__init__.py",
"target": "module:auth/security.py",
"type": "imports",
"description": "auth 模块导入 security",
"direction": "forward"
},
{
"source": "module:auth/gateway.py",
"target": "function:__nofilepath__:require_gateway_auth",
"type": "contains",
"description": "模块包含 require_gateway_auth 函数",
"direction": "forward"
},
{
"source": "module:auth/gateway.py",
"target": "class:__nofilepath__:_FakeAuthManager",
"type": "contains",
"description": "模块包含 _FakeAuthManager 类",
"direction": "forward"
},
{
"source": "module:auth/security.py",
"target": "function:__nofilepath__:validate_query",
"type": "contains",
"description": "模块包含 validate_query 函数",
"direction": "forward"
},
{
"source": "module:auth/security.py",
"target": "function:__nofilepath__:filter_response",
"type": "contains",
"description": "模块包含 filter_response 函数",
"direction": "forward"
},
{
"source": "module:data/__init__.py",
"target": "module:data/db.py",
"type": "imports",
"description": "data 模块导入 db",
"direction": "forward"
},
{
"source": "module:parsers/__init__.py",
"target": "module:parsers/excel_parser.py",
"type": "imports",
"description": "parsers 模块导入 excel_parser",
"direction": "forward"
},
{
"source": "module:parsers/__init__.py",
"target": "module:parsers/mineru_parser.py",
"type": "imports",
"description": "parsers 模块导入 mineru_parser",
"direction": "forward"
},
{
"source": "module:parsers/excel_parser.py",
"target": "class:__nofilepath__:UnifiedChunk",
"type": "contains",
"description": "模块包含 UnifiedChunk 类",
"direction": "forward"
},
{
"source": "module:parsers/excel_parser.py",
"target": "function:__nofilepath__:parse_excel",
"type": "contains",
"description": "模块包含 parse_excel 函数",
"direction": "forward"
},
{
"source": "module:parsers/excel_parser.py",
"target": "function:__nofilepath__:_detect_header_row",
"type": "contains",
"description": "模块包含 _detect_header_row 函数",
"direction": "forward"
},
{
"source": "module:parsers/excel_parser.py",
"target": "function:__nofilepath__:_df_to_markdown",
"type": "contains",
"description": "模块包含 _df_to_markdown 函数",
"direction": "forward"
},
{
"source": "function:__nofilepath__:parse_excel",
"target": "function:__nofilepath__:_detect_header_row",
"type": "calls",
"description": "parse_excel 调用 _detect_header_row",
"direction": "forward"
},
{
"source": "function:__nofilepath__:parse_excel",
"target": "function:__nofilepath__:_df_to_markdown",
"type": "calls",
"description": "parse_excel 调用 _df_to_markdown",
"direction": "forward"
},
{
"source": "module:parsers/mineru_parser.py",
"target": "function:__nofilepath__:parse_with_mineru",
"type": "contains",
"description": "模块包含 parse_with_mineru 函数",
"direction": "forward"
},
{
"source": "module:parsers/mineru_parser.py",
"target": "function:__nofilepath__:parse_docx_with_mineru",
"type": "contains",
"description": "模块包含 parse_docx_with_mineru 函数",
"direction": "forward"
},
{
"source": "module:parsers/mineru_parser.py",
"target": "function:__nofilepath__:parse_xlsx_with_mineru",
"type": "contains",
"description": "模块包含 parse_xlsx_with_mineru 函数",
"direction": "forward"
},
{
"source": "function:__nofilepath__:parse_docx_with_mineru",
"target": "function:__nofilepath__:parse_with_mineru",
"type": "calls",
"description": "parse_docx_with_mineru 调用 parse_with_mineru",
"direction": "forward"
},
{
"source": "function:__nofilepath__:parse_xlsx_with_mineru",
"target": "function:__nofilepath__:parse_with_mineru",
"type": "calls",
"description": "parse_xlsx_with_mineru 调用 parse_with_mineru",
"direction": "forward"
},
{
"source": "module:exam_pkg/__init__.py",
"target": "module:exam_pkg/api.py",
"type": "imports",
"description": "exam_pkg 模块导入 api",
"direction": "forward"
},
{
"source": "module:exam_pkg/api.py",
"target": "file:exam_bp",
"type": "contains",
"description": "模块包含 exam_bp Blueprint",
"direction": "forward"
},
{
"source": "module:exam_pkg/api.py",
"target": "function:__nofilepath__:api_health",
"type": "contains",
"description": "模块包含 api_health 函数",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "file:core/engine.py",
"type": "imports",
"description": "导入 RAGEngine 和 get_engine",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "file:core/bm25_index.py",
"type": "imports",
"description": "导入 BM25Index",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "file:core/chunker.py",
"type": "imports",
"description": "导入 split_text_with_limit 和 split_text",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "file:core/bm25_index.py",
"type": "imports",
"description": "导入 BM25Index",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "file:core/constants.py",
"type": "imports",
"description": "导入 get_empty_result",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "file:core/mmr.py",
"type": "calls",
"description": "调用 MMR 重排序",
"direction": "forward"
},
{
"source": "file:core/bm25_index.py",
"target": "file:core/constants.py",
"type": "imports",
"description": "导入 get_empty_result",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/engine.py",
"type": "imports",
"description": "导入 get_engine",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/llm_utils.py",
"type": "imports",
"description": "导入 call_llm, quick_yes_no, parse_json_from_response",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入基础常量和配置",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_query.py",
"type": "imports",
"description": "导入 QueryRewriteMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_search.py",
"type": "imports",
"description": "导入 SearchMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_answer.py",
"type": "imports",
"description": "导入 AnswerMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_citation.py",
"type": "imports",
"description": "导入 CitationMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_media.py",
"type": "imports",
"description": "导入 RichMediaMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_quality.py",
"type": "imports",
"description": "导入 QualityMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_context.py",
"type": "imports",
"description": "导入 ContextMixin",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "file:core/agentic_meta.py",
"type": "imports",
"description": "导入 MetaQuestionMixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:QueryRewriteMixin",
"type": "inherits",
"description": "继承查询重写 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:SearchMixin",
"type": "inherits",
"description": "继承检索 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:AnswerMixin",
"type": "inherits",
"description": "继承答案生成 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:CitationMixin",
"type": "inherits",
"description": "继承引用处理 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:RichMediaMixin",
"type": "inherits",
"description": "继承富媒体处理 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:QualityMixin",
"type": "inherits",
"description": "继承质量评估 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:ContextMixin",
"type": "inherits",
"description": "继承上下文处理 Mixin",
"direction": "forward"
},
{
"source": "class:__nofilepath__:AgenticRAG",
"target": "class:__nofilepath__:MetaQuestionMixin",
"type": "inherits",
"description": "继承元问题处理 Mixin",
"direction": "forward"
},
{
"source": "file:core/agentic_query.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 logger 和 MODEL",
"direction": "forward"
},
{
"source": "file:core/agentic_query.py",
"target": "file:core/llm_utils.py",
"type": "calls",
"description": "调用 call_llm 进行查询重写",
"direction": "forward"
},
{
"source": "file:core/agentic_answer.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入常量",
"direction": "forward"
},
{
"source": "file:core/agentic_answer.py",
"target": "file:core/llm_utils.py",
"type": "imports",
"description": "导入 call_llm",
"direction": "forward"
},
{
"source": "file:core/agentic_citation.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 SOURCE_KB, SOURCE_GRAPH",
"direction": "forward"
},
{
"source": "file:core/agentic_media.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 logger",
"direction": "forward"
},
{
"source": "file:core/agentic_quality.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 logger",
"direction": "forward"
},
{
"source": "file:core/agentic_quality.py",
"target": "file:core/llm_utils.py",
"type": "calls",
"description": "调用 call_llm 进行 Agent 思考",
"direction": "forward"
},
{
"source": "file:core/agentic_context.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 MAX_CONTEXT_TOKENS, RERANK_THRESHOLD",
"direction": "forward"
},
{
"source": "file:core/agentic_meta.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 logger",
"direction": "forward"
},
{
"source": "file:core/agentic_search.py",
"target": "file:core/agentic_base.py",
"type": "imports",
"description": "导入 HAS_SERPER, SERPER_API_KEY 等常量",
"direction": "forward"
},
{
"source": "file:core/agentic_base.py",
"target": "file:core/query_classifier.py",
"type": "imports",
"description": "导入 QueryClassifier 和 QueryType",
"direction": "forward"
},
{
"source": "file:core/agentic_base.py",
"target": "file:core/llm_budget.py",
"type": "imports",
"description": "导入预算控制相关",
"direction": "forward"
},
{
"source": "file:core/query_classifier.py",
"target": "function:__nofilepath__:is_enumeration_query",
"type": "calls",
"description": "分类时调用枚举查询判断",
"direction": "forward"
},
{
"source": "file:core/confidence_gate.py",
"target": "file:core/llm_utils.py",
"type": "calls",
"description": "调用 LLM 进行置信度判断",
"direction": "forward"
},
{
"source": "file:core/intent_analyzer.py",
"target": "file:core/llm_utils.py",
"type": "calls",
"description": "调用 LLM 进行意图分析",
"direction": "forward"
},
{
"source": "file:core/quality_assessor.py",
"target": "file:core/llm_utils.py",
"type": "calls",
"description": "调用 LLM 进行质量评估",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "class:__nofilepath__:RAGEngine",
"type": "exports",
"description": "导出 RAGEngine 类",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "function:__nofilepath__:get_engine",
"type": "exports",
"description": "导出 get_engine 函数",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "class:__nofilepath__:BM25Index",
"type": "exports",
"description": "导出 BM25Index 类",
"direction": "forward"
},
{
"source": "file:core/__init__.py",
"target": "function:__nofilepath__:split_text_with_limit",
"type": "exports",
"description": "导出 split_text_with_limit 函数",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "class:__nofilepath__:RAGEngine",
"type": "contains",
"description": "文件包含 RAGEngine 类",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "class:__nofilepath__:ONNXReranker",
"type": "contains",
"description": "文件包含 ONNXReranker 类",
"direction": "forward"
},
{
"source": "file:core/engine.py",
"target": "function:__nofilepath__:get_engine",
"type": "contains",
"description": "文件包含 get_engine 函数",
"direction": "forward"
},
{
"source": "file:core/bm25_index.py",
"target": "class:__nofilepath__:BM25Index",
"type": "contains",
"description": "文件包含 BM25Index 类",
"direction": "forward"
},
{
"source": "file:core/agentic.py",
"target": "class:__nofilepath__:AgenticRAG",
"type": "contains",
"description": "文件包含 AgenticRAG 类",
"direction": "forward"
},
{
"source": "file:core/query_classifier.py",
"target": "class:__nofilepath__:QueryType",
"type": "contains",
"description": "文件包含 QueryType 枚举",
"direction": "forward"
},
{
"source": "file:core/query_classifier.py",
"target": "class:__nofilepath__:ClassifiedQuery",
"type": "contains",
"description": "文件包含 ClassifiedQuery 数据类",
"direction": "forward"
},
{
"source": "file:core/query_classifier.py",
"target": "class:__nofilepath__:QueryClassifier",
"type": "contains",
"description": "文件包含 QueryClassifier 类",
"direction": "forward"
},
{
"source": "file:core/llm_budget.py",
"target": "class:__nofilepath__:LLMBudgetController",
"type": "contains",
"description": "文件包含 LLMBudgetController 类",
"direction": "forward"
},
{
"source": "file:core/cache.py",
"target": "class:__nofilepath__:LRUCache",
"type": "contains",
"description": "文件包含 LRUCache 类",
"direction": "forward"
},
{
"source": "file:core/cache.py",
"target": "class:__nofilepath__:RAGCacheManager",
"type": "contains",
"description": "文件包含 RAGCacheManager 类",
"direction": "forward"
},
{
"source": "file:core/confidence_gate.py",
"target": "class:__nofilepath__:ConfidenceGate",
"type": "contains",
"description": "文件包含 ConfidenceGate 类",
"direction": "forward"
},
{
"source": "file:core/loop_guard.py",
"target": "class:__nofilepath__:LoopGuard",
"type": "contains",
"description": "文件包含 LoopGuard 类",
"direction": "forward"
},
{
"source": "file:core/quality_assessor.py",
"target": "class:__nofilepath__:QualityAssessor",
"type": "contains",
"description": "文件包含 QualityAssessor 类",
"direction": "forward"
},
{
"source": "file:core/intent_analyzer.py",
"target": "class:__nofilepath__:IntentAnalyzer",
"type": "contains",
"description": "文件包含 IntentAnalyzer 类",
"direction": "forward"
},
{
"source": "file:core/adaptive_topk.py",
"target": "class:__nofilepath__:AdaptiveTopK",
"type": "contains",
"description": "文件包含 AdaptiveTopK 类",
"direction": "forward"
},
{
"id": "edge:1",
"type": "imports",
"source": "file:dev-ui/src/api/auth.js",
"target": "file:dev-ui/src/api/request.js",
"description": "auth.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:2",
"type": "imports",
"source": "file:dev-ui/src/api/chat.js",
"target": "file:dev-ui/src/api/request.js",
"description": "chat.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:3",
"type": "imports",
"source": "file:dev-ui/src/api/document.js",
"target": "file:dev-ui/src/api/request.js",
"description": "document.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:4",
"type": "imports",
"source": "file:dev-ui/src/api/kb.js",
"target": "file:dev-ui/src/api/request.js",
"description": "kb.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:5",
"type": "imports",
"source": "file:dev-ui/src/api/sync.js",
"target": "file:dev-ui/src/api/request.js",
"description": "sync.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:6",
"type": "imports",
"source": "file:dev-ui/src/api/audit.js",
"target": "file:dev-ui/src/api/request.js",
"description": "audit.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:7",
"type": "imports",
"source": "file:dev-ui/src/api/feedback.js",
"target": "file:dev-ui/src/api/request.js",
"description": "feedback.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:8",
"type": "imports",
"source": "file:dev-ui/src/api/session.js",
"target": "file:dev-ui/src/api/request.js",
"description": "session.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:9",
"type": "imports",
"source": "file:dev-ui/src/api/image.js",
"target": "file:dev-ui/src/api/request.js",
"description": "image.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:10",
"type": "imports",
"source": "file:dev-ui/src/api/exam.js",
"target": "file:dev-ui/src/api/request.js",
"description": "exam.js 导入 request 实例",
"direction": "forward"
},
{
"id": "edge:11",
"type": "imports",
"source": "file:dev-ui/src/composables/useTheme.js",
"target": "file:dev-ui/src/stores/app.js",
"description": "useTheme 导入 useAppStore",
"direction": "forward"
},
{
"id": "edge:12",
"type": "imports",
"source": "file:dev-ui/src/layouts/MainLayout.vue",
"target": "file:dev-ui/src/stores/auth.js",
"description": "MainLayout 导入 useAuthStore",
"direction": "forward"
},
{
"id": "edge:13",
"type": "imports",
"source": "file:dev-ui/src/layouts/MainLayout.vue",
"target": "file:dev-ui/src/stores/app.js",
"description": "MainLayout 导入 useAppStore",
"direction": "forward"
},
{
"id": "edge:14",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/api/document.js",
"description": "FileViewer 导入 getDocumentRawUrl",
"direction": "forward"
},
{
"id": "edge:15",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/PdfViewer.vue",
"description": "FileViewer 导入 PdfViewer",
"direction": "forward"
},
{
"id": "edge:16",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/DocxViewer.vue",
"description": "FileViewer 导入 DocxViewer",
"direction": "forward"
},
{
"id": "edge:17",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/ExcelViewer.vue",
"description": "FileViewer 导入 ExcelViewer",
"direction": "forward"
},
{
"id": "edge:18",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/TextViewer.vue",
"description": "FileViewer 导入 TextViewer",
"direction": "forward"
},
{
"id": "edge:19",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/MarkdownViewer.vue",
"description": "FileViewer 导入 MarkdownViewer",
"direction": "forward"
},
{
"id": "edge:20",
"type": "imports",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "file:dev-ui/src/components/viewers/ImageViewer.vue",
"description": "FileViewer 导入 ImageViewer",
"direction": "forward"
},
{
"id": "edge:21",
"type": "imports",
"source": "file:dev-ui/src/components/viewers/MarkdownViewer.vue",
"target": "file:dev-ui/src/composables/useMarkdown.js",
"description": "MarkdownViewer 导入 useMarkdown",
"direction": "forward"
},
{
"id": "edge:22",
"type": "calls",
"source": "function:dev-ui/src/api/auth.js:login",
"target": "function:dev-ui/src/api/request.js:request",
"description": "login 调用 request.post",
"direction": "forward"
},
{
"id": "edge:23",
"type": "calls",
"source": "function:dev-ui/src/api/auth.js:getMe",
"target": "function:dev-ui/src/api/request.js:request",
"description": "getMe 调用 request.get",
"direction": "forward"
},
{
"id": "edge:24",
"type": "calls",
"source": "function:dev-ui/src/api/chat.js:sendChat",
"target": "function:dev-ui/src/api/request.js:request",
"description": "sendChat 调用 request.post",
"direction": "forward"
},
{
"id": "edge:25",
"type": "calls",
"source": "function:dev-ui/src/api/chat.js:sendSearch",
"target": "function:dev-ui/src/api/request.js:request",
"description": "sendSearch 调用 request.post",
"direction": "forward"
},
{
"id": "edge:26",
"type": "calls",
"source": "function:dev-ui/src/api/document.js:getDocuments",
"target": "function:dev-ui/src/api/request.js:request",
"description": "getDocuments 调用 request.get",
"direction": "forward"
},
{
"id": "edge:27",
"type": "calls",
"source": "function:dev-ui/src/api/document.js:uploadDocument",
"target": "function:dev-ui/src/api/request.js:request",
"description": "uploadDocument 调用 request.post",
"direction": "forward"
},
{
"id": "edge:28",
"type": "calls",
"source": "function:dev-ui/src/api/kb.js:getCollections",
"target": "function:dev-ui/src/api/request.js:request",
"description": "getCollections 调用 request.get",
"direction": "forward"
},
{
"id": "edge:29",
"type": "calls",
"source": "function:dev-ui/src/api/sync.js:getSyncStatus",
"target": "function:dev-ui/src/api/request.js:request",
"description": "getSyncStatus 调用 request.get",
"direction": "forward"
},
{
"id": "edge:30",
"type": "calls",
"source": "function:dev-ui/src/composables/useTheme.js:useTheme",
"target": "file:dev-ui/src/stores/app.js",
"description": "useTheme 调用 useAppStore",
"direction": "forward"
},
{
"id": "edge:31",
"type": "calls",
"source": "function:dev-ui/src/composables/useMarkdown.js:useMarkdown",
"target": "class:dev-ui/src/composables/useMarkdown.js:md",
"description": "useMarkdown 使用 md 实例渲染",
"direction": "forward"
},
{
"id": "edge:32",
"type": "calls",
"source": "function:dev-ui/src/components/FileViewer.vue:download",
"target": "function:dev-ui/src/api/document.js:getDocumentRawUrl",
"description": "download 使用 getDocumentRawUrl 生成下载链接",
"direction": "forward"
},
{
"id": "edge:33",
"type": "calls",
"source": "function:dev-ui/src/components/viewers/MarkdownViewer.vue:loadMd",
"target": "function:dev-ui/src/composables/useMarkdown.js:useMarkdown",
"description": "loadMd 调用 useMarkdown 的 render 函数",
"direction": "forward"
},
{
"id": "edge:34",
"type": "calls",
"source": "function:dev-ui/src/layouts/MainLayout.vue:handleLogout",
"target": "file:dev-ui/src/stores/auth.js",
"description": "handleLogout 调用 authStore.logout",
"direction": "forward"
},
{
"id": "edge:35",
"type": "calls",
"source": "function:dev-ui/src/layouts/MainLayout.vue:handleMenuSelect",
"target": "file:dev-ui/src/router/index.js",
"description": "handleMenuSelect 调用 router.push",
"direction": "forward"
},
{
"id": "edge:36",
"type": "contains",
"source": "file:dev-ui/src/api/request.js",
"target": "function:dev-ui/src/api/request.js:request",
"description": "request.js 包含 request 导出",
"direction": "forward"
},
{
"id": "edge:37",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:login",
"description": "auth.js 包含 login 函数",
"direction": "forward"
},
{
"id": "edge:38",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:getMe",
"description": "auth.js 包含 getMe 函数",
"direction": "forward"
},
{
"id": "edge:39",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:getUsers",
"description": "auth.js 包含 getUsers 函数",
"direction": "forward"
},
{
"id": "edge:40",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:updateUser",
"description": "auth.js 包含 updateUser 函数",
"direction": "forward"
},
{
"id": "edge:41",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:changePassword",
"description": "auth.js 包含 changePassword 函数",
"direction": "forward"
},
{
"id": "edge:42",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:getStats",
"description": "auth.js 包含 getStats 函数",
"direction": "forward"
},
{
"id": "edge:43",
"type": "contains",
"source": "file:dev-ui/src/api/auth.js",
"target": "function:dev-ui/src/api/auth.js:getHealth",
"description": "auth.js 包含 getHealth 函数",
"direction": "forward"
},
{
"id": "edge:44",
"type": "contains",
"source": "file:dev-ui/src/api/chat.js",
"target": "function:dev-ui/src/api/chat.js:sendChat",
"description": "chat.js 包含 sendChat 函数",
"direction": "forward"
},
{
"id": "edge:45",
"type": "contains",
"source": "file:dev-ui/src/api/chat.js",
"target": "function:dev-ui/src/api/chat.js:sendSearch",
"description": "chat.js 包含 sendSearch 函数",
"direction": "forward"
},
{
"id": "edge:46",
"type": "contains",
"source": "file:dev-ui/src/api/chat.js",
"target": "function:dev-ui/src/api/chat.js:testKbRoute",
"description": "chat.js 包含 testKbRoute 函数",
"direction": "forward"
},
{
"id": "edge:47",
"type": "contains",
"source": "file:dev-ui/src/api/chat.js",
"target": "function:dev-ui/src/api/chat.js:sendRagStream",
"description": "chat.js 包含 sendRagStream 函数",
"direction": "forward"
},
{
"id": "edge:48",
"type": "contains",
"source": "file:dev-ui/src/composables/useTheme.js",
"target": "function:dev-ui/src/composables/useTheme.js:useTheme",
"description": "useTheme.js 包含 useTheme 函数",
"direction": "forward"
},
{
"id": "edge:49",
"type": "contains",
"source": "file:dev-ui/src/composables/useMarkdown.js",
"target": "function:dev-ui/src/composables/useMarkdown.js:useMarkdown",
"description": "useMarkdown.js 包含 useMarkdown 函数",
"direction": "forward"
},
{
"id": "edge:50",
"type": "contains",
"source": "file:dev-ui/src/composables/useMarkdown.js",
"target": "function:dev-ui/src/composables/useMarkdown.js:escapeHtml",
"description": "useMarkdown.js 包含 escapeHtml 函数",
"direction": "forward"
},
{
"id": "edge:51",
"type": "contains",
"source": "file:dev-ui/src/composables/useMarkdown.js",
"target": "class:dev-ui/src/composables/useMarkdown.js:md",
"description": "useMarkdown.js 包含 md 实例",
"direction": "forward"
},
{
"id": "edge:52",
"type": "contains",
"source": "file:dev-ui/src/composables/useSSE.js",
"target": "function:dev-ui/src/composables/useSSE.js:useSSE",
"description": "useSSE.js 包含 useSSE 函数",
"direction": "forward"
},
{
"id": "edge:53",
"type": "contains",
"source": "file:dev-ui/src/composables/useSSE.js",
"target": "function:dev-ui/src/composables/useSSE.js:startStream",
"description": "useSSE.js 包含 startStream 函数",
"direction": "forward"
},
{
"id": "edge:54",
"type": "contains",
"source": "file:dev-ui/src/composables/useSSE.js",
"target": "function:dev-ui/src/composables/useSSE.js:abort",
"description": "useSSE.js 包含 abort 函数",
"direction": "forward"
},
{
"id": "edge:55",
"type": "contains",
"source": "file:dev-ui/src/layouts/MainLayout.vue",
"target": "function:dev-ui/src/layouts/MainLayout.vue:renderIcon",
"description": "MainLayout.vue 包含 renderIcon 函数",
"direction": "forward"
},
{
"id": "edge:56",
"type": "contains",
"source": "file:dev-ui/src/layouts/MainLayout.vue",
"target": "function:dev-ui/src/layouts/MainLayout.vue:handleMenuSelect",
"description": "MainLayout.vue 包含 handleMenuSelect 函数",
"direction": "forward"
},
{
"id": "edge:57",
"type": "contains",
"source": "file:dev-ui/src/layouts/MainLayout.vue",
"target": "function:dev-ui/src/layouts/MainLayout.vue:handleLogout",
"description": "MainLayout.vue 包含 handleLogout 函数",
"direction": "forward"
},
{
"id": "edge:58",
"type": "contains",
"source": "file:dev-ui/src/components/FileViewer.vue",
"target": "function:dev-ui/src/components/FileViewer.vue:download",
"description": "FileViewer.vue 包含 download 函数",
"direction": "forward"
},
{
"id": "edge:59",
"type": "contains",
"source": "file:dev-ui/src/components/ChunkDocumentView.vue",
"target": "function:dev-ui/src/components/ChunkDocumentView.vue:toggleSelect",
"description": "ChunkDocumentView.vue 包含 toggleSelect 函数",
"direction": "forward"
},
{
"id": "edge:60",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/PdfViewer.vue",
"target": "function:dev-ui/src/components/viewers/PdfViewer.vue:loadPdf",
"description": "PdfViewer.vue 包含 loadPdf 函数",
"direction": "forward"
},
{
"id": "edge:61",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/PdfViewer.vue",
"target": "function:dev-ui/src/components/viewers/PdfViewer.vue:renderPage",
"description": "PdfViewer.vue 包含 renderPage 函数",
"direction": "forward"
},
{
"id": "edge:62",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/PdfViewer.vue",
"target": "function:dev-ui/src/components/viewers/PdfViewer.vue:fitWidth",
"description": "PdfViewer.vue 包含 fitWidth 函数",
"direction": "forward"
},
{
"id": "edge:63",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/DocxViewer.vue",
"target": "function:dev-ui/src/components/viewers/DocxViewer.vue:loadDocx",
"description": "DocxViewer.vue 包含 loadDocx 函数",
"direction": "forward"
},
{
"id": "edge:64",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/ExcelViewer.vue",
"target": "function:dev-ui/src/components/viewers/ExcelViewer.vue:loadExcel",
"description": "ExcelViewer.vue 包含 loadExcel 函数",
"direction": "forward"
},
{
"id": "edge:65",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/TextViewer.vue",
"target": "function:dev-ui/src/components/viewers/TextViewer.vue:loadText",
"description": "TextViewer.vue 包含 loadText 函数",
"direction": "forward"
},
{
"id": "edge:66",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/MarkdownViewer.vue",
"target": "function:dev-ui/src/components/viewers/MarkdownViewer.vue:loadMd",
"description": "MarkdownViewer.vue 包含 loadMd 函数",
"direction": "forward"
},
{
"id": "edge:67",
"type": "contains",
"source": "file:dev-ui/src/components/viewers/ImageViewer.vue",
"target": "function:dev-ui/src/components/viewers/ImageViewer.vue:fitImage",
"description": "ImageViewer.vue 包含 fitImage 函数",
"direction": "forward"
},
{
"id": "edge-main-import-app",
"source": "file:dev-ui/src/main.js",
"target": "file:dev-ui/src/App.vue",
"type": "imports",
"description": "导入根组件",
"direction": "forward"
},
{
"id": "edge-main-import-router",
"source": "file:dev-ui/src/main.js",
"target": "file:dev-ui/src/router/index.js",
"type": "imports",
"description": "导入路由配置",
"direction": "forward"
},
{
"id": "edge-router-import-auth-store",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/stores/auth.js",
"type": "imports",
"description": "导入认证 store 用于路由守卫",
"direction": "forward"
},
{
"id": "edge-router-route-login",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Login.vue",
"type": "routes_to",
"description": "定义 Login 路由",
"direction": "forward"
},
{
"id": "edge-router-route-chat",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Chat.vue",
"type": "routes_to",
"description": "定义 Chat 路由",
"direction": "forward"
},
{
"id": "edge-router-route-kb",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/KnowledgeBase.vue",
"type": "routes_to",
"description": "定义 KnowledgeBase 路由",
"direction": "forward"
},
{
"id": "edge-router-route-documents",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Documents.vue",
"type": "routes_to",
"description": "定义 Documents 路由",
"direction": "forward"
},
{
"id": "edge-router-route-sync",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Sync.vue",
"type": "routes_to",
"description": "定义 Sync 路由",
"direction": "forward"
},
{
"id": "edge-router-route-feedback",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Feedback.vue",
"type": "routes_to",
"description": "定义 Feedback 路由",
"direction": "forward"
},
{
"id": "edge-router-route-images",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Images.vue",
"type": "routes_to",
"description": "定义 Images 路由",
"direction": "forward"
},
{
"id": "edge-router-route-audit",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Audit.vue",
"type": "routes_to",
"description": "定义 Audit 路由",
"direction": "forward"
},
{
"id": "edge-router-route-exam",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Exam.vue",
"type": "routes_to",
"description": "定义 Exam 路由",
"direction": "forward"
},
{
"id": "edge-router-route-settings",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/views/Settings.vue",
"type": "routes_to",
"description": "定义 Settings 路由",
"direction": "forward"
},
{
"id": "edge-router-route-layout",
"source": "file:dev-ui/src/router/index.js",
"target": "file:dev-ui/src/layouts/MainLayout.vue",
"type": "routes_to",
"description": "定义 MainLayout 作为父路由",
"direction": "forward"
},
{
"id": "edge-app-import-app-store",
"source": "file:dev-ui/src/App.vue",
"target": "file:dev-ui/src/stores/app.js",
"type": "imports",
"description": "使用 app store 获取主题状态",
"direction": "forward"
},
{
"id": "edge-chat-import-chat-store",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "file:dev-ui/src/stores/chat.js",
"type": "imports",
"description": "使用 chat store 管理聊天状态",
"direction": "forward"
},
{
"id": "edge-chat-import-auth-store",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "file:dev-ui/src/stores/auth.js",
"type": "imports",
"description": "使用 auth store 获取用户信息",
"direction": "forward"
},
{
"id": "edge-chat-import-sse",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "file:dev-ui/src/composables/useSSE",
"type": "imports",
"description": "使用 SSE 组合式函数处理流式响应",
"direction": "forward"
},
{
"id": "edge-chat-import-markdown",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "file:dev-ui/src/composables/useMarkdown",
"type": "imports",
"description": "使用 Markdown 渲染函数",
"direction": "forward"
},
{
"id": "edge-chat-import-session-api",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "module:dev-ui/src/api/session",
"type": "imports",
"description": "调用会话 API",
"direction": "forward"
},
{
"id": "edge-chat-import-kb-api",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "module:dev-ui/src/api/kb",
"type": "imports",
"description": "调用知识库 API 获取集合列表",
"direction": "forward"
},
{
"id": "edge-chat-import-chat-api",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "module:dev-ui/src/api/chat",
"type": "imports",
"description": "调用聊天 API",
"direction": "forward"
},
{
"id": "edge-chat-import-feedback-api",
"source": "file:dev-ui/src/views/Chat.vue",
"target": "module:dev-ui/src/api/feedback",
"type": "imports",
"description": "调用反馈 API 提交点赞/点踩",
"direction": "forward"
},
{
"id": "edge-login-import-auth-store",
"source": "file:dev-ui/src/views/Login.vue",
"target": "file:dev-ui/src/stores/auth.js",
"type": "imports",
"description": "使用 auth store 保存登录状态",
"direction": "forward"
},
{
"id": "edge-login-import-auth-api",
"source": "file:dev-ui/src/views/Login.vue",
"target": "module:dev-ui/src/api/auth",
"type": "imports",
"description": "调用登录和健康检查 API",
"direction": "forward"
},
{
"id": "edge-settings-import-auth-store",
"source": "file:dev-ui/src/views/Settings.vue",
"target": "file:dev-ui/src/stores/auth.js",
"type": "imports",
"description": "使用 auth store 获取当前用户信息",
"direction": "forward"
},
{
"id": "edge-settings-import-auth-api",
"source": "file:dev-ui/src/views/Settings.vue",
"target": "module:dev-ui/src/api/auth",
"type": "imports",
"description": "调用用户列表和密码修改 API",
"direction": "forward"
},
{
"id": "edge-kb-import-kb-store",
"source": "file:dev-ui/src/views/KnowledgeBase.vue",
"target": "file:dev-ui/src/stores/kb.js",
"type": "imports",
"description": "使用 kb store 管理知识库状态",
"direction": "forward"
},
{
"id": "edge-kb-import-chunk-view",
"source": "file:dev-ui/src/views/KnowledgeBase.vue",
"target": "file:dev-ui/src/components/ChunkDocumentView",
"type": "imports",
"description": "使用切片文档视图组件",
"direction": "forward"
},
{
"id": "edge-documents-import-file-viewer",
"source": "file:dev-ui/src/views/Documents.vue",
"target": "file:dev-ui/src/components/FileViewer",
"type": "imports",
"description": "使用文件预览组件",
"direction": "forward"
},
{
"id": "edge-sync-import-sync-api",
"source": "file:dev-ui/src/views/Sync.vue",
"target": "module:dev-ui/src/api/sync",
"type": "imports",
"description": "调用同步 API",
"direction": "forward"
},
{
"id": "edge-feedback-import-feedback-api",
"source": "file:dev-ui/src/views/Feedback.vue",
"target": "module:dev-ui/src/api/feedback",
"type": "imports",
"description": "调用反馈管理 API",
"direction": "forward"
},
{
"id": "edge-images-import-image-api",
"source": "file:dev-ui/src/views/Images.vue",
"target": "module:dev-ui/src/api/image",
"type": "imports",
"description": "调用图片 API",
"direction": "forward"
},
{
"id": "edge-audit-import-audit-api",
"source": "file:dev-ui/src/views/Audit.vue",
"target": "module:dev-ui/src/api/audit",
"type": "imports",
"description": "调用审计日志 API",
"direction": "forward"
},
{
"id": "edge-exam-import-exam-api",
"source": "file:dev-ui/src/views/Exam.vue",
"target": "module:dev-ui/src/api/exam",
"type": "imports",
"description": "调用出题 API",
"direction": "forward"
},
{
"id": "edge-exam-import-kb-api",
"source": "file:dev-ui/src/views/Exam.vue",
"target": "module:dev-ui/src/api/kb",
"type": "imports",
"description": "调用知识库 API 获取集合列表",
"direction": "forward"
},
{
"id": "edge-exam-import-document-api",
"source": "file:dev-ui/src/views/Exam.vue",
"target": "module:dev-ui/src/api/document",
"type": "imports",
"description": "调用文档 API 获取文档列表",
"direction": "forward"
},
{
"source": "module:repositories/__init__.py",
"target": "module:repositories/session_repo.py",
"type": "imports",
"direction": "forward"
},
{
"source": "module:repositories/__init__.py",
"target": "class:repositories/session_repo.py:BaseSessionRepo",
"type": "exports",
"direction": "forward"
},
{
"source": "module:repositories/session_repo.py",
"target": "class:repositories/session_repo.py:BaseSessionRepo",
"type": "contains",
"direction": "forward"
},
{
"source": "class:repositories/session_repo.py:BaseSessionRepo",
"target": "file:BaseSessionRepo.get_history",
"type": "contains",
"direction": "forward"
},
{
"source": "class:repositories/session_repo.py:BaseSessionRepo",
"target": "file:BaseSessionRepo.add_message",
"type": "contains",
"direction": "forward"
},
{
"source": "class:repositories/session_repo.py:BaseSessionRepo",
"target": "file:BaseSessionRepo.create_session",
"type": "contains",
"direction": "forward"
},
{
"source": "class:repositories/session_repo.py:BaseSessionRepo",
"target": "file:BaseSessionRepo.get_user_sessions",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "file:DOMAIN_TERMS",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:get_domain_terms",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:cosine_similarity",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:expand_query_safe",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:expand_query_data_driven",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:extract_keywords",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/query_expansion.py",
"target": "function:__nofilepath__:merge_expansion_results",
"type": "contains",
"direction": "forward"
},
{
"source": "function:__nofilepath__:expand_query_safe",
"target": "function:__nofilepath__:get_domain_terms",
"type": "calls",
"direction": "forward"
},
{
"source": "function:__nofilepath__:expand_query_safe",
"target": "function:__nofilepath__:cosine_similarity",
"type": "calls",
"direction": "forward"
},
{
"source": "function:__nofilepath__:expand_query_data_driven",
"target": "function:__nofilepath__:extract_keywords",
"type": "calls",
"direction": "forward"
},
{
"source": "function:__nofilepath__:merge_expansion_results",
"target": "function:__nofilepath__:extract_keywords",
"type": "calls",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "module:storage/file_provider.py",
"type": "imports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "module:storage/file_fetcher.py",
"type": "imports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_provider.py:FileProvider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "file:FileInfo",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_provider.py:LocalFileProvider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_provider.py:SMBFileProvider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_provider.py:S3FileProvider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_provider.py:HttpFileProvider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "function:storage/file_provider.py:get_file_provider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "function:storage/file_provider.py:reset_provider",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "function:storage/file_fetcher.py:get_file_for_parsing",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "function:storage/file_fetcher.py:cleanup_temp_file",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "class:storage/file_fetcher.py:FileFetcher",
"type": "exports",
"direction": "forward"
},
{
"source": "module:storage/__init__.py",
"target": "function:storage/file_fetcher.py:fetch_file",
"type": "exports",
"direction": "forward"
},
{
"source": "module:services/__init__.py",
"target": "module:services/session.py",
"type": "imports",
"direction": "forward"
},
{
"source": "module:services/__init__.py",
"target": "class:services/session.py:SessionManager",
"type": "exports",
"direction": "forward"
},
{
"source": "file:graph/graph_manager.py",
"target": "class:__nofilepath__:Entity",
"type": "contains",
"direction": "forward"
},
{
"source": "file:graph/graph_manager.py",
"target": "class:__nofilepath__:Relation",
"type": "contains",
"direction": "forward"
},
{
"source": "file:graph/graph_manager.py",
"target": "class:__nofilepath__:Triple",
"type": "contains",
"direction": "forward"
},
{
"source": "file:graph/graph_manager.py",
"target": "class:__nofilepath__:GraphManager",
"type": "contains",
"direction": "forward"
},
{
"source": "file:graph/graph_manager.py",
"target": "function:__nofilepath__:get_graph_manager",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.connect",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.close",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.create_entity",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.get_entity",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.delete_entity",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.create_relation",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.get_relations",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.build_from_triples",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.clear_graph",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.search_subgraph",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.get_entity_neighbors",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.search_by_relation",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager.get_stats",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:GraphManager",
"target": "file:GraphManager._sanitize_relation_type",
"type": "contains",
"direction": "forward"
},
{
"source": "file:GraphManager.create_relation",
"target": "file:GraphManager._sanitize_relation_type",
"type": "calls",
"direction": "forward"
},
{
"source": "file:GraphManager.get_entity_neighbors",
"target": "file:GraphManager._sanitize_relation_type",
"type": "calls",
"direction": "forward"
},
{
"source": "file:GraphManager.search_by_relation",
"target": "file:GraphManager._sanitize_relation_type",
"type": "calls",
"direction": "forward"
},
{
"source": "file:GraphManager.build_from_triples",
"target": "file:GraphManager.create_entity",
"type": "calls",
"direction": "forward"
},
{
"source": "file:GraphManager.build_from_triples",
"target": "file:GraphManager.create_relation",
"type": "calls",
"direction": "forward"
},
{
"source": "function:__nofilepath__:get_graph_manager",
"target": "class:__nofilepath__:GraphManager",
"type": "calls",
"direction": "forward"
},
{
"source": "file:core/semantic_cache.py",
"target": "class:__nofilepath__:SemanticCache",
"type": "contains",
"direction": "forward"
},
{
"source": "file:core/semantic_cache.py",
"target": "function:__nofilepath__:get_semantic_cache",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:SemanticCache",
"target": "file:SemanticCache.get",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:SemanticCache",
"target": "file:SemanticCache.set",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:SemanticCache",
"target": "file:SemanticCache.clear",
"type": "contains",
"direction": "forward"
},
{
"source": "class:__nofilepath__:SemanticCache",
"target": "file:SemanticCache.get_stats",
"type": "contains",
"direction": "forward"
},
{
"source": "function:__nofilepath__:get_semantic_cache",
"target": "class:__nofilepath__:SemanticCache",
"type": "calls",
"direction": "forward"
},
{
"source": "file:core/status_codes.py",
"target": "function:__nofilepath__:get_status_message",
"type": "contains",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:KnowledgeBaseManager",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:KnowledgeBaseRouter",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:KnowledgeSyncService",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:BM25Index",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:CollectionInfo",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "class:__nofilepath__:SearchResult",
"type": "exports",
"direction": "forward"
},
{
"source": "file:knowledge/__init__.py",
"target": "file:PUBLIC_KB_NAME",
"type": "exports",
"direction": "forward"
},
{
"source": "module:repositories/stateless_session_repo.py",
"target": "module:repositories/session_repo.py",
"type": "imports",
"description": "导入 BaseSessionRepo 基类",
"direction": "forward"
},
{
"source": "class:repositories/stateless_session_repo.py:StatelessSessionRepo",
"target": "class:repositories/session_repo.py:BaseSessionRepo",
"type": "extends",
"description": "继承 BaseSessionRepo 抽象基类",
"direction": "forward"
},
{
"source": "module:repositories/sqlite_session_repo.py",
"target": "module:repositories/session_repo.py",
"type": "imports",
"description": "导入 BaseSessionRepo 基类",
"direction": "forward"
},
{
"source": "class:repositories/sqlite_session_repo.py:SQLiteSessionRepo",
"target": "class:repositories/session_repo.py:BaseSessionRepo",
"type": "extends",
"description": "继承 BaseSessionRepo 抽象基类",
"direction": "forward"
},
{
"source": "class:services/feedback.py:FeedbackService",
"target": "class:services/feedback.py:FeedbackDB",
"type": "uses",
"description": "FeedbackService 使用 FeedbackDB 进行数据库操作",
"direction": "forward"
},
{
"source": "function:services/feedback.py:create_feedback_service",
"target": "class:services/feedback.py:FeedbackDB",
"type": "creates",
"description": "创建 FeedbackDB 实例",
"direction": "forward"
},
{
"source": "function:services/feedback.py:create_feedback_service",
"target": "class:services/feedback.py:FeedbackService",
"type": "creates",
"description": "创建 FeedbackService 实例",
"direction": "forward"
},
{
"source": "class:services/outline.py:OutlineGenerator",
"target": "class:services/outline.py:OutlineDB",
"type": "uses",
"description": "OutlineGenerator 使用 OutlineDB 进行数据存储",
"direction": "forward"
},
{
"source": "class:services/outline.py:RecommendationService",
"target": "class:services/outline.py:OutlineDB",
"type": "uses",
"description": "RecommendationService 使用 OutlineDB 进行数据存储",
"direction": "forward"
},
{
"source": "function:services/outline.py:create_services",
"target": "class:services/outline.py:OutlineDB",
"type": "creates",
"description": "创建 OutlineDB 实例",
"direction": "forward"
},
{
"source": "function:services/outline.py:create_services",
"target": "class:services/outline.py:OutlineGenerator",
"type": "creates",
"description": "创建 OutlineGenerator 实例",
"direction": "forward"
},
{
"source": "function:services/outline.py:create_services",
"target": "class:services/outline.py:RecommendationService",
"type": "creates",
"description": "创建 RecommendationService 实例",
"direction": "forward"
},
{
"source": "class:storage/file_provider.py:LocalFileProvider",
"target": "class:storage/file_provider.py:FileProvider",
"type": "extends",
"description": "继承 FileProvider 抽象基类",
"direction": "forward"
},
{
"source": "class:storage/file_provider.py:SMBFileProvider",
"target": "class:storage/file_provider.py:FileProvider",
"type": "extends",
"description": "继承 FileProvider 抽象基类",
"direction": "forward"
},
{
"source": "class:storage/file_provider.py:S3FileProvider",
"target": "class:storage/file_provider.py:FileProvider",
"type": "extends",
"description": "继承 FileProvider 抽象基类",
"direction": "forward"
},
{
"source": "class:storage/file_provider.py:HttpFileProvider",
"target": "class:storage/file_provider.py:FileProvider",
"type": "extends",
"description": "继承 FileProvider 抽象基类",
"direction": "forward"
},
{
"source": "function:storage/file_provider.py:get_file_provider",
"target": "class:storage/file_provider.py:LocalFileProvider",
"type": "creates",
"description": "根据配置创建 LocalFileProvider 实例",
"direction": "forward"
},
{
"source": "function:storage/file_provider.py:get_file_provider",
"target": "class:storage/file_provider.py:SMBFileProvider",
"type": "creates",
"description": "根据配置创建 SMBFileProvider 实例",
"direction": "forward"
},
{
"source": "function:storage/file_provider.py:get_file_provider",
"target": "class:storage/file_provider.py:S3FileProvider",
"type": "creates",
"description": "根据配置创建 S3FileProvider 实例",
"direction": "forward"
},
{
"source": "function:storage/file_provider.py:get_file_provider",
"target": "class:storage/file_provider.py:HttpFileProvider",
"type": "creates",
"description": "根据配置创建 HttpFileProvider 实例",
"direction": "forward"
},
{
"source": "class:storage/file_fetcher.py:FileFetcher",
"target": "function:storage/file_fetcher.py:get_file_for_parsing",
"type": "calls",
"description": "在 __enter__ 中调用 get_file_for_parsing",
"direction": "forward"
},
{
"source": "class:storage/file_fetcher.py:FileFetcher",
"target": "function:storage/file_fetcher.py:cleanup_temp_file",
"type": "calls",
"description": "在 __exit__ 中调用 cleanup_temp_file",
"direction": "forward"
},
{
"source": "function:storage/file_fetcher.py:fetch_file",
"target": "class:storage/file_fetcher.py:FileFetcher",
"type": "creates",
"description": "创建 FileFetcher 实例",
"direction": "forward"
}
],
"layers": [
{
"id": "layer:entry-point",
"name": "入口层",
"description": "应用启动入口和配置加载",
"nodeIds": [
"file:main.py",
"config:config.py",
"config:config.example.py",
"config:requirements.txt"
]
},
{
"id": "layer:api-routes",
"name": "API 路由层",
"description": "Flask Blueprint 路由定义,处理 HTTP 请求和响应",
"nodeIds": [
"file:api/__init__.py",
"file:api/chat_routes.py",
"file:api/kb_routes.py",
"file:api/document_routes.py",
"file:api/sync_routes.py",
"file:api/image_routes.py",
"file:api/auth_routes.py",
"file:api/session_routes.py",
"file:api/feedback_routes.py",
"file:api/audit_routes.py",
"file:api/response_utils.py"
]
},
{
"id": "layer:auth-security",
"name": "认证安全层",
"description": "用户认证、权限验证和输入输出安全过滤",
"nodeIds": [
"file:auth/__init__.py",
"file:auth/gateway.py",
"file:auth/security.py"
]
},
{
"id": "layer:core-engine",
"name": "核心引擎层",
"description": "RAG 核心组件检索引擎、Agentic RAG、BM25 索引、分块器、缓存等",
"nodeIds": [
"file:core/__init__.py",
"file:core/engine.py",
"file:core/agentic.py",
"file:core/agentic_base.py",
"file:core/agentic_query.py",
"file:core/agentic_search.py",
"file:core/agentic_answer.py",
"file:core/agentic_citation.py",
"file:core/agentic_media.py",
"file:core/agentic_quality.py",
"file:core/agentic_context.py",
"file:core/agentic_meta.py",
"file:core/bm25_index.py",
"file:core/chunker.py",
"file:core/constants.py",
"file:core/cache.py",
"file:core/semantic_cache.py",
"file:core/mmr.py",
"file:core/query_classifier.py",
"file:core/query_expansion.py",
"file:core/query_decomposer.py",
"file:core/confidence_gate.py",
"file:core/intent_analyzer.py",
"file:core/quality_assessor.py",
"file:core/reasoning_reflector.py",
"file:core/llm_utils.py",
"file:core/llm_budget.py",
"file:core/loop_guard.py",
"file:core/status_codes.py",
"file:core/adaptive_topk.py"
]
},
{
"id": "layer:knowledge-management",
"name": "知识库管理层",
"description": "向量库管理、文档处理、同步服务和知识库路由",
"nodeIds": [
"file:knowledge/__init__.py",
"file:knowledge/manager.py",
"file:knowledge/router.py",
"file:knowledge/collection.py",
"file:knowledge/document.py",
"file:knowledge/chunk.py",
"file:knowledge/index.py",
"file:knowledge/search.py",
"file:knowledge/sync.py",
"file:knowledge/permission.py",
"file:knowledge/base.py",
"file:knowledge/processing.py",
"file:knowledge/lazy_enhance.py",
"file:knowledge/cleanup.py",
"file:knowledge/document_versions.py"
]
},
{
"id": "layer:parsers",
"name": "文档解析层",
"description": "PDF、Excel、图片等文档的解析和内容提取",
"nodeIds": [
"file:parsers/__init__.py",
"file:parsers/pdf_mineru.py",
"file:parsers/mineru_parser.py",
"file:parsers/excel_parser.py",
"file:parsers/image_extractor.py",
"file:parsers/txt_parser.py"
]
},
{
"id": "layer:services",
"name": "业务服务层",
"description": "会话管理、反馈服务、纲要生成等业务逻辑",
"nodeIds": [
"file:services/__init__.py",
"file:services/session.py",
"file:services/feedback.py",
"file:services/outline.py"
]
},
{
"id": "layer:repositories",
"name": "数据访问层",
"description": "数据库访问抽象和实现",
"nodeIds": [
"file:repositories/__init__.py",
"file:repositories/session_repo.py",
"file:repositories/sqlite_session_repo.py",
"file:repositories/stateless_session_repo.py"
]
},
{
"id": "layer:storage",
"name": "存储层",
"description": "文件存储抽象、文档存储、图片存储、VLM 缓存",
"nodeIds": [
"file:storage/__init__.py",
"file:storage/doc_store.py",
"file:storage/image_store.py",
"file:storage/vlm_cache.py",
"file:storage/file_fetcher.py"
]
},
{
"id": "layer:graph-rag",
"name": "图谱 RAG 层",
"description": "Neo4j 图谱构建和 Graph RAG 查询",
"nodeIds": [
"file:graph/__init__.py",
"file:graph/graph_build.py",
"file:graph/graph_manager.py",
"file:graph/graph_rag.py"
]
},
{
"id": "layer:exam-system",
"name": "出题系统层",
"description": "试卷生成、批阅和评分系统",
"nodeIds": [
"file:exam_pkg/__init__.py",
"file:exam_pkg/api.py",
"file:exam_pkg/manager.py",
"file:exam_pkg/generator.py",
"file:exam_pkg/grader.py"
]
},
{
"id": "layer:frontend-dev-ui",
"name": "前端开发界面",
"description": "Vue 3 + Naive UI 开发版前端应用",
"nodeIds": [
"file:dev-ui/index.html",
"file:dev-ui/src/main.js",
"file:dev-ui/src/App.vue"
]
},
{
"id": "layer:frontend-chat-ui",
"name": "前端生产界面",
"description": "原生 JavaScript 生产版前端应用",
"nodeIds": [
"document:chat-ui/index.html",
"document:chat-ui/exam.html",
"document:chat-ui/api-test.html",
"config:chat-ui/style.css"
]
},
{
"id": "layer:deployment",
"name": "部署配置层",
"description": "Docker、docker-compose 和生产环境配置",
"nodeIds": [
"config:deploy/Dockerfile",
"config:deploy/docker-compose.yml",
"config:deploy/docker-compose.prod.yml",
"service:deploy/Dockerfile.prod",
"config:deploy/gunicorn.conf.py"
]
},
{
"id": "layer:documentation",
"name": "文档层",
"description": "项目文档、指南和设计文档",
"nodeIds": [
"document:README.md",
"document:CLAUDE.md",
"document:AGENTS.md",
"document:CHANGELOG.md",
"document:docs/API与后端对接规范.md",
"document:docs/Agentic_RAG完整指南.md",
"document:docs/Graph_RAG使用指南.md",
"document:docs/MinerU模型部署指南.md",
"document:docs/RAG数据流程详解.md",
"document:docs/出题批卷系统设计.md",
"document:docs/开发与系统模块说明.md",
"document:docs/数据库设计文档.md",
"document:docs/架构与部署方案.md",
"document:docs/测试指南.md",
"document:docs/认证与权限配置指南.md"
]
},
{
"id": "layer:tools",
"name": "工具脚本层",
"description": "分析和维护工具脚本",
"nodeIds": [
"file:tools/chunk_analyzer.py",
"file:tools/chunk_metrics.py",
"file:tools/chunk_report.py",
"file:tools/clean_vector_store.py",
"file:tools/export_chunks.py"
]
},
{
"id": "layer:data",
"name": "数据层",
"description": "数据库连接和初始化",
"nodeIds": [
"file:data/__init__.py",
"file:data/db.py"
]
}
],
"tour": [
{
"order": 1,
"title": "项目概览",
"description": "从 README 和 CLAUDE.md 了解项目的功能定位、技术架构和快速启动方式。",
"nodeIds": [
"document:README.md",
"document:CLAUDE.md"
]
},
{
"order": 2,
"title": "应用入口",
"description": "了解 Flask 应用如何启动,配置如何加载。",
"nodeIds": [
"file:main.py",
"config:config.py",
"file:api/__init__.py"
]
},
{
"order": 3,
"title": "API 路由层",
"description": "探索各功能模块的 API 接口定义,理解请求处理流程。",
"nodeIds": [
"file:api/chat_routes.py",
"file:api/kb_routes.py",
"file:api/document_routes.py"
]
},
{
"order": 4,
"title": "认证与安全",
"description": "理解用户认证流程和安全过滤机制。",
"nodeIds": [
"file:auth/gateway.py",
"file:auth/security.py"
]
},
{
"order": 5,
"title": "RAG 核心引擎",
"description": "深入理解 Agentic RAG 的 Mixin 架构和智能问答流程。",
"nodeIds": [
"file:core/agentic.py",
"file:core/engine.py",
"file:core/bm25_index.py",
"file:core/chunker.py"
]
},
{
"order": 6,
"title": "知识库管理",
"description": "学习向量库的创建、文档处理和同步服务。",
"nodeIds": [
"file:knowledge/manager.py",
"file:knowledge/router.py",
"file:knowledge/sync.py"
]
},
{
"order": 7,
"title": "文档解析器",
"description": "了解 PDF、Excel 等文档的解析和内容提取流程。",
"nodeIds": [
"file:parsers/pdf_mineru.py",
"file:parsers/excel_parser.py"
]
},
{
"order": 8,
"title": "存储与服务层",
"description": "理解文件存储抽象和业务服务的设计模式。",
"nodeIds": [
"file:storage/doc_store.py",
"file:services/session.py"
]
},
{
"order": 9,
"title": "Graph RAG",
"description": "探索 Neo4j 图谱构建和知识图谱查询。",
"nodeIds": [
"file:graph/graph_manager.py",
"file:graph/graph_rag.py"
]
},
{
"order": 10,
"title": "出题系统",
"description": "了解试卷生成和批阅的实现逻辑。",
"nodeIds": [
"file:exam_pkg/manager.py",
"file:exam_pkg/generator.py",
"file:exam_pkg/grader.py"
]
},
{
"order": 11,
"title": "前端界面",
"description": "探索 Vue 3 前端应用的结构和状态管理。",
"nodeIds": [
"file:dev-ui/src/main.js",
"file:dev-ui/src/App.vue"
]
},
{
"order": 12,
"title": "部署配置",
"description": "理解 Docker 容器化和生产环境部署方案。",
"nodeIds": [
"config:deploy/Dockerfile",
"config:deploy/docker-compose.prod.yml",
"config:deploy/gunicorn.conf.py"
]
}
]
}