Files
deer-flow/frontend/src/core/artifacts/utils.ts

18 lines
421 B
TypeScript
Raw Normal View History

import type { AgentThread } from "../threads";
2026-01-17 15:09:44 +08:00
export function urlOfArtifact({
filepath,
threadId,
download = false,
}: {
filepath: string;
threadId: string;
download?: boolean;
}) {
return `http://localhost:8000/api/threads/${threadId}/artifacts${filepath}${download ? "?download=true" : ""}`;
}
export function extractArtifactsFromThread(thread: AgentThread) {
return thread.values.artifacts ?? [];
}