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 {