mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-04-19 12:24:46 +08:00
refactor: rename
This commit is contained in:
@@ -10,13 +10,13 @@ import {
|
|||||||
ResizablePanel,
|
ResizablePanel,
|
||||||
ResizablePanelGroup,
|
ResizablePanelGroup,
|
||||||
} from "@/components/ui/resizable";
|
} from "@/components/ui/resizable";
|
||||||
import { ArtifactFileDetail } from "@/components/workspace/artifacts";
|
|
||||||
import {
|
import {
|
||||||
|
ArtifactFileDetail,
|
||||||
ArtifactsProvider,
|
ArtifactsProvider,
|
||||||
useArtifacts,
|
useArtifacts,
|
||||||
} from "@/components/workspace/artifacts/context";
|
} from "@/components/workspace/artifacts";
|
||||||
import { InputBox } from "@/components/workspace/input-box";
|
import { InputBox } from "@/components/workspace/input-box";
|
||||||
import { MessageList } from "@/components/workspace/message-list/message-list";
|
import { MessageList } from "@/components/workspace/messages";
|
||||||
import {
|
import {
|
||||||
WorkspaceContainer,
|
WorkspaceContainer,
|
||||||
WorkspaceBody,
|
WorkspaceBody,
|
||||||
|
|||||||
@@ -1,8 +1,22 @@
|
|||||||
import { FileIcon } from "lucide-react";
|
import { FileIcon, XIcon } from "lucide-react";
|
||||||
|
import { useCallback } from "react";
|
||||||
|
|
||||||
|
import { Button } from "@/components/ui/button";
|
||||||
|
|
||||||
|
import { useArtifacts } from "./context";
|
||||||
|
|
||||||
export function ArtifactFileDetail({ filepath }: { filepath: string }) {
|
export function ArtifactFileDetail({ filepath }: { filepath: string }) {
|
||||||
|
const { setOpen } = useArtifacts();
|
||||||
|
const handleClose = useCallback(() => {
|
||||||
|
setOpen(false);
|
||||||
|
}, [setOpen]);
|
||||||
return (
|
return (
|
||||||
<div className="flex size-full items-center justify-center">
|
<div className="relative flex size-full items-center justify-center">
|
||||||
|
<div className="absolute top-1 right-1">
|
||||||
|
<Button size="icon-sm" variant="ghost" onClick={handleClose}>
|
||||||
|
<XIcon />
|
||||||
|
</Button>
|
||||||
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<div>
|
<div>
|
||||||
<FileIcon />
|
<FileIcon />
|
||||||
|
|||||||
Reference in New Issue
Block a user