summaryrefslogtreecommitdiff
path: root/packages/cli/src/ui/components/messages/ToolMessage.tsx
diff options
context:
space:
mode:
authorSandy Tao <[email protected]>2025-06-24 14:10:41 -0700
committerGitHub <[email protected]>2025-06-24 14:10:41 -0700
commita411c415a808fa433aeaf79f3776556269906f57 (patch)
tree2022110854224aad16b6163e173f77f3cac731f9 /packages/cli/src/ui/components/messages/ToolMessage.tsx
parente613cbc4489c754c5f588a6f9c276a7e567e42f5 (diff)
Do not render mcp responses as markdown (#1388)
Diffstat (limited to 'packages/cli/src/ui/components/messages/ToolMessage.tsx')
-rw-r--r--packages/cli/src/ui/components/messages/ToolMessage.tsx7
1 files changed, 7 insertions, 0 deletions
diff --git a/packages/cli/src/ui/components/messages/ToolMessage.tsx b/packages/cli/src/ui/components/messages/ToolMessage.tsx
index dd23381e..6cb3f8f3 100644
--- a/packages/cli/src/ui/components/messages/ToolMessage.tsx
+++ b/packages/cli/src/ui/components/messages/ToolMessage.tsx
@@ -44,6 +44,13 @@ export const ToolMessage: React.FC<ToolMessageProps> = ({
)
: undefined;
+ // Long tool call response in MarkdownDisplay doesn't repect availableTerminalHeight properly,
+ // we're forcing it to not render as markdown when the response is too long, it will fallback
+ // to render as plain text, which is contained within the terminal using MaxSizedBox
+ if (availableHeight) {
+ renderOutputAsMarkdown = false;
+ }
+
const childWidth = terminalWidth - 3; // account for padding.
return (