Skip to content

Commit ddbab98

Browse files
committed
SimpleChat: RePosition contents of the Info and Settings UI
Make it more logically structured and flow through.
1 parent c230836 commit ddbab98

File tree

1 file changed

+19
-19
lines changed

1 file changed

+19
-19
lines changed

examples/server/public_simplechat/simplechat.js

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -801,15 +801,15 @@ class Me {
801801

802802
ui.el_create_append_p(`bStream:${this.bStream}`, elDiv);
803803

804-
ui.el_create_append_p(`bCompletionFreshChatAlways:${this.bCompletionFreshChatAlways}`, elDiv);
805-
806-
ui.el_create_append_p(`bCompletionInsertStandardRolePrefix:${this.bCompletionInsertStandardRolePrefix}`, elDiv);
807-
808804
ui.el_create_append_p(`bTrimGarbage:${this.bTrimGarbage}`, elDiv);
809805

806+
ui.el_create_append_p(`ApiEndPoint:${this.apiEP}`, elDiv);
807+
810808
ui.el_create_append_p(`iRecentUserMsgCnt:${this.iRecentUserMsgCnt}`, elDiv);
811809

812-
ui.el_create_append_p(`ApiEndPoint:${this.apiEP}`, elDiv);
810+
ui.el_create_append_p(`bCompletionFreshChatAlways:${this.bCompletionFreshChatAlways}`, elDiv);
811+
812+
ui.el_create_append_p(`bCompletionInsertStandardRolePrefix:${this.bCompletionInsertStandardRolePrefix}`, elDiv);
813813

814814
}
815815

@@ -875,32 +875,32 @@ class Me {
875875
});
876876
elDiv.appendChild(bb.div);
877877

878-
bb = ui.el_creatediv_boolbutton("SetCompletionFreshChatAlways", "CompletionFreshChatAlways", {true: "[+] yes fresh", false: "[-] no, with history"}, this.bCompletionFreshChatAlways, (val)=>{
879-
this.bCompletionFreshChatAlways = val;
878+
bb = ui.el_creatediv_boolbutton("SetTrimGarbage", "TrimGarbage", {true: "[+] yes trim", false: "[-] dont trim"}, this.bTrimGarbage, (val)=>{
879+
this.bTrimGarbage = val;
880880
});
881881
elDiv.appendChild(bb.div);
882882

883-
bb = ui.el_creatediv_boolbutton("SetCompletionInsertStandardRolePrefix", "CompletionInsertStandardRolePrefix", {true: "[+] yes insert", false: "[-] dont insert"}, this.bCompletionInsertStandardRolePrefix, (val)=>{
884-
this.bCompletionInsertStandardRolePrefix = val;
885-
});
886-
elDiv.appendChild(bb.div);
883+
this.show_settings_chatrequestoptions(elDiv);
887884

888-
bb = ui.el_creatediv_boolbutton("SetTrimGarbage", "TrimGarbage", {true: "[+] yes trim", false: "[-] dont trim"}, this.bTrimGarbage, (val)=>{
889-
this.bTrimGarbage = val;
885+
let sel = ui.el_creatediv_select("SetApiEP", "ApiEndPoint", ApiEP.Type, this.apiEP, (val)=>{
886+
this.apiEP = ApiEP.Type[val];
890887
});
891-
elDiv.appendChild(bb.div);
888+
elDiv.appendChild(sel.div);
892889

893-
let sel = ui.el_creatediv_select("SetChatHistoryInCtxt", "ChatHistoryInCtxt", this.sRecentUserMsgCnt, this.iRecentUserMsgCnt, (val)=>{
890+
sel = ui.el_creatediv_select("SetChatHistoryInCtxt", "ChatHistoryInCtxt", this.sRecentUserMsgCnt, this.iRecentUserMsgCnt, (val)=>{
894891
this.iRecentUserMsgCnt = this.sRecentUserMsgCnt[val];
895892
});
896893
elDiv.appendChild(sel.div);
897894

898-
sel = ui.el_creatediv_select("SetApiEP", "ApiEndPoint", ApiEP.Type, this.apiEP, (val)=>{
899-
this.apiEP = ApiEP.Type[val];
895+
bb = ui.el_creatediv_boolbutton("SetCompletionFreshChatAlways", "CompletionFreshChatAlways", {true: "[+] yes fresh", false: "[-] no, with history"}, this.bCompletionFreshChatAlways, (val)=>{
896+
this.bCompletionFreshChatAlways = val;
900897
});
901-
elDiv.appendChild(sel.div);
898+
elDiv.appendChild(bb.div);
902899

903-
this.show_settings_chatrequestoptions(elDiv);
900+
bb = ui.el_creatediv_boolbutton("SetCompletionInsertStandardRolePrefix", "CompletionInsertStandardRolePrefix", {true: "[+] yes insert", false: "[-] dont insert"}, this.bCompletionInsertStandardRolePrefix, (val)=>{
901+
this.bCompletionInsertStandardRolePrefix = val;
902+
});
903+
elDiv.appendChild(bb.div);
904904

905905
}
906906

0 commit comments

Comments
 (0)