Skip to content

Commit

Permalink
Merge pull request #233 from iceljc/features/refine-chat-window
Browse files Browse the repository at this point in the history
add comments
  • Loading branch information
iceljc authored Oct 2, 2024
2 parents 1222445 + ee4928b commit e9207c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/routes/chat/[agentId]/[conversationId]/chat-box.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -222,13 +222,15 @@
if (conv && !!e.data.text) {
isLoading = true;
sendChatMessage(e.data.text, e.data.data || null, conv.id).then(() => {
redirectToNewConversation(conv);
isLoading = false;
openFrame();
redirectToNewConversation(conv);
}).catch(() => {
isLoading = false;
openFrame();
});
} else {
openFrame();
}
}).catch(() => {
isCreatingNewConv = false;
Expand Down
2 changes: 1 addition & 1 deletion src/routes/page/plugin/plugin-list.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@
states: []
};
// ChatAction.Chat: send to current chat
// ChatAction.NewChat: init a new conversation, and then send the message
// ChatAction.NewChat: init a new conversation, and then send the message; if the message text is null, then only create a new conversation.
sendToChatBot(ChatAction.Chat, CHAT_FRAME_ID, text, data);
}
</script>
Expand Down

0 comments on commit e9207c4

Please sign in to comment.