The best way to control Claude Code, Codex and more from any computer or phone
perf(web): the shell command block compiles without manual memoization (#20714)
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Julius Marminge committed
Oct 16, 2026 at 21:47 UTC
7c74a35ea6766a6c4567164da896da51457f300d
1 file changed
+2
-5
apps/web/src/components/chat/ShellCommandBlock.tsx
+2
-5
@@ -2,7 +2,7 @@ import {
2
commandHighlightLanguage,
3
withVisibleControlCharacters,
4
} from "@t3tools/client-runtime/work-log/command-label";
5
-import { Suspense, use, useMemo } from "react";
5
+import { Suspense, use } from "react";
6
7
import { useTheme } from "../../hooks/useTheme";
8
import { RenderErrorBoundary } from "../RenderErrorBoundary";
@@ -36,10 +36,7 @@ function HighlightedCommand({ code, theme }: { code: string; theme: "light" | "d
36
const { embeddedScripts } = use(loadEmbeddedScripts());
37
const language = commandHighlightLanguage(code);
38
// Only shell syntax nests scripts; PowerShell's own grammar colors its strings.
39
- const embedded = useMemo(
40
- () => (language === "shellscript" ? embeddedScripts(code) : []),
41
- [code, embeddedScripts, language],
42
- );
39
+ const embedded = language === "shellscript" ? embeddedScripts(code) : [];
40
return (
41
<HighlightedTokens
42
code={code}