We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 588d2b5 + 90c8dae commit 1c59389Copy full SHA for 1c59389
src/app/(general)/_components/chat/messages/utils/llm-code-block.tsx
@@ -13,5 +13,10 @@ export const LLMCodeBlock: LLMOutputComponent = ({ blockMatch }) => {
13
return null;
14
}
15
16
- return <CodeBlock value={code} language={language as BundledLanguage} />;
+ // @llm-ui/code bug: failing to remove trailing backticks
17
+ const cleanedCode = code.replace(/```\s*$/, "").trim();
18
+
19
+ return (
20
+ <CodeBlock value={cleanedCode} language={language as BundledLanguage} />
21
+ );
22
};
0 commit comments