SimpleChatTC:Show: Cleanup
Update existing flow so that next Tool Role message is handled directly from within
This commit is contained in:
parent
aa17edfa78
commit
62bce9ebfb
|
|
@ -493,16 +493,16 @@ class SimpleChat {
|
|||
div.replaceChildren();
|
||||
}
|
||||
let last = undefined;
|
||||
for(const x of this.recent_chat(gMe.chatProps.iRecentUserMsgCnt)) {
|
||||
if (x.ns.role != Roles.ToolTemp) {
|
||||
for(const [i, x] of this.recent_chat(gMe.chatProps.iRecentUserMsgCnt).entries()) {
|
||||
if (x.ns.role === Roles.ToolTemp) {
|
||||
if (i == (this.xchat.length - 1)) {
|
||||
elInUser.value = x.ns.content;
|
||||
}
|
||||
continue
|
||||
}
|
||||
let entry = ui.el_create_append_p(`${x.ns.role}: ${x.content_equiv()}`, div);
|
||||
entry.className = `role-${x.ns.role}`;
|
||||
last = entry;
|
||||
} else {
|
||||
if (elInUser) {
|
||||
elInUser.value = x.ns.content;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (last !== undefined) {
|
||||
last.scrollIntoView(false);
|
||||
|
|
|
|||
Loading…
Reference in New Issue