|
2293 | 2293 | padding:4px;
|
2294 | 2294 | margin-right:6px;
|
2295 | 2295 | border-radius:50%;
|
| 2296 | + cursor:pointer; |
2296 | 2297 | }
|
2297 | 2298 | .corpostyleitemheading
|
2298 | 2299 | {
|
|
15314 | 15315 | render_gametext(needsave);
|
15315 | 15316 | }
|
15316 | 15317 |
|
| 15318 | + var cosmetic_corpo_ai_nick = "KoboldAI"; |
| 15319 | + function corpo_click_avatar() |
| 15320 | + { |
| 15321 | + inputBox("Set Cosmetic AI Nickname\n(This is purely cosmetic and does not affect responses, and is not saved).","Set Cosmetic AI Nickname",cosmetic_corpo_ai_nick,"Set Cosmetic AI Nickname", ()=>{ |
| 15322 | + let userinput = getInputBoxValue(); |
| 15323 | + userinput = userinput.trim(); |
| 15324 | + if (userinput != null && userinput!="") { |
| 15325 | + cosmetic_corpo_ai_nick = userinput; |
| 15326 | + }else |
| 15327 | + { |
| 15328 | + cosmetic_corpo_ai_nick = "KoboldAI"; |
| 15329 | + } |
| 15330 | + render_gametext(false); |
| 15331 | + },false,false,false); |
| 15332 | + } |
| 15333 | + |
15317 | 15334 | var corpo_editing_turn = -1;
|
15318 | 15335 | function render_corpo_ui(input)
|
15319 | 15336 | {
|
|
15368 | 15385 | processed_msg = processed_msg.replace(/\[<\|.+?\|>\]/g, ""); //remove normal comments too
|
15369 | 15386 | }
|
15370 | 15387 |
|
15371 |
| - let namepart = (curr.myturn ? "User" : "KoboldAI"); |
| 15388 | + let namepart = (curr.myturn ? "User" : cosmetic_corpo_ai_nick); |
15372 | 15389 | //advanced name replacement
|
15373 | 15390 | if(localsettings.opmode==3 && curr.name) //chat mode
|
15374 | 15391 | {
|
|
15432 | 15449 | + `</div>`);
|
15433 | 15450 |
|
15434 | 15451 | newbodystr += `<div class="corpostyleitem">
|
15435 |
| - <div><img src="`+ (curr.myturn ? human_square : niko_square) + `" class="corpoavatar"/></div> |
| 15452 | + <div><img ${(curr.myturn ? "" : `onclick="corpo_click_avatar()"`)} src="${(curr.myturn ? human_square : niko_square)}" class="corpoavatar"/></div> |
15436 | 15453 | <div style="width:100%">
|
15437 | 15454 | <div class="corpostyleitemheading">`+ namepart + `</div>
|
15438 | 15455 | `+ bodypart + chunkbtns + `
|
|
15441 | 15458 | }
|
15442 | 15459 | if(incomplete_resp)
|
15443 | 15460 | {
|
15444 |
| - let namepart = "KoboldAI"; |
| 15461 | + let namepart = cosmetic_corpo_ai_nick; |
15445 | 15462 | let futuretext = (synchro_pending_stream!=""?(escapeHtml(pending_context_preinjection) + escapeHtml(synchro_pending_stream)):"...");
|
15446 | 15463 | if(localsettings.opmode==3)
|
15447 | 15464 | {
|
|
16862 | 16879 | replacedText = replacedText.replace(italics_regex, wrapperSpan(styleRole, 'action')); // Apply the actions style to *actions*.
|
16863 | 16880 | replacedText = replacedText.replace(/“(.*?)”/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
16864 | 16881 | replacedText = replacedText.replace(/"(.*?)"/g, wrapperSpan(styleRole, 'speech')); // Apply the speech style to "speech".
|
| 16882 | + if(localsettings.opmode==4) |
| 16883 | + { |
| 16884 | + replacedText = replacedText.replace(/!\[(.*?)\]\((.*?)\)/gm, '<img alt="$1" src="$2" />'); //very simple inline images |
| 16885 | + } |
16865 | 16886 | return replacedText;
|
16866 | 16887 | });
|
16867 | 16888 | }
|
|
0 commit comments