feat: add `open in new window`
This commit is contained in:
parent
0c6f8353bf
commit
aa2677e9fd
|
|
@ -1,4 +1,9 @@
|
||||||
import { CopyIcon, DownloadIcon, XIcon } from "lucide-react";
|
import {
|
||||||
|
CopyIcon,
|
||||||
|
DownloadIcon,
|
||||||
|
SquareArrowOutUpRightIcon,
|
||||||
|
XIcon,
|
||||||
|
} from "lucide-react";
|
||||||
import { useMemo } from "react";
|
import { useMemo } from "react";
|
||||||
import { toast } from "sonner";
|
import { toast } from "sonner";
|
||||||
|
|
||||||
|
|
@ -50,6 +55,13 @@ export function ArtifactFileDetail({
|
||||||
</div>
|
</div>
|
||||||
<div className="flex items-center gap-2">
|
<div className="flex items-center gap-2">
|
||||||
<ArtifactActions>
|
<ArtifactActions>
|
||||||
|
<a href={urlOfArtifact({ filepath, threadId })} target="_blank">
|
||||||
|
<ArtifactAction
|
||||||
|
icon={SquareArrowOutUpRightIcon}
|
||||||
|
label="Open in new window"
|
||||||
|
tooltip="Open in new window"
|
||||||
|
/>
|
||||||
|
</a>
|
||||||
{isCodeFile && (
|
{isCodeFile && (
|
||||||
<ArtifactAction
|
<ArtifactAction
|
||||||
icon={CopyIcon}
|
icon={CopyIcon}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue