File tree Expand file tree Collapse file tree
clients/search-component/src/utils/hooks Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1114,7 +1114,25 @@ function ChatProvider({ children }: { children: React.ReactNode }) {
11141114 return false ;
11151115 } ;
11161116
1117- if ( referenceImageUrls . length > 0 ) {
1117+ if ( referenceImageUrls . length > 0 || curGroup ) {
1118+ if ( referenceImageUrls . length == 0 && curGroup ) {
1119+ const chunksInGroupPromise = await trieveSDK . getChunksInGroup (
1120+ {
1121+ groupId : curGroup . id ,
1122+ page : 1 ,
1123+ } ,
1124+ searchAbortController . current . signal ,
1125+ ) ;
1126+
1127+ if ( chunksInGroupPromise . chunks [ 0 ] . image_urls ) {
1128+ chunksInGroupPromise . chunks [ 0 ] . image_urls . forEach ( ( url ) => {
1129+ referenceImageUrls . push ( url ?? "" ) ;
1130+ } ) ;
1131+ }
1132+
1133+ referenceImageUrls . slice ( 0 , 5 ) ;
1134+ }
1135+
11181136 if ( await handleImageEdit ( ) ) {
11191137 return ;
11201138 }
You can’t perform that action at this time.
0 commit comments