From 04128fac14043c5df703e11670303a6fbd120547 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Wed, 10 Jun 2026 19:49:06 +0800 Subject: [PATCH] =?UTF-8?q?fix(frontend):=20=E4=BF=AE=E5=A4=8D=20read=5Ffi?= =?UTF-8?q?le=20=E6=90=9C=E7=B4=A2=E7=BB=93=E6=9E=9C=E6=98=BE=E7=A4=BA"?= =?UTF-8?q?=E8=A1=8C=3F=3F"=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 后端 search_text 返回 line_start/line_end,前端错误地读取了不存在的 line_number 字段。 改为正确读取 line_start 和 line_end,且当上下文窗口合并时显示完整行范围。 --- static/src/components/chat/actions/ToolAction.vue | 3 ++- static/src/components/chat/actions/toolRenderers.ts | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/static/src/components/chat/actions/ToolAction.vue b/static/src/components/chat/actions/ToolAction.vue index 8fd8090..6bf16d7 100644 --- a/static/src/components/chat/actions/ToolAction.vue +++ b/static/src/components/chat/actions/ToolAction.vue @@ -527,7 +527,8 @@ function renderReadFile(result: any, args: any): string { matches.forEach((match: any, idx: number) => { if (idx > 0) html += '
${escapeHtml(match.snippet || match.content || '')}`;
html += '${escapeHtml(match.snippet || match.content || '')}`;
html += '