File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
components/store/editor/chat
server/api/routers/project Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -128,7 +128,10 @@ export class ConversationManager {
128
128
}
129
129
130
130
async addConversationTitle ( conversationId : string , content : string ) {
131
- const title = "RANDOM TITLE" ;
131
+ const title = await api . chat . conversation . generateTitle . mutate ( {
132
+ conversationId,
133
+ content,
134
+ } ) ;
132
135
if ( ! title ) {
133
136
console . error ( 'Error generating conversation title' ) ;
134
137
return ;
Original file line number Diff line number Diff line change @@ -92,7 +92,7 @@ export const projectRouter = createTRPCRouter({
92
92
93
93
const useCompressed = ! ! compressedImage . buffer ;
94
94
const finalMimeType = useCompressed ? 'image/jpeg' : mimeType ;
95
- const finalBuffer = useCompressed ? compressedImage . buffer : buffer ;
95
+ const finalBuffer = useCompressed ? ( compressedImage . buffer ?? buffer ) : buffer ;
96
96
97
97
const path = getScreenshotPath ( project . id , finalMimeType ) ;
98
98
You can’t perform that action at this time.
0 commit comments