From 6a21a642d05359f006c870be146c0e7a865af962 Mon Sep 17 00:00:00 2001 From: JOJO <1498581755@qq.com> Date: Sat, 11 Apr 2026 18:59:40 +0800 Subject: [PATCH] =?UTF-8?q?fix(approval):=20=E5=AE=8C=E6=95=B4=E5=B1=95?= =?UTF-8?q?=E7=A4=BA=E5=86=99=E5=85=A5=E5=86=85=E5=AE=B9=E5=B9=B6=E9=9A=90?= =?UTF-8?q?=E8=97=8F=E5=86=85=E9=83=A8=E6=BB=9A=E5=8A=A8=E6=9D=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server/chat_flow_tool_loop.py | 2 +- static/src/components/panels/ToolApprovalPanel.vue | 12 ++---------- .../src/styles/components/panels/_right-panel.scss | 7 +++++++ 3 files changed, 10 insertions(+), 11 deletions(-) diff --git a/server/chat_flow_tool_loop.py b/server/chat_flow_tool_loop.py index b8b6db9..c5fd659 100644 --- a/server/chat_flow_tool_loop.py +++ b/server/chat_flow_tool_loop.py @@ -114,7 +114,7 @@ def _build_tool_approval_preview(web_terminal, function_name: str, arguments: Di content = str(args.get("content") or "") preview["file_path"] = args.get("file_path") preview["append"] = bool(args.get("append", False)) - preview["content_preview"] = content[:4000] + preview["content_preview"] = content preview["content_length"] = len(content) preview["summary"] = f"write_file: {args.get('file_path') or ''} ({'append' if preview['append'] else 'overwrite'})" return preview diff --git a/static/src/components/panels/ToolApprovalPanel.vue b/static/src/components/panels/ToolApprovalPanel.vue index baf675a..80f2600 100644 --- a/static/src/components/panels/ToolApprovalPanel.vue +++ b/static/src/components/panels/ToolApprovalPanel.vue @@ -19,7 +19,7 @@
{{ item.preview?.file_path || item.preview?.resolved_path }}
-
+
{{ item.preview?.file_path }}
-
+
+ {{ line }}
-
- 内容过长,已截断展示 -
@@ -172,9 +169,4 @@ const getEditNewLines = (item: any): string[] => { return rows.map((row: any) => String(row?.content ?? '')); }; -const isWriteTruncated = (item: any): boolean => { - const text = String(item?.preview?.content_preview || ''); - const length = Number(item?.preview?.content_length || 0); - return length > text.length; -}; diff --git a/static/src/styles/components/panels/_right-panel.scss b/static/src/styles/components/panels/_right-panel.scss index 2958e21..83f0211 100644 --- a/static/src/styles/components/panels/_right-panel.scss +++ b/static/src/styles/components/panels/_right-panel.scss @@ -190,6 +190,13 @@ border-radius: 6px; padding: 8px; background: rgba(0, 0, 0, 0.01); + scrollbar-width: none; + -ms-overflow-style: none; +} + +.approval-diff::-webkit-scrollbar { + width: 0; + height: 0; } .approval-kv {