diff --git a/static/koboldai.css b/static/koboldai.css index 5b168c59..188b1be2 100644 --- a/static/koboldai.css +++ b/static/koboldai.css @@ -809,6 +809,7 @@ td.server_vars { padding-right: 35px; margin-bottom: 10px; flex-shrink: 0; + cursor: pointer; } .token_breakdown div { @@ -1597,6 +1598,16 @@ body { margin-bottom: 3px; } +#context-viewer-header-right { + display: flex; + flex-direction: row; +} + +#context-viewer-close { + cursor: pointer; + float: right; +} + #context-viewer-header > h3 { margin: 0px; margin-top: 3px; @@ -1606,13 +1617,28 @@ body { overflow-y: auto; height: 100%; flex-grow: 1; - padding: 0px 10px + padding: 0px 10px; +} + +.context-symbol { + font-size: 1em !important; + position: relative; + top: 3px; + opacity: 0.5; } .context-block { margin: 0px 2px; } +.context-block:hover { + outline: 1px solid gray; +} + +.context-block.example:hover { + outline: none !important; +} + .context-sp {background-color: orangered;} .context-prompt {background-color: orange;} .context-wi {background-color: #1751b9;} @@ -1783,7 +1809,11 @@ h2 .material-icons-outlined { cursor: pointer; } -.material-icons-outlined, .collapsable_header, .section_header, .help_text { +.material-icons-outlined, +.collapsable_header, +.section_header, +.help_text, +.noselect { -webkit-touch-callout: none; -webkit-user-select: none; -khtml-user-select: none; diff --git a/static/koboldai.js b/static/koboldai.js index ba842d8d..87729823 100644 --- a/static/koboldai.js +++ b/static/koboldai.js @@ -2065,6 +2065,8 @@ function update_context(data) { el.classList.add(contextClass); el.innerText = entry.text; + el.innerHTML = el.innerHTML.replaceAll("
", 'keyboard_return'); + document.getElementById("context-container").appendChild(el); } @@ -2905,4 +2907,12 @@ $(document).ready(function(){ if (enabledTweaks.includes(path)) toggle.click(); } + + $("#context-viewer-close").click(function() { + document.getElementById("context-viewer-container").classList.add("hidden"); + }); + + $(".token_breakdown").click(function() { + document.getElementById("context-viewer-container").classList.remove("hidden"); + }); }); diff --git a/templates/index_new.html b/templates/index_new.html index f0927a24..89675cee 100644 --- a/templates/index_new.html +++ b/templates/index_new.html @@ -113,22 +113,29 @@ -
+