From 721f51f7a3caf61d82d1da1b7fb708930fd9dfaa Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Wed, 28 Jan 2026 17:15:25 +0000 Subject: [PATCH] This build was committed by a bot. --- .../{index-Bt4ejZdu.js => index-SK-1NzFu.js} | 27 ++++++++++++++----- dist/index.html | 2 +- dist/sw.js | 2 +- 3 files changed, 22 insertions(+), 9 deletions(-) rename dist/assets/{index-Bt4ejZdu.js => index-SK-1NzFu.js} (98%) diff --git a/dist/assets/index-Bt4ejZdu.js b/dist/assets/index-SK-1NzFu.js similarity index 98% rename from dist/assets/index-Bt4ejZdu.js rename to dist/assets/index-SK-1NzFu.js index 30ae064..a74176f 100644 --- a/dist/assets/index-Bt4ejZdu.js +++ b/dist/assets/index-SK-1NzFu.js @@ -86,13 +86,26 @@ const HTTP_BASE = "https://orp.aww.4ev.link/ws"; const buildBody = () => { const { USER: USER2, SUNE: SUNE2, state: state2, payloadWithSampling: payloadWithSampling2 } = window; const msgs = []; - if (USER2.masterPrompt && !SUNE2.ignore_master_prompt) msgs.push({ role: "system", content: [{ type: "text", text: USER2.masterPrompt }] }); - if (SUNE2.system_prompt) msgs.push({ role: "system", content: [{ type: "text", text: SUNE2.system_prompt }] }); - msgs.push(...state2.messages.filter((m) => m.role !== "system").map((m) => ({ - role: m.role, - content: m.content, - ...m.images ? { images: m.images } : {} - }))); + const mPrompt = (USER2.masterPrompt || "").trim(); + if (mPrompt && !SUNE2.ignore_master_prompt) { + msgs.push({ role: "system", content: mPrompt }); + } + const sPrompt = (SUNE2.system_prompt || "").trim(); + if (sPrompt) { + msgs.push({ role: "system", content: sPrompt }); + } + state2.messages.filter((m) => m.role !== "system").forEach((m) => { + let content = Array.isArray(m.content) ? [...m.content] : [{ type: "text", text: String(m.content || "") }]; + content = content.filter((p) => p.type !== "text" || p.text && p.text.trim().length > 0); + if (content.length === 0 || !content.some((p) => p.type === "text")) { + content.push({ type: "text", text: "." }); + } + msgs.push({ + role: m.role, + content, + ...m.images?.length ? { images: m.images } : {} + }); + }); const b = payloadWithSampling2({ model: SUNE2.model.replace(/^(or:|oai:|g:|cla:|cf:)/, ""), messages: msgs, stream: true }); if (SUNE2.json_output) { let s; diff --git a/dist/index.html b/dist/index.html index 1df3538..008f46f 100644 --- a/dist/index.html +++ b/dist/index.html @@ -12,7 +12,7 @@ - + diff --git a/dist/sw.js b/dist/sw.js index 534dda8..3098773 100644 --- a/dist/sw.js +++ b/dist/sw.js @@ -1 +1 @@ -if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,t)=>{const r=e||("document"in self?document.currentScript.src:"")||location.href;if(s[r])return;let o={};const d=e=>i(e,r),c={module:{uri:r},exports:o,require:d};s[r]=Promise.all(n.map(e=>c[e]||d(e))).then(e=>(t(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"bc2513d7b6157dd922c1287721be9d6e"},{url:"assets/index-JLEDB1oP.css",revision:null},{url:"assets/index-Bt4ejZdu.js",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))}); +if(!self.define){let e,s={};const i=(i,n)=>(i=new URL(i+".js",n).href,s[i]||new Promise(s=>{if("document"in self){const e=document.createElement("script");e.src=i,e.onload=s,document.head.appendChild(e)}else e=i,importScripts(i),s()}).then(()=>{let e=s[i];if(!e)throw new Error(`Module ${i} didn’t register its module`);return e}));self.define=(n,r)=>{const t=e||("document"in self?document.currentScript.src:"")||location.href;if(s[t])return;let o={};const c=e=>i(e,t),d={module:{uri:t},exports:o,require:c};s[t]=Promise.all(n.map(e=>d[e]||c(e))).then(e=>(r(...e),o))}}define(["./workbox-8c29f6e4"],function(e){"use strict";self.skipWaiting(),e.clientsClaim(),e.precacheAndRoute([{url:"registerSW.js",revision:"1872c500de691dce40960bb85481de07"},{url:"index.html",revision:"91d04148b0c980edccac09d459615e2f"},{url:"assets/index-SK-1NzFu.js",revision:null},{url:"assets/index-JLEDB1oP.css",revision:null},{url:"manifest.webmanifest",revision:"7a6c5c6ab9cb5d3605d21df44c6b17a2"}],{}),e.cleanupOutdatedCaches(),e.registerRoute(new e.NavigationRoute(e.createHandlerBoundToURL("index.html")))});