SimpleChat: Try keep input element in view
This commit is contained in:
parent
564469e4f6
commit
7d772f6b9a
1 changed files with 2 additions and 0 deletions
|
@ -97,6 +97,7 @@ async function handle_submit(inputUser, divChat, urlApi, bMessages=true) {
|
||||||
} else {
|
} else {
|
||||||
theBody = gChat.request_prompt_jsonstr();
|
theBody = gChat.request_prompt_jsonstr();
|
||||||
}
|
}
|
||||||
|
inputUser.scrollIntoView(true);
|
||||||
inputUser.value = "working...";
|
inputUser.value = "working...";
|
||||||
inputUser.disabled = true;
|
inputUser.disabled = true;
|
||||||
console.debug("DBUG:HandleSubmit:ReqBody:", theBody);
|
console.debug("DBUG:HandleSubmit:ReqBody:", theBody);
|
||||||
|
@ -114,6 +115,7 @@ async function handle_submit(inputUser, divChat, urlApi, bMessages=true) {
|
||||||
let assistantMsg = respBody["choices"][0]["message"]["content"];
|
let assistantMsg = respBody["choices"][0]["message"]["content"];
|
||||||
gChat.add(Roles.Assistant, assistantMsg);
|
gChat.add(Roles.Assistant, assistantMsg);
|
||||||
gChat.show(divChat);
|
gChat.show(divChat);
|
||||||
|
inputUser.scrollIntoView(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue