Skip to content

Commit ee4928b

Browse files
committed
add comments
1 parent e1503bf commit ee4928b

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/routes/chat/[agentId]/[conversationId]/chat-box.svelte

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -222,13 +222,15 @@
222222
if (conv && !!e.data.text) {
223223
isLoading = true;
224224
sendChatMessage(e.data.text, e.data.data || null, conv.id).then(() => {
225-
redirectToNewConversation(conv);
226225
isLoading = false;
227226
openFrame();
227+
redirectToNewConversation(conv);
228228
}).catch(() => {
229229
isLoading = false;
230230
openFrame();
231231
});
232+
} else {
233+
openFrame();
232234
}
233235
}).catch(() => {
234236
isCreatingNewConv = false;

src/routes/page/plugin/plugin-list.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@
6060
states: []
6161
};
6262
// ChatAction.Chat: send to current chat
63-
// ChatAction.NewChat: init a new conversation, and then send the message
63+
// ChatAction.NewChat: init a new conversation, and then send the message; if the message text is null, then only create a new conversation.
6464
sendToChatBot(ChatAction.Chat, CHAT_FRAME_ID, text, data);
6565
}
6666
</script>

0 commit comments

Comments
 (0)