From ebcf89ee6cead83a33add5ef1e19c8d4f9b4ce9b Mon Sep 17 00:00:00 2001 From: Adeniji Adekunle James Date: Wed, 3 Sep 2025 22:56:27 +0100 Subject: [PATCH] fix: hide tags from generated text output (#945) (#1162) ### Summary This PR hides `` tags from generated text outputs. These elements are not intended for end users and clutter the response text. ### Changes - Filter out `` tags from generated text. - Ensure no regressions in rendering or formatting of user-visible output. --- ## Summary by cubic Hide dyad-command tags from chat output so internal commands never appear in user-visible text. Updates DyadMarkdownParser to detect and drop these tags during preprocessing, parsing, and rendering. --- src/components/chat/DyadMarkdownParser.tsx | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/components/chat/DyadMarkdownParser.tsx b/src/components/chat/DyadMarkdownParser.tsx index e2643a5..a9ce828 100644 --- a/src/components/chat/DyadMarkdownParser.tsx +++ b/src/components/chat/DyadMarkdownParser.tsx @@ -123,6 +123,7 @@ function preprocessUnclosedTags(content: string): { "dyad-edit", "dyad-codebase-context", "think", + "dyad-command", ]; let processedContent = content; @@ -189,6 +190,7 @@ function parseCustomTags(content: string): ContentPiece[] { "dyad-edit", "dyad-codebase-context", "think", + "dyad-command", ]; const tagPattern = new RegExp( @@ -418,6 +420,10 @@ function renderCustomTag( // Don't render anything for dyad-chat-summary return null; + case "dyad-command": + // Don't render anything for dyad-command + return null; + default: return null; }