mirror of
https://gitee.com/wanwujie/deer-flow
synced 2026-05-03 10:40:45 +08:00
feat: support artifact preview
This commit is contained in:
14
frontend/src/core/artifacts/loader.ts
Normal file
14
frontend/src/core/artifacts/loader.ts
Normal 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;
|
||||
}
|
||||
Reference in New Issue
Block a user