Skip to content

Commit

Permalink
Restore previous behavior when posting a message (#8965)
Browse files Browse the repository at this point in the history
  • Loading branch information
Fraggle authored Nov 27, 2024
1 parent fa4682c commit 93c5666
Showing 1 changed file with 25 additions and 14 deletions.
39 changes: 25 additions & 14 deletions front/components/assistant/conversation/input_bar/InputBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -173,25 +173,36 @@ export function AssistantInputBar({
if (!conversationId) {
setLoading(true);
setDisableSendButton(true);
}

const r = await onSubmit(
text,
mentions,
fileUploaderService.getFileBlobs().map((cf) => {
return {
title: cf.filename,
fileId: cf.fileId,
};
})
);
const r = await onSubmit(
text,
mentions,
fileUploaderService.getFileBlobs().map((cf) => {
return {
title: cf.filename,
fileId: cf.fileId,
};
})
);

if (!conversationId) {
setLoading(false);
setDisableSendButton(false);
}
if (r.isOk()) {
resetEditorText();
fileUploaderService.resetUpload();
}
} else {
void onSubmit(
text,
mentions,
fileUploaderService.getFileBlobs().map((cf) => {
return {
title: cf.filename,
fileId: cf.fileId,
};
})
);

if (r.isOk()) {
resetEditorText();
fileUploaderService.resetUpload();
}
Expand Down

0 comments on commit 93c5666

Please sign in to comment.