feat: support artifact preview

This commit is contained in:
Henry Li
2026-01-17 15:09:44 +08:00
parent 80c928fcf5
commit 0c6f8353bf
16 changed files with 482 additions and 42 deletions
+14
View File
@@ -0,0 +1,14 @@
import { urlOfArtifact } from "./utils";
export async function loadArtifactContent({
filepath,
threadId,
}: {
filepath: string;
threadId: string;
}) {
const url = urlOfArtifact({ filepath, threadId });
const response = await fetch(url);
const text = await response.text();
return text;
}