mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-05-22 03:10:03 +00:00
updated lite
This commit is contained in:
parent
9e7a940ce4
commit
fc551470d4
1 changed files with 8 additions and 8 deletions
16
klite.embd
16
klite.embd
|
|
@ -12,7 +12,7 @@ Current version indicated by LITEVER below.
|
|||
-->
|
||||
|
||||
<script id="init-config">
|
||||
const LITEVER = 269;
|
||||
const LITEVER = 270;
|
||||
const urlParams = new URLSearchParams(window.location.search);
|
||||
var localflag = urlParams.get('local'); //this will be replaced automatically in embedded kcpp
|
||||
const STORAGE_PREFIX = (localflag?"e_":"")+"kaihordewebui_";
|
||||
|
|
@ -3995,9 +3995,9 @@ Current version indicated by LITEVER below.
|
|||
|
||||
try {
|
||||
// Test if lookahead is supported, enhance italics regex if so
|
||||
let improved_italics = new RegExp("\\*(?!\\s)(.+?)(?<!\\s)\\*","g");
|
||||
let improved_italics = new RegExp("\\*(?!\\s)([\\s\\S]+?)(?<!\\s)\\*","g");
|
||||
italics_regex = improved_italics;
|
||||
let improved_bold = new RegExp("\\*\\*(?!\\s)(.+?)(?<!\\s)\\*\\*","g");
|
||||
let improved_bold = new RegExp("\\*\\*(?!\\s)([\\s\\S]+?)(?<!\\s)\\*\\*","g");
|
||||
bold_regex = improved_bold;
|
||||
} catch (e) {
|
||||
console.log('Lookaheads are not supported in this environment.');
|
||||
|
|
@ -4524,7 +4524,7 @@ Current version indicated by LITEVER below.
|
|||
{
|
||||
return "";
|
||||
}
|
||||
return `${localsettings.start_thinking_tag}([\\s\\S]+?)${localsettings.stop_thinking_tag}`;
|
||||
return `${localsettings.start_thinking_tag}([\\s\\S]*?)${localsettings.stop_thinking_tag}`;
|
||||
}
|
||||
|
||||
function remove_all_instruct_tags(text)
|
||||
|
|
@ -6121,9 +6121,9 @@ Current version indicated by LITEVER below.
|
|||
.replace(/<\/li><\/ul>\n\s*?\n<ul><li>/gm, "</li>\n<li>")
|
||||
.replace(/<\/li><\/ul>\s*?<ul><li>/gm, "</li><li>")
|
||||
|
||||
.replace(/\*\*\*([^\s*].*?[^\\])\*\*\*/gm, "<b><em>$1</em></b>")
|
||||
.replace(/\*\*([^\s*].*?[^\\])\*\*/gm, "<b>$1</b>")
|
||||
.replace(/\*([^\s*].*?[^\\])\*/gm, "<em>$1</em>")
|
||||
.replace(/\*\*\*([^\s*][\s\S]*?[^\\])\*\*\*/gm, "<b><em>$1</em></b>")
|
||||
.replace(/\*\*([^\s*][\s\S]*?[^\\])\*\*/gm, "<b>$1</b>")
|
||||
.replace(/\*([^\s*][\s\S]*?[^\\])\*/gm, "<em>$1</em>")
|
||||
.replace(/___(\w.*?[^\\])___/gm, "<b><em>$1</em></b>")
|
||||
.replace(/__(\w.*?[^\\])__/gm, "<u>$1</u>")
|
||||
.replace(/~~(\w.*?)~~/gm, "<del>$1</del>")
|
||||
|
|
@ -14522,7 +14522,7 @@ Current version indicated by LITEVER below.
|
|||
inputtxt = inputtxt.replace(/%ExpandBtn%(?:\n{0,2})?/g, function (m) {
|
||||
let curr = matches[matchiter];
|
||||
let expandedhtml = `<span><button type="button" title="Show Thoughts" class="btn btn-primary" style="font-size:12px;padding:2px 2px;" onclick="toggle_hide_thinking(this)">Show Thoughts (${curr.length} characters)</button><span class="color_lightgreen hidden"><br>${escape_html(curr)}</span><br></span>`;
|
||||
if(!curr || curr.trim()=="" || curr.trim()=="/nothink")
|
||||
if(!curr || curr.trim()=="" || curr.trim()=="/nothink" || curr.trim()==`${localsettings.start_thinking_tag}${localsettings.stop_thinking_tag}`)
|
||||
{
|
||||
expandedhtml = `<span><button type="button" title="No Thoughts" class="btn btn-primary" style="font-size:12px;padding:2px 2px;" onclick="">No Thoughts</button><br></span>`;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue