From 4d978b1b59c854c45671e3b492edf7483ba840bc Mon Sep 17 00:00:00 2001 From: Matt Rubens Date: Tue, 22 Apr 2025 00:08:49 -0400 Subject: [PATCH] Add line wrapping to MCP arguments --- webview-ui/src/components/chat/ChatRow.tsx | 1 + webview-ui/src/components/common/CodeAccordian.tsx | 3 +++ 2 files changed, 4 insertions(+) diff --git a/webview-ui/src/components/chat/ChatRow.tsx b/webview-ui/src/components/chat/ChatRow.tsx index 8c09b101b15..ebcd59e1ee2 100644 --- a/webview-ui/src/components/chat/ChatRow.tsx +++ b/webview-ui/src/components/chat/ChatRow.tsx @@ -1174,6 +1174,7 @@ export const ChatRowContent = ({ language="json" isExpanded={true} onToggleExpand={onToggleExpand} + forceWrap={true} /> )} diff --git a/webview-ui/src/components/common/CodeAccordian.tsx b/webview-ui/src/components/common/CodeAccordian.tsx index 7d803e65af7..2f0cffd862b 100644 --- a/webview-ui/src/components/common/CodeAccordian.tsx +++ b/webview-ui/src/components/common/CodeAccordian.tsx @@ -14,6 +14,7 @@ interface CodeAccordianProps { onToggleExpand: () => void isLoading?: boolean progressStatus?: ToolProgressStatus + forceWrap?: boolean } /* @@ -38,6 +39,7 @@ const CodeAccordian = ({ onToggleExpand, isLoading, progressStatus, + forceWrap, }: CodeAccordianProps) => { const inferredLanguage = useMemo( () => code && (language ?? (path ? getLanguageFromPath(path) : undefined)), @@ -126,6 +128,7 @@ const CodeAccordian = ({ diff ?? "" ).trim()}\n${"```"}`} + forceWrap={forceWrap} /> )}