mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-17 03:34:45 +08:00
feat: add code editor
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
ArtifactHeader,
|
||||
ArtifactTitle,
|
||||
} from "@/components/ai-elements/artifact";
|
||||
import { CodeEditor } from "@/components/ai-elements/code-editor";
|
||||
import { Select, SelectItem } from "@/components/ui/select";
|
||||
import {
|
||||
SelectContent,
|
||||
@@ -23,7 +24,6 @@ import {
|
||||
SelectTrigger,
|
||||
SelectValue,
|
||||
} from "@/components/ui/select";
|
||||
import { Textarea } from "@/components/ui/textarea";
|
||||
import { ToggleGroup, ToggleGroupItem } from "@/components/ui/toggle-group";
|
||||
import { useArtifactContent } from "@/core/artifacts/hooks";
|
||||
import { urlOfArtifact } from "@/core/artifacts/utils";
|
||||
@@ -179,10 +179,10 @@ export function ArtifactFileDetail({
|
||||
/>
|
||||
)}
|
||||
{isCodeFile && viewMode === "code" && (
|
||||
<Textarea
|
||||
<CodeEditor
|
||||
className="size-full resize-none rounded-none border-none"
|
||||
readOnly
|
||||
value={content ?? ""}
|
||||
readonly
|
||||
/>
|
||||
)}
|
||||
{!isCodeFile && (
|
||||
|
||||
Reference in New Issue
Block a user