feat: support absolute path as image src

This commit is contained in:
Henry Li
2026-01-24 20:58:56 +08:00
parent cdcadc3fe3
commit 08f1af00b6
2 changed files with 37 additions and 1 deletions

View File

@@ -16,3 +16,7 @@ export function urlOfArtifact({
export function extractArtifactsFromThread(thread: AgentThread) {
return thread.values.artifacts ?? [];
}
export function resolveArtifactURL(absolutePath: string, threadId: string) {
return `${getBackendBaseURL()}/api/threads/${threadId}/artifacts${absolutePath}`;
}