feat(canvas): 画布主题 - 与工作台外观隔离并提高连线对比

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
ddCat
2026-09-16 22:59:34 +08:00
parent da0531f6eb
commit cb405e9b6a
54 changed files with 207 additions and 134 deletions

View File

@@ -2,7 +2,7 @@ import CodeMirror, { EditorView } from "@uiw/react-codemirror";
import { forwardRef, useImperativeHandle, useRef } from "react";
import { cn } from "@/lib/utils";
import { useThemeStore } from "@/stores/use-theme-store";
import { useActiveTheme } from "@/stores/canvas/use-canvas-theme-store";
export type PromptCodeEditorHandle = {
insertText: (text: string) => void;
@@ -18,7 +18,7 @@ type PromptCodeEditorProps = {
};
export const PromptCodeEditor = forwardRef<PromptCodeEditorHandle, PromptCodeEditorProps>(function PromptCodeEditor({ value, onChange, readOnly = false, ariaLabel, className }, ref) {
const theme = useThemeStore((state) => state.theme);
const theme = useActiveTheme();
const viewRef = useRef<EditorView | null>(null);
useImperativeHandle(ref, () => ({