refactor(chat): remove dead syntaxTheme plumbing
The Prism syntaxTheme prop is no longer read after code highlighting moved to the Shiki worker. Remove the now-dead prop threading and its source. - Drop syntaxTheme from interfaces, destructures, prop passes, and React.memo comparators across ChatMessage, MessageBody, ProgressiveGroup, ToolPart, TurnActivity, ToolOutputDialog, and ChatInput. - Drop the unused _syntaxTheme param from renderWebSearchOutput. - Remove the dead generateSyntaxTheme usages (ChatMessage memo, PlanView unassigned memo) and delete the now-unimported syntaxThemeGenerator module.
This commit is contained in:
@@ -18,7 +18,6 @@ import { buildCodeMirrorCommentWidgets, normalizeLineRange, useInlineCommentCont
|
||||
import { getLanguageFromExtension } from '@/lib/toolHelpers';
|
||||
import { useDeviceInfo } from '@/lib/device';
|
||||
import { useThemeSystem } from '@/contexts/useThemeSystem';
|
||||
import { generateSyntaxTheme } from '@/lib/theme/syntaxThemeGenerator';
|
||||
import { createFlexokiCodeMirrorTheme } from '@/lib/codemirror/flexokiTheme';
|
||||
import { languageByExtension } from '@/lib/codemirror/languageByExtension';
|
||||
import { useSessionUIStore } from '@/sync/session-ui-store';
|
||||
@@ -164,7 +163,6 @@ export const PlanView: React.FC<PlanViewProps> = ({ targetPath = null }) => {
|
||||
const runtimeApis = useRuntimeAPIs();
|
||||
const { isMobile } = useDeviceInfo();
|
||||
const { currentTheme } = useThemeSystem();
|
||||
React.useMemo(() => generateSyntaxTheme(currentTheme), [currentTheme]);
|
||||
|
||||
const session = React.useMemo(() => {
|
||||
if (!currentSessionId) return null;
|
||||
|
||||
Reference in New Issue
Block a user