There was an error while loading. Please reload this page.
1 parent ff17fd2 commit e5d0a72Copy full SHA for e5d0a72
1 file changed
apps/agentstack-ui/src/components/MarkdownContent/utils.ts
@@ -5,10 +5,18 @@
5
6
import { defaultUrlTransform } from 'react-markdown';
7
8
+import { PLATFORM_FILE_CONTENT_URL_BASE } from '#api/a2a/constants.ts';
9
+import { getFileIdFromFilePlatformUrl } from '#api/a2a/utils.ts';
10
+import { getFileContentUrl } from '#modules/files/utils.ts';
11
+
12
export function urlTransform(value: string): string {
13
if (value.startsWith('data:image/')) {
14
return value;
15
}
16
17
+ if (value.startsWith(PLATFORM_FILE_CONTENT_URL_BASE)) {
18
+ return getFileContentUrl(getFileIdFromFilePlatformUrl(value));
19
+ }
20
21
return defaultUrlTransform(value);
22
0 commit comments