Skip to content

Commit 36b8361

Browse files
committed
SimpleChat: Show Non SettingsUI config field by default
1 parent 0c4e7bc commit 36b8361

File tree

1 file changed

+16
-10
lines changed

1 file changed

+16
-10
lines changed

examples/server/public_simplechat/simplechat.js

Lines changed: 16 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -739,29 +739,35 @@ class Me {
739739
/**
740740
* Show the configurable parameters info in the passed Div element.
741741
* @param {HTMLDivElement} elDiv
742+
* @param {boolean} bAll
742743
*/
743-
show_info(elDiv) {
744+
show_info(elDiv, bAll=false) {
744745

745746
let p = ui.el_create_append_p("Settings (devel-tools-console document[gMe])", elDiv);
746747
p.className = "role-system";
747748

748-
ui.el_create_append_p(`baseURL:${this.baseURL}`, elDiv);
749+
if (bAll) {
749750

750-
ui.el_create_append_p(`Authorization:${this.headers["Authorization"]}`, elDiv);
751+
ui.el_create_append_p(`baseURL:${this.baseURL}`, elDiv);
751752

752-
ui.el_create_append_p(`bStream:${this.bStream}`, elDiv);
753+
ui.el_create_append_p(`Authorization:${this.headers["Authorization"]}`, elDiv);
753754

754-
ui.el_create_append_p(`bCompletionFreshChatAlways:${this.bCompletionFreshChatAlways}`, elDiv);
755+
ui.el_create_append_p(`bStream:${this.bStream}`, elDiv);
755756

756-
ui.el_create_append_p(`bCompletionInsertStandardRolePrefix:${this.bCompletionInsertStandardRolePrefix}`, elDiv);
757+
ui.el_create_append_p(`bCompletionFreshChatAlways:${this.bCompletionFreshChatAlways}`, elDiv);
757758

758-
ui.el_create_append_p(`bTrimGarbage:${this.bTrimGarbage}`, elDiv);
759+
ui.el_create_append_p(`bCompletionInsertStandardRolePrefix:${this.bCompletionInsertStandardRolePrefix}`, elDiv);
759760

760-
ui.el_create_append_p(`iRecentUserMsgCnt:${this.iRecentUserMsgCnt}`, elDiv);
761+
ui.el_create_append_p(`bTrimGarbage:${this.bTrimGarbage}`, elDiv);
761762

762-
ui.el_create_append_p(`chatRequestOptions:${JSON.stringify(this.chatRequestOptions, null, "\t")}`, elDiv);
763+
ui.el_create_append_p(`iRecentUserMsgCnt:${this.iRecentUserMsgCnt}`, elDiv);
763764

764-
ui.el_create_append_p(`ApiEndPoint:${this.apiEP}`, elDiv);
765+
ui.el_create_append_p(`ApiEndPoint:${this.apiEP}`, elDiv);
766+
767+
}
768+
769+
ui.el_create_append_p(`chatRequestOptions:${JSON.stringify(this.chatRequestOptions, null, " - ")}`, elDiv);
770+
ui.el_create_append_p(`headers:${JSON.stringify(this.headers, null, " - ")}`, elDiv);
765771

766772
}
767773

0 commit comments

Comments
 (0)