From 710d759b8e1df5c6d4c8f1d5497a09ea57bd08c1 Mon Sep 17 00:00:00 2001 From: wizardchen Date: Wed, 3 Jun 2026 21:43:11 +0800 Subject: [PATCH] feat(ui): update SVG assets and enhance localization for knowledge framework - Redesigned SVG assets for screenshots to improve visual consistency and clarity, including updates to gradients, titles, and layout. - Added a new screenshot asset to showcase the Wiki Knowledge Base feature. - Enhanced localization strings across multiple languages to reflect updated terminology and descriptions for the knowledge framework, including agentic reasoning and hybrid search strategies. - Improved the user interface in the login view to include new tags for agent and wiki features, enhancing user awareness of available functionalities. --- frontend/src/assets/img/screenshot-1.svg | 135 ++++++------ frontend/src/assets/img/screenshot-2.svg | 205 ++++++----------- frontend/src/assets/img/screenshot-3.svg | 108 +++++++++ frontend/src/assets/img/screenshot-4.svg | 148 ++++++------- .../GlobalCommandPalette/useHighlight.ts | 22 ++ frontend/src/i18n/locales/en-US.ts | 24 +- frontend/src/i18n/locales/ko-KR.ts | 24 +- frontend/src/i18n/locales/ru-RU.ts | 24 +- frontend/src/i18n/locales/zh-CN.ts | 24 +- frontend/src/types/tool-results.ts | 4 + frontend/src/views/auth/Login.vue | 9 +- .../chat/components/AgentStreamDisplay.vue | 18 +- .../components/tool-results/ContentPopup.vue | 177 +++++++++------ .../components/tool-results/GrepResults.vue | 126 ++++------- .../components/tool-results/ResultRow.vue | 137 ++++++++++++ .../components/tool-results/SearchResults.vue | 206 ++++++------------ .../components/tool-results/contentClean.ts | 38 ++++ internal/agent/tools/grep_chunks.go | 6 + 18 files changed, 803 insertions(+), 632 deletions(-) create mode 100644 frontend/src/assets/img/screenshot-3.svg create mode 100644 frontend/src/views/chat/components/tool-results/ResultRow.vue create mode 100644 frontend/src/views/chat/components/tool-results/contentClean.ts diff --git a/frontend/src/assets/img/screenshot-1.svg b/frontend/src/assets/img/screenshot-1.svg index 1ca5d27f..1ec48493 100644 --- a/frontend/src/assets/img/screenshot-1.svg +++ b/frontend/src/assets/img/screenshot-1.svg @@ -1,82 +1,73 @@ - - - - + + + + + + + + + + - - - - - - - - 智能文档检索 - 多模态文档解析 • 语义理解 • 精准检索 - - - - - - - - 输入查询内容进行智能检索... - - - - 检索 + + + + + + Intelligent Document Retrieval + Multimodal parsing · Semantic understanding · Precise locating + + + - - - - - - - - - - - - - - RAG系统技术文档.pdf - 详细介绍了检索增强生成的核心原理和实现方案... - 3.2 MB • 127页 • 2024-01-20 + + + + + + WeKnora · Knowledge Search + + + + + + How is liability for breach defined in the contract? + + Search - - - - - - - - - - - - - 向量检索优化方案.docx - 基于Embedding的语义检索技术实践与优化... - 1.8 MB • 45页 • 2024-01-19 + + + + + + Purchase Agreement · Clause 7 Liability + A breaching party shall pay 20% of the total contract value as penalty... + + 98% match - - - - - - - - - - + + + + + + Addendum.pdf · Page 2 + The breaching party shall also compensate for the actual losses incurred... + + 91% match + + + + Formats + + PDF + Word + Excel + Image + Audio + Markdown - - - 知识图谱架构图.png - 展示知识图谱的节点关系和查询路径... - 1.2 MB • 1920×1080 • 2024-01-18 - diff --git a/frontend/src/assets/img/screenshot-2.svg b/frontend/src/assets/img/screenshot-2.svg index ec4d50c4..3f1a1dda 100644 --- a/frontend/src/assets/img/screenshot-2.svg +++ b/frontend/src/assets/img/screenshot-2.svg @@ -1,154 +1,85 @@ - - - - + + + + + + + + + + - - - - - - - - 混合检索策略 - BM25 关键词 + 向量语义 + 知识图谱 - - + + + + + + Hybrid Search Strategy + Keyword + vector semantics + knowledge graph, fused for the best result + + + + + - - - - BM25 - - - - - K - - - - 关键词匹配 - - - - TF-IDF 权重 - - - - - 词频统计 - - - - - 精确匹配 + + + + + BM25 Keyword + + TF-IDF weights + Term frequency + Exact match + Strong on terms - + - - - - 向量检索 - - - - - - - - - - - - - - - - - - - - - - - 语义理解 - - - - Embedding - - - - - 余弦相似度 - - - - - ANN 检索 + + + + + Vector Semantic + + Embedding + Cosine similarity + ANN search + Understands meaning - - - - - - 知识图谱 - - - - - - - - - - - - - - - - - - - 关系推理 - - - - 实体识别 - - - - - 路径查询 - - - - - 子图匹配 + + + + + + + Knowledge Graph + + Entity recognition + Relation paths + Subgraph match + Reasons over links - - - - - - - - - - 融合排序 → 最优结果 + + + + + - - + + + + RRF fusion ranking -> best result + + - - + + diff --git a/frontend/src/assets/img/screenshot-3.svg b/frontend/src/assets/img/screenshot-3.svg new file mode 100644 index 00000000..18d0ece0 --- /dev/null +++ b/frontend/src/assets/img/screenshot-3.svg @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + Wiki Knowledge Base + Distill scattered documents into structured, interlinked pages and a knowledge graph + + + + + + + + + + + + + + + + + + Source Docs + + + + + LLM Distill + + + + + + Overview + + + + + + + Architecture + + + + + + + FAQ + + + + + + + + + + + Graph + + + + + + + + + + + + + + + + + + + + + + + + + + Structured + Auto-linked + Graph + Auto-sync + + + + + + + + diff --git a/frontend/src/assets/img/screenshot-4.svg b/frontend/src/assets/img/screenshot-4.svg index 8c02d790..e1fe7fd9 100644 --- a/frontend/src/assets/img/screenshot-4.svg +++ b/frontend/src/assets/img/screenshot-4.svg @@ -1,102 +1,76 @@ - - - - + + + + + + + + + + - - - - - - - - Agentic RAG - 基于 ReAct 范式的智能检索代理 - - - - - 用户问题 + + + + + + Agentic RAG + A ReAct-style agent that reasons, calls tools and iterates over multiple steps + + + - - - - - - - - ReAct 循环 - - - - - ① Reasoning - 分析问题 - 规划行动策略 + + + + User Question + + + + + + + ReAct Loop + + + + 1. Reasoning + Analyze the question + Plan the next action - - - - - - - - ② Acting (Tools) - - - - - - 🔍 向量检索 - - - - - - - 🔗 知识图谱 - - - - - - - 📊 BM25检索 + + + + + + 2. Acting (Tools) + + Vector Search + Knowledge Graph + Web Search - - - - 迭代优化 + + + Observe results · iterate - - - - - - - - ③ 生成增强答案 + + + + + + 3. Grounded, cited answer - - - - 特点: - • 自主推理 - • 工具调用 - • 动态迭代 - - - + - - + + - - + + diff --git a/frontend/src/components/GlobalCommandPalette/useHighlight.ts b/frontend/src/components/GlobalCommandPalette/useHighlight.ts index 3d8bf687..8b086728 100644 --- a/frontend/src/components/GlobalCommandPalette/useHighlight.ts +++ b/frontend/src/components/GlobalCommandPalette/useHighlight.ts @@ -15,6 +15,28 @@ export function escapeHtml(str: string): string { .replace(/'/g, ''') } +export function highlightRegex(text: string, pattern: string): string { + const src = text || '' + const p = (pattern || '').trim() + const escaped = escapeHtml(src) + if (!p) return escaped + try { + const re = new RegExp(p, 'gi') + let result = '' + let lastIndex = 0 + for (const match of src.matchAll(re)) { + const idx = match.index ?? 0 + result += escapeHtml(src.slice(lastIndex, idx)) + result += `${escapeHtml(match[0])}` + lastIndex = idx + match[0].length + } + result += escapeHtml(src.slice(lastIndex)) + return result + } catch { + return escaped + } +} + export function highlightText(text: string, query: string): string { const q = (query || '').trim() const escaped = escapeHtml(text || '') diff --git a/frontend/src/i18n/locales/en-US.ts b/frontend/src/i18n/locales/en-US.ts index d7595664..94a1526d 100755 --- a/frontend/src/i18n/locales/en-US.ts +++ b/frontend/src/i18n/locales/en-US.ts @@ -2697,6 +2697,8 @@ export default { referenceIconAlt: 'Reference materials icon', chunkIdLabel: 'Chunk ID:', documentIdLabel: 'Document ID:', + chunkOrdinal: 'Chunk {index}', + previewContent: 'Preview content', noPlanSteps: 'No detailed steps provided', chunkIndexLabel: 'Chunk #{index}', chunkPositionLabel: '(Position: {position})', @@ -3503,22 +3505,26 @@ export default { }, }, platform: { - subtitle: 'Enterprise-level Intelligent Document Retrieval Framework', - description: 'Making complex document understanding and precise retrieval simple', + subtitle: 'LLM-Powered Enterprise Knowledge Framework', + description: 'RAG retrieval, agentic reasoning and Wiki knowledge bases — so your documents are truly understood and put to work', rag: 'RAG Enhanced Generation', + agent: 'ReAct Agent', + wiki: 'Wiki Knowledge Base', hybridSearch: 'Hybrid Search', localDeploy: 'Local Deployment', multimodalParsing: 'Multimodal Document Parsing', - hybridSearchEngine: 'Hybrid Search Engine', - ragQandA: 'RAG Intelligent Q&A', + hybridSearchEngine: 'Hybrid Search + Knowledge Graph', + ragQandA: 'ReAct Agent Q&A', independentTenant: 'Independent Tenant Space', fullApiAccess: 'Full API Access', knowledgeBaseManagement: 'Knowledge Base Management', carousel: { agenticRagTitle: 'Agentic RAG', - agenticRagDesc: 'Query rewriting + smart recall + re-ranking', + agenticRagDesc: 'ReAct reasoning + tool calls + multi-step thinking', hybridSearchTitle: 'Hybrid search strategy', hybridSearchDesc: 'BM25 + Vector + Knowledge Graph', + wikiTitle: 'Wiki Knowledge Base', + wikiDesc: 'Distills documents into structured, interlinked knowledge', smartDocRetrievalTitle: 'Intelligent document retrieval', smartDocRetrievalDesc: 'PDF/Word/Image multi-format parsing' } @@ -4558,8 +4564,12 @@ export default { foundResultsFromFiles: 'Found {count} result(s) from {files} file(s)', foundResults: 'Found {count} result(s)', webResults: 'Found {count} web search result(s)', - foundMatches: 'Found {count} match(es)', - showingCount: '(showing {count})', + grepSummary: 'Found {chunks} matching chunk(s) across {docs} document(s)', + }, + grepResults: { + chunkHits: '{count} chunks', + keywordHits: '{count} hits', + titleMatch: 'title', }, toolStatus: { calling: 'Calling {name}...', diff --git a/frontend/src/i18n/locales/ko-KR.ts b/frontend/src/i18n/locales/ko-KR.ts index 2051f101..00b421ae 100755 --- a/frontend/src/i18n/locales/ko-KR.ts +++ b/frontend/src/i18n/locales/ko-KR.ts @@ -802,6 +802,8 @@ export default { referenceIconAlt: "참조 내용 아이콘", chunkIdLabel: "청크 ID:", documentIdLabel: "문서 ID:", + chunkOrdinal: "청크 {index}", + previewContent: "내용 미리보기", noPlanSteps: "구체적인 단계가 제공되지 않았습니다", chunkIndexLabel: "청크 #{index}", chunkPositionLabel: "(위치: {position})", @@ -2732,22 +2734,26 @@ export default { }, }, platform: { - subtitle: "엔터프라이즈급 지능형 문서 검색 프레임워크", - description: "복잡한 문서 이해와 정확한 검색을 간단하게", + subtitle: "대규모 언어 모델 기반 엔터프라이즈 지식 프레임워크", + description: "RAG 검색, 에이전트 추론, Wiki 지식베이스로 문서를 진정으로 이해하고 활용합니다", rag: "RAG 강화 생성", + agent: "ReAct 에이전트", + wiki: "Wiki 지식베이스", hybridSearch: "하이브리드 검색", localDeploy: "로컬 배포", multimodalParsing: "멀티모달 문서 파싱", - hybridSearchEngine: "하이브리드 검색 엔진", - ragQandA: "RAG 지능형 Q&A", + hybridSearchEngine: "하이브리드 검색 + 지식 그래프", + ragQandA: "ReAct 에이전트 Q&A", independentTenant: "독립 테넌트 스페이스", fullApiAccess: "전체 API 접근", knowledgeBaseManagement: "지식베이스 관리", carousel: { agenticRagTitle: "Agentic RAG", - agenticRagDesc: "질문 재작성 + 지능형 검색 + 재정렬", + agenticRagDesc: "ReAct 추론 + 도구 호출 + 다단계 사고", hybridSearchTitle: "하이브리드 검색 전략", hybridSearchDesc: "BM25 + 벡터 + 지식 그래프", + wikiTitle: "Wiki 지식베이스", + wikiDesc: "문서를 구조화된 상호 연결 지식으로 정제", smartDocRetrievalTitle: "지능형 문서 검색", smartDocRetrievalDesc: "PDF/Word/이미지 다중 형식 파싱", }, @@ -4613,8 +4619,12 @@ export default { foundResultsFromFiles: '{files}개 파일에서 {count}개 결과 발견', foundResults: '{count}개 결과 발견', webResults: '{count}개 웹 검색 결과 발견', - foundMatches: '{count}개 일치 항목 발견', - showingCount: '({count}개 표시)', + grepSummary: '일치하는 청크 {chunks}개, 문서 {docs}개', + }, + grepResults: { + chunkHits: '청크 {count}개', + keywordHits: '{count}회', + titleMatch: '제목', }, toolStatus: { calling: '{name} 호출 중...', diff --git a/frontend/src/i18n/locales/ru-RU.ts b/frontend/src/i18n/locales/ru-RU.ts index 97e60c58..d18c8af2 100755 --- a/frontend/src/i18n/locales/ru-RU.ts +++ b/frontend/src/i18n/locales/ru-RU.ts @@ -3033,6 +3033,8 @@ export default { referenceIconAlt: 'Иконка ссылок на материалы', chunkIdLabel: 'ID фрагмента:', documentIdLabel: 'ID документа:', + chunkOrdinal: 'Фрагмент {index}', + previewContent: 'Предпросмотр содержимого', noPlanSteps: 'Подробные шаги не предоставлены', chunkIndexLabel: 'Фрагмент №{index}', chunkPositionLabel: '(позиция: {position})', @@ -3199,22 +3201,26 @@ export default { }, }, platform: { - subtitle: 'Корпоративная платформа интеллектуального поиска документов', - description: 'Упрощение понимания сложных документов и точного поиска', + subtitle: 'Корпоративная платформа знаний на базе больших языковых моделей', + description: 'RAG-поиск, агентные рассуждения и Wiki-базы знаний — чтобы документы действительно понимались и приносили пользу', rag: 'RAG расширенная генерация', + agent: 'ReAct агент', + wiki: 'Wiki-база знаний', hybridSearch: 'Гибридный поиск', localDeploy: 'Локальное развертывание', multimodalParsing: 'Мультимодальный анализ документов', - hybridSearchEngine: 'Гибридная поисковая система', - ragQandA: 'RAG интеллектуальный вопрос-ответ', + hybridSearchEngine: 'Гибридный поиск + граф знаний', + ragQandA: 'Вопрос-ответ с ReAct агентом', independentTenant: 'Независимое пространство арендатора', fullApiAccess: 'Полный доступ к API', knowledgeBaseManagement: 'Управление базой знаний', carousel: { agenticRagTitle: 'Agentic RAG', - agenticRagDesc: 'Переформулировка запроса + умный отбор + повторная ранжировка', + agenticRagDesc: 'ReAct-рассуждения + вызов инструментов + многошаговое мышление', hybridSearchTitle: 'Гибридная стратегия поиска', hybridSearchDesc: 'BM25 + Вектор + Граф знаний', + wikiTitle: 'Wiki-база знаний', + wikiDesc: 'Дистилляция документов в структурированные связанные знания', smartDocRetrievalTitle: 'Интеллектуальный поиск документов', smartDocRetrievalDesc: 'Многоформатный разбор PDF/Word/изображений' } @@ -4113,8 +4119,12 @@ export default { foundResultsFromFiles: 'Найдено {count} результат(ов) из {files} файл(ов)', foundResults: 'Найдено {count} результат(ов)', webResults: 'Найдено {count} результат(ов) веб-поиска', - foundMatches: 'Найдено {count} совпадений', - showingCount: '(показано {count})' + grepSummary: 'Найдено фрагментов: {chunks}, в документах: {docs}', + }, + grepResults: { + chunkHits: '{count} фрагм.', + keywordHits: '{count} вх.', + titleMatch: 'заголовок', }, toolStatus: { calling: 'Вызов {name}...', diff --git a/frontend/src/i18n/locales/zh-CN.ts b/frontend/src/i18n/locales/zh-CN.ts index e755d8bf..1f909737 100755 --- a/frontend/src/i18n/locales/zh-CN.ts +++ b/frontend/src/i18n/locales/zh-CN.ts @@ -806,6 +806,8 @@ export default { referenceIconAlt: "参考内容图标", chunkIdLabel: "片段ID:", documentIdLabel: "文档ID:", + chunkOrdinal: "片段 {index}", + previewContent: "预览内容", noPlanSteps: "未提供具体步骤", chunkIndexLabel: "片段 #{index}", chunkPositionLabel: "(位置: {position})", @@ -2720,22 +2722,26 @@ export default { }, }, platform: { - subtitle: "企业级智能文档检索框架", - description: "让复杂文档理解与精准检索变得简单", + subtitle: "大模型驱动的企业级知识框架", + description: "RAG 检索、智能体推理、Wiki 知识库,让文档真正被理解和运用", rag: "RAG 增强生成", + agent: "ReAct 智能体", + wiki: "Wiki 知识库", hybridSearch: "混合检索", localDeploy: "本地部署", multimodalParsing: "多模态文档解析", - hybridSearchEngine: "混合检索引擎", - ragQandA: "RAG 智能问答", + hybridSearchEngine: "混合检索 + 知识图谱", + ragQandA: "ReAct 智能体问答", independentTenant: "独立租户空间", fullApiAccess: "完整 API 访问", knowledgeBaseManagement: "知识库管理", carousel: { agenticRagTitle: "Agentic RAG", - agenticRagDesc: "问题改写 + 智能召回 + 重排序", + agenticRagDesc: "ReAct 推理 + 工具调用 + 多步思考", hybridSearchTitle: "混合检索策略", hybridSearchDesc: "BM25 + 向量 + 知识图谱", + wikiTitle: "Wiki 知识库", + wikiDesc: "文档蒸馏为结构化互联知识", smartDocRetrievalTitle: "智能文档检索", smartDocRetrievalDesc: "PDF/Word/图片多格式解析", }, @@ -4552,8 +4558,12 @@ export default { foundResultsFromFiles: "找到 {count} 个结果,来自 {files} 个文件", foundResults: "找到 {count} 个结果", webResults: "找到 {count} 个网络搜索结果", - foundMatches: "找到 {count} 处匹配", - showingCount: "(显示 {count} 个)", + grepSummary: "找到 {chunks} 个匹配片段,来自 {docs} 个文档", + }, + grepResults: { + chunkHits: "{count} 片段", + keywordHits: "{count} 次", + titleMatch: "标题匹配", }, toolStatus: { calling: "正在调用 {name}...", diff --git a/frontend/src/types/tool-results.ts b/frontend/src/types/tool-results.ts index c21a78ce..8f177ba3 100644 --- a/frontend/src/types/tool-results.ts +++ b/frontend/src/types/tool-results.ts @@ -203,7 +203,9 @@ export interface GrepKnowledgeResult { knowledge_id: string; knowledge_base_id: string; knowledge_title: string; + title_match?: boolean; chunk_hit_count: number; + match_snippet?: string; pattern_counts: Record; total_pattern_hits: number; distinct_patterns: number; @@ -212,11 +214,13 @@ export interface GrepKnowledgeResult { // Grep results data export interface GrepResultsData { display_type: 'grep_results'; + query?: string; patterns: string[]; knowledge_results: GrepKnowledgeResult[]; result_count: number; total_matches: number; knowledge_base_ids?: string[]; + limit?: number; max_results: number; } diff --git a/frontend/src/views/auth/Login.vue b/frontend/src/views/auth/Login.vue index 97ae3bc9..e9be217f 100755 --- a/frontend/src/views/auth/Login.vue +++ b/frontend/src/views/auth/Login.vue @@ -150,8 +150,9 @@
{{ $t('platform.rag') }} + {{ $t('platform.agent') }} + {{ $t('platform.wiki') }} {{ $t('platform.hybridSearch') }} - {{ $t('platform.localDeploy') }}
@@ -350,6 +351,7 @@ import { useI18n } from 'vue-i18n' // Import screenshot images import screenshot1 from '@/assets/img/screenshot-1.svg' import screenshot2 from '@/assets/img/screenshot-2.svg' +import screenshot3 from '@/assets/img/screenshot-3.svg' import screenshot4 from '@/assets/img/screenshot-4.svg' const router = useRouter() @@ -373,6 +375,11 @@ const slides = [ title: t('platform.carousel.hybridSearchTitle'), description: t('platform.carousel.hybridSearchDesc') }, + { + image: screenshot3, + title: t('platform.carousel.wikiTitle'), + description: t('platform.carousel.wikiDesc') + }, { image: screenshot1, title: t('platform.carousel.smartDocRetrievalTitle'), diff --git a/frontend/src/views/chat/components/AgentStreamDisplay.vue b/frontend/src/views/chat/components/AgentStreamDisplay.vue index 52e50ee5..54d3b9d9 100644 --- a/frontend/src/views/chat/components/AgentStreamDisplay.vue +++ b/frontend/src/views/chat/components/AgentStreamDisplay.vue @@ -2120,19 +2120,17 @@ const getResultsCount = (toolData: any): number => { const getGrepResultsSummary = (toolData: any): string => { if (!toolData) return ''; - const totalMatches = toolData.total_matches || 0; - const resultCount = toolData.result_count || 0; - - if (totalMatches === 0) { + const totalChunks = toolData.total_matches || 0; + const docCount = toolData.result_count || 0; + + if (totalChunks === 0) { return t('agentStream.search.noResults'); } - let summary = t('agentStream.search.foundMatches', { count: `${totalMatches}` }); - if (totalMatches > resultCount) { - summary += t('agentStream.search.showingCount', { count: `${resultCount}` }); - } - - return summary; + return t('agentStream.search.grepSummary', { + chunks: `${totalChunks}`, + docs: `${docCount}`, + }); }; // Extract and format query parameters from args diff --git a/frontend/src/views/chat/components/tool-results/ContentPopup.vue b/frontend/src/views/chat/components/tool-results/ContentPopup.vue index d0168fe4..61bbfd83 100644 --- a/frontend/src/views/chat/components/tool-results/ContentPopup.vue +++ b/frontend/src/views/chat/components/tool-results/ContentPopup.vue @@ -1,20 +1,28 @@ @@ -22,27 +30,51 @@ @@ -50,75 +82,86 @@ const processedContent = computed(() => { .popup-content { display: flex; flex-direction: column; - max-height: 400px; + max-height: 420px; max-width: 500px; - border: 1px solid var(--td-brand-color); - border-radius: 4px; + border: 1px solid var(--td-component-stroke); + border-radius: 8px; + background: var(--td-bg-color-container); + box-shadow: 0 6px 20px rgba(0, 0, 0, 0.12); word-wrap: break-word; word-break: break-word; overflow: hidden; - + .popup-content-wrapper { flex: 1; overflow-y: auto; overflow-x: hidden; - padding: 12px; + padding: 14px; min-height: 0; } - + .full-content { font-size: 13px; color: var(--td-text-color-primary); - line-height: 1.8; + line-height: 1.7; white-space: pre-wrap; word-break: break-word; - + &.html-content { white-space: normal; - + :deep(p) { margin: 8px 0; - line-height: 1.8; - } - - :deep(br) { - line-height: 1.8; + line-height: 1.7; } } } - - .info-section { - flex-shrink: 0; - padding: 8px 12px; - border-top: 1px solid var(--td-component-stroke); - background: var(--td-bg-color-secondarycontainer); - } - - .info-field { - display: flex; - gap: 8px; - margin-bottom: 4px; - font-size: 11px; - - .field-label { + + .chunk-block { + & + & { + margin-top: 12px; + padding-top: 12px; + border-top: 1px dashed var(--td-component-stroke); + } + + .chunk-block__label { + font-size: 11px; + font-weight: 600; color: var(--td-text-color-placeholder); - min-width: 60px; - flex-shrink: 0; - } - - .field-value { - color: var(--td-text-color-secondary); - flex: 1; - - code { - font-family: var(--app-font-family-mono); - font-size: 10px; - background: var(--td-bg-color-secondarycontainer); - padding: 1px 4px; - border-radius: 2px; - } + margin-bottom: 4px; } } + + :deep(.search-highlight) { + background: rgba(255, 213, 0, 0.35); + color: inherit; + padding: 0 1px; + border-radius: 2px; + font-weight: 500; + } + + .popup-footer { + flex-shrink: 0; + display: flex; + flex-direction: column; + gap: 2px; + padding: 8px 14px; + border-top: 1px solid var(--td-component-stroke); + } + + .popup-footer__item { + font-family: var(--app-font-family-mono); + font-size: 10px; + color: var(--td-text-color-placeholder); + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; + } + + .popup-footer__key { + margin-right: 4px; + font-family: inherit; + color: var(--td-text-color-disabled); + } } - diff --git a/frontend/src/views/chat/components/tool-results/GrepResults.vue b/frontend/src/views/chat/components/tool-results/GrepResults.vue index 30eb388b..6abb7037 100644 --- a/frontend/src/views/chat/components/tool-results/GrepResults.vue +++ b/frontend/src/views/chat/components/tool-results/GrepResults.vue @@ -1,14 +1,19 @@