Skip to content

Commit

Permalink
Merge branch 'main' into fix/mimetype-validation-file-upload
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob authored Nov 6, 2024
2 parents bb7b744 + 2ba2c59 commit d0f41f7
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions libs/react-client/src/types/file.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,4 +22,5 @@ export interface IAsk {
timeout: number;
} & FileSpec &
ActionSpec;
parentId?: string;
}
1 change: 1 addition & 0 deletions libs/react-client/src/useChatInteract.ts
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ const useChatInteract = () => {
const replyMessage = useCallback(
(message: IStep) => {
if (askUser) {
if (askUser.parentId) message.parentId = askUser.parentId;
setMessages((oldMessages) => addMessage(oldMessages, message));
askUser.callback(message);
}
Expand Down
2 changes: 1 addition & 1 deletion libs/react-client/src/useChatSession.ts
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ const useChatSession = () => {
);

socket.on('ask', ({ msg, spec }, callback) => {
setAskUser({ spec, callback });
setAskUser({ spec, callback, parentId: msg.parentId });
setMessages((oldMessages) => addMessage(oldMessages, msg));

setLoading(false);
Expand Down

0 comments on commit d0f41f7

Please sign in to comment.