Skip to content

armgit / jan

Public Imported from GitHub
0

Jan is an open source alternative to ChatGPT that runs 100% offline on your computer.

fix: type imageurl

Faisal Amir52fe8e8c0e48
diff --git a/web-app/src/containers/ThreadContent.tsx b/web-app/src/containers/ThreadContent.tsx
index ede897624..4a40eb635 100644
--- a/web-app/src/containers/ThreadContent.tsx
+++ b/web-app/src/containers/ThreadContent.tsx
@@ -276,7 +276,7 @@ export const ThreadContent = memo(
item.content?.find((c) => c.type === 'text')?.text?.value ||
''
}
- imageUrls={item.content?.filter((c) => c.type === 'image_url' && c.image_url?.url).map((c) => c.image_url!.url)}
+ imageUrls={item.content?.filter((c) => c.type === 'image_url' && c.image_url?.url).map((c) => c.image_url!.url).filter((url): url is string => url !== undefined) || []}
onSave={(message, imageUrls) => {
if (item.updateMessage) {
item.updateMessage(item, message, imageUrls)