SimpleChat:GetSystemLatest, fix a oversight.
This commit is contained in:
parent
7297dda376
commit
3458d2f8c3
1 changed files with 5 additions and 5 deletions
|
@ -144,11 +144,11 @@ class SimpleChat {
|
||||||
/**
|
/**
|
||||||
* Retrieve the latest system prompt.
|
* Retrieve the latest system prompt.
|
||||||
*/
|
*/
|
||||||
get_system() {
|
get_system_latest() {
|
||||||
let sysPrompt = this.xchat[this.iLastSys].content;
|
if (this.iLastSys == -1) {
|
||||||
if (!sysPrompt) {
|
return "";
|
||||||
sysPrompt = "";
|
|
||||||
}
|
}
|
||||||
|
let sysPrompt = this.xchat[this.iLastSys].content;
|
||||||
return sysPrompt;
|
return sysPrompt;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -353,7 +353,7 @@ class MultiChatUI {
|
||||||
console.error(`ERRR:MCUI:Session:${chatId} missing...`);
|
console.error(`ERRR:MCUI:Session:${chatId} missing...`);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.elInSystem.value = chat.get_system();
|
this.elInSystem.value = chat.get_system_latest();
|
||||||
this.elInUser.value = "";
|
this.elInUser.value = "";
|
||||||
chat.show(this.elDivChat);
|
chat.show(this.elDivChat);
|
||||||
this.elInUser.focus();
|
this.elInUser.focus();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue