mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-12 18:14:46 +08:00
fix: fix eslint errors and warnings
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
import { css } from "@codemirror/lang-css";
|
||||
import { html } from "@codemirror/lang-html";
|
||||
import { javascript, javascriptLanguage } from "@codemirror/lang-javascript";
|
||||
import { javascript } from "@codemirror/lang-javascript";
|
||||
import { json } from "@codemirror/lang-json";
|
||||
import { markdown, markdownLanguage } from "@codemirror/lang-markdown";
|
||||
import { python } from "@codemirror/lang-python";
|
||||
@@ -13,9 +13,9 @@ import CodeMirror from "@uiw/react-codemirror";
|
||||
import { useTheme } from "next-themes";
|
||||
import { useMemo } from "react";
|
||||
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { cn } from "@/lib/utils";
|
||||
|
||||
import { Textarea } from "../ui/textarea";
|
||||
import { useThread } from "./messages/context";
|
||||
const customDarkTheme = monokaiInit({
|
||||
settings: {
|
||||
@@ -49,7 +49,7 @@ export function CodeEditor({
|
||||
readonly?: boolean;
|
||||
disabled?: boolean;
|
||||
autoFocus?: boolean;
|
||||
settings?: any;
|
||||
settings?: unknown;
|
||||
}) {
|
||||
const {
|
||||
thread: { isLoading },
|
||||
@@ -98,10 +98,12 @@ export function CodeEditor({
|
||||
theme={resolvedTheme === "dark" ? customDarkTheme : customLightTheme}
|
||||
extensions={extensions}
|
||||
basicSetup={{
|
||||
foldGutter: settings?.foldGutter ?? false,
|
||||
foldGutter:
|
||||
(settings as { foldGutter?: boolean })?.foldGutter ?? false,
|
||||
highlightActiveLine: false,
|
||||
highlightActiveLineGutter: false,
|
||||
lineNumbers: settings?.lineNumbers ?? false,
|
||||
lineNumbers:
|
||||
(settings as { lineNumbers?: boolean })?.lineNumbers ?? false,
|
||||
}}
|
||||
autoFocus={autoFocus}
|
||||
value={value}
|
||||
|
||||
Reference in New Issue
Block a user