@@ -1879,6 +1879,23 @@ Current version indicated by LITEVER below.
18791879 {
18801880 background-color: #161616;
18811881 }
1882+ .corpoendeditbutton {
1883+ position: fixed;
1884+ top: 75px;
1885+ right: 25px;
1886+ width: 40px;
1887+ padding: 8px 6px;
1888+ background-color: #de5b5b;
1889+ color: white;
1890+ border-radius: 24px;
1891+ opacity: 0.65;
1892+ cursor: pointer;
1893+ box-shadow: 1 2px 8px rgba(0, 0, 0, 0.2);
1894+ }
1895+
1896+ .corpoendeditbutton:hover {
1897+ background-color: #f67676;
1898+ }
18821899 .corpoleftpanelitems
18831900 {
18841901 display: flex;
@@ -13383,6 +13400,11 @@ Current version indicated by LITEVER below.
1338313400 }
1338413401 render_gametext(false);
1338513402 }
13403+ function exit_editmode()
13404+ {
13405+ document.getElementById("allowediting").checked = false;
13406+ toggle_editable();
13407+ }
1338613408
1338713409 function toggle_hide_thinking(button) {
1338813410 // Get the parent div of the button
@@ -18714,40 +18736,43 @@ Current version indicated by LITEVER below.
1871418736 fulltxt = replaceAll(fulltxt, get_instruct_endtag(true), `%SpcEtg%`);
1871518737 if (localsettings.separate_end_tags) {
1871618738 if (get_instruct_endtag_end(true)) {
18739+ fulltxt = replaceAll(fulltxt, get_instruct_endtag_end(false), ``);
1871718740 fulltxt = replaceAll(fulltxt, get_instruct_endtag_end(true), ``);
1871818741 }
1871918742 if (get_instruct_starttag_end(true)) {
18743+ fulltxt = replaceAll(fulltxt, get_instruct_starttag_end(false), ``);
1872018744 fulltxt = replaceAll(fulltxt, get_instruct_starttag_end(true), ``);
1872118745 }
1872218746 }
1872318747
18724- if(localsettings.instruct_has_markdown && synchro_pending_stream=="")
18725- {
18726- //if a list has a starttag on the same line, add a newline before it
18727- fulltxt = fulltxt.replace(/(\n[-*] .+?)(%SpcStg%)/g, "$1\n$2");
18728- let codeblockcount = (fulltxt.match(/```/g) || []).length;
18729- if(codeblockcount>0 && codeblockcount%2!=0 )
18730- {
18731- fulltxt += "```"; //force end code block
18732- }
18733- fulltxt = simpleMarkdown(fulltxt,localsettings.instruct_has_latex);
18734- }
18735-
1873618748 let instruct_turns = repack_instruct_turns(fulltxt, `%SpcStg%`,`%SpcEtg%`, true);
1873718749 fulltxt = "";
1873818750 for(let i=0;i<instruct_turns.length;++i)
1873918751 {
1874018752 let curr = instruct_turns[i];
18753+ let currmsg = curr.msg;
18754+ if(localsettings.instruct_has_markdown && (synchro_pending_stream==""||(i+1)<instruct_turns.length))
18755+ {
18756+ //if a list has a starttag on the same line, add a newline before it
18757+ currmsg = currmsg.replace(/(\n[-*] .+?)(%SpcStg%)/g, "$1\n$2");
18758+ let codeblockcount = (currmsg.match(/```/g) || []).length;
18759+ if(codeblockcount>0 && codeblockcount%2!=0 )
18760+ {
18761+ currmsg += "```"; //force end code block
18762+ }
18763+ currmsg = simpleMarkdown(currmsg,localsettings.instruct_has_latex);
18764+ }
18765+
1874118766 if(curr.myturn)
1874218767 {
18743- fulltxt += `<hr style="margin-top: 12px; margin-bottom: 12px;"><span class="color_cyan"><img src="${human_square}" style="height:38px;width:auto;padding:3px 6px 3px 3px;border-radius: 8%;"/>${curr.msg }</span>`;
18768+ fulltxt += `<hr style="margin-top: 12px; margin-bottom: 12px;"><span class="color_cyan"><img src="${human_square}" style="height:38px;width:auto;padding:3px 6px 3px 3px;border-radius: 8%;"/>${currmsg }</span>`;
1874418769 }
1874518770 else
1874618771 {
1874718772 if (i == 0) {
18748- fulltxt += `${curr.msg }`;
18773+ fulltxt += `${currmsg }`;
1874918774 } else {
18750- fulltxt += `<hr style="margin-top: 12px; margin-bottom: 12px;"><img src="${niko_square}" style="height:38px;width:auto;padding:3px 6px 3px 3px;border-radius: 8%;"/>${curr.msg }</span>`;
18775+ fulltxt += `<hr style="margin-top: 12px; margin-bottom: 12px;"><img src="${niko_square}" style="height:38px;width:auto;padding:3px 6px 3px 3px;border-radius: 8%;"/>${currmsg }</span>`;
1875118776 }
1875218777 }
1875318778 }
@@ -19070,6 +19095,12 @@ Current version indicated by LITEVER below.
1907019095 document.getElementById("normalinterface").classList.remove("hidden");
1907119096 }
1907219097
19098+ if (inEditMode && isCorpoUiStyle) {
19099+ document.getElementById("corpoendedit").classList.remove("hidden");
19100+ } else {
19101+ document.getElementById("corpoendedit").classList.add("hidden");
19102+ }
19103+
1907319104 update_submit_button(true); //full update for submit button, otherwise just text when not generating
1907419105
1907519106 document.getElementById("btnautogenmem").disabled = document.getElementById("btnsend").disabled;
@@ -19803,7 +19834,7 @@ Current version indicated by LITEVER below.
1980319834
1980419835 function show_corpo_leftpanel(open)
1980519836 {
19806- let panel = document.getElementById('corpo_leftpannel ');
19837+ let panel = document.getElementById('corpo_leftpanel ');
1980719838 if(open)
1980819839 {
1980919840 panel.classList.add('open');
@@ -21945,9 +21976,10 @@ Current version indicated by LITEVER below.
2194521976 </div>
2194621977 </div>
2194721978
21979+ <button title="Exit Edit Mode" id="corpoendedit" class="corpoendeditbutton hidden" onclick="exit_editmode()">X</button>
2194821980 <div id="corpointerface" class="hidden">
2194921981 <div class="corpostyle">
21950- <div id="corpo_leftpannel " class="corpoleftpanel">
21982+ <div id="corpo_leftpanel " class="corpoleftpanel">
2195121983 <button title="Hide Corpo Side Panel" class="corpo_leftpanel_close mainnav" onclick="show_corpo_leftpanel(false)">×</button>
2195221984 <div id="corpoleftpanelitems" class="corpoleftpanelitems">
2195321985 <div class="corpoleftpanelitemstopper" id="corpoleftpanelitemstopper"></div>
0 commit comments