Skip to content

Commit 4a35fff

Browse files
perf(web): the shell command block compiles without manual memoization
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent a702563 commit 4a35fff

1 file changed

Lines changed: 2 additions & 5 deletions

File tree

‎apps/web/src/components/chat/ShellCommandBlock.tsx‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import {
22
commandHighlightLanguage,
33
withVisibleControlCharacters,
44
} from "@t3tools/client-runtime/work-log/command-label";
5-
import { Suspense, use, useMemo } from "react";
5+
import { Suspense, use } from "react";
66

77
import { useTheme } from "../../hooks/useTheme";
88
import { RenderErrorBoundary } from "../RenderErrorBoundary";
@@ -36,10 +36,7 @@ function HighlightedCommand({ code, theme }: { code: string; theme: "light" | "d
3636
const { embeddedScripts } = use(loadEmbeddedScripts());
3737
const language = commandHighlightLanguage(code);
3838
// 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) : [];
4340
return (
4441
<HighlightedTokens
4542
code={code}

0 commit comments

Comments
 (0)