SimpleChat:Cleanup corners
Show system prompt in chat space, when it is set by pressing enter, as a feedback to user. Alert user, if they try to switch chat session in the middle of waiting for a response from the ai model.
This commit is contained in:
parent
b9f9c0ec6e
commit
68ef7401ed
1 changed files with 2 additions and 0 deletions
|
@ -250,6 +250,7 @@ class MultiChatUI {
|
|||
if ((ev.key === "Enter") && (!ev.shiftKey)) {
|
||||
let chat = this.simpleChats[this.curChatId];
|
||||
chat.add_system_anytime(this.elInSystem.value, this.curChatId);
|
||||
chat.show(this.elDivChat);
|
||||
ev.preventDefault();
|
||||
}
|
||||
});
|
||||
|
@ -356,6 +357,7 @@ class MultiChatUI {
|
|||
console.debug(`DBUG:MCUI:SessionClick:${target.id}`);
|
||||
if (this.elInUser.disabled) {
|
||||
console.error(`ERRR:MCUI:SessionClick:${target.id}:Current session [${this.curChatId}] awaiting response, ignoring switch...`);
|
||||
alert("ERRR:MCUI\nWait for response to pending query, before switching");
|
||||
return;
|
||||
}
|
||||
this.handle_session_switch(target.id);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue