Skip to content

Commit

Permalink
Merge branch 'main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
dokterbob authored Nov 6, 2024
2 parents eb8f30e + 2ba2c59 commit ec3085e
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 ec3085e

Please sign in to comment.