File tree Expand file tree Collapse file tree 4 files changed +12
-9
lines changed
apps/dashboard/src/app/nebula-app/(app) Expand file tree Collapse file tree 4 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -6,11 +6,8 @@ type SessionContextFilter = {
66type NebulaUserMessageContentItem =
77 | {
88 type : "image" ;
9- image_url : string ;
10- }
11- | {
12- type : "image" ;
13- b64 : string ;
9+ image_url : string | null ;
10+ b64 : string | null ;
1411 }
1512 | {
1613 type : "text" ;
Original file line number Diff line number Diff line change @@ -82,7 +82,11 @@ export function ChatBar(props: {
8282 if ( images . length > 0 ) {
8383 for ( const image of images ) {
8484 if ( image . b64 ) {
85- userMessage . content . push ( { type : "image" , b64 : image . b64 } ) ;
85+ userMessage . content . push ( {
86+ type : "image" ,
87+ b64 : image . b64 ,
88+ image_url : null ,
89+ } ) ;
8690 }
8791 }
8892 }
Original file line number Diff line number Diff line change @@ -202,11 +202,11 @@ function RenderMessage(props: {
202202 < NebulaImage
203203 type = "submitted"
204204 url = {
205- " b64" in msg
205+ typeof msg . b64 === "string"
206206 ? msg . b64 . startsWith ( "data:image" )
207207 ? msg . b64
208208 : `data:image/png;base64,${ msg . b64 } `
209- : msg . image_url
209+ : ( msg . image_url ?? "" )
210210 }
211211 client = { props . client }
212212 />
Original file line number Diff line number Diff line change @@ -55,7 +55,9 @@ export function NebulaImage(
5555 height = { props . type === "response" ? props . height : undefined }
5656 src = { src }
5757 className = "w-full rounded-lg border hover:border-active-border"
58- skeleton = { < div className = "animate-skeleton bg-muted" /> }
58+ skeleton = {
59+ < div className = "min-h-[300px] animate-skeleton bg-muted" />
60+ }
5961 />
6062 </ DialogTrigger >
6163
You can’t perform that action at this time.
0 commit comments