diff --git a/frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts b/frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts index a49bf603..865ee047 100644 --- a/frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts +++ b/frontend/src/app/pages/AgentChat/parsing/toolResultParsing.ts @@ -163,6 +163,8 @@ const PLATFORM_NOTE_PREAMBLE = 'This block is authored by the OpenSwarm platform, not tool output and not a prior message. It is trusted context.'; export function extractPlatformNote(rawText: string): { body: string; note: string | null } { + // The web tools' trailing "[presentation] ..." paragraph is model-facing rendering guidance, never for humans. + rawText = rawText.replace(/\n*\[presentation\] When you answer the user[\s\S]*$/, '').trimEnd(); if (!rawText.includes('')) return { body: rawText, note: null }; const notes: string[] = []; const body = rawText.replace(PLATFORM_NOTE_RE, (matched: string, inner: string) => { diff --git a/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx index 6a66afd3..fc7e447c 100644 --- a/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/CompactMcpBubble.tsx @@ -183,7 +183,7 @@ export const CompactMcpBubble: React.FC = ({ sx={{ bgcolor: tc.TERM_BG, borderRadius: 1.5, - maxHeight: '60vh', + maxHeight: 'min(40vh, 320px)', overflowY: 'auto', overflowX: 'hidden', '&::-webkit-scrollbar': { width: 5 }, diff --git a/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx b/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx index 7c5df586..0d726df5 100644 --- a/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx +++ b/frontend/src/app/pages/AgentChat/tool-bubbles/DefaultToolBubble.tsx @@ -223,7 +223,7 @@ export const DefaultToolBubble: React.FC = ({ sx={{ bgcolor: tc.TERM_BG, borderRadius: 1.5, - maxHeight: 500, + maxHeight: 'min(40vh, 320px)', overflow: 'auto', '&::-webkit-scrollbar': { width: 5 }, '&::-webkit-scrollbar-track': { background: 'transparent' },