libre-webui 0.7.0 → 0.8.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +93 -1
- package/backend/dist/index.d.ts.map +1 -1
- package/backend/dist/index.js +426 -57
- package/backend/dist/index.js.map +1 -1
- package/backend/dist/routes/ollama.d.ts.map +1 -1
- package/backend/dist/routes/ollama.js +40 -0
- package/backend/dist/routes/ollama.js.map +1 -1
- package/backend/dist/routes/plugins.d.ts.map +1 -1
- package/backend/dist/routes/plugins.js +17 -0
- package/backend/dist/routes/plugins.js.map +1 -1
- package/backend/dist/services/ollamaService.d.ts +2 -0
- package/backend/dist/services/ollamaService.d.ts.map +1 -1
- package/backend/dist/services/ollamaService.js +31 -0
- package/backend/dist/services/ollamaService.js.map +1 -1
- package/backend/dist/services/openclawSessionService.d.ts +63 -0
- package/backend/dist/services/openclawSessionService.d.ts.map +1 -0
- package/backend/dist/services/openclawSessionService.js +307 -0
- package/backend/dist/services/openclawSessionService.js.map +1 -0
- package/backend/dist/services/pluginService.d.ts +20 -0
- package/backend/dist/services/pluginService.d.ts.map +1 -1
- package/backend/dist/services/pluginService.js +250 -6
- package/backend/dist/services/pluginService.js.map +1 -1
- package/frontend/dist/assets/index-BHPEXBOC.js +51 -0
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/js/{ArtifactContainer-D_igWPrR.js → ArtifactContainer-CR_N0zJa.js} +2 -2
- package/frontend/dist/js/{ArtifactDemoPage-BW64ikxs.js → ArtifactDemoPage-B4i0y1r8.js} +1 -1
- package/frontend/dist/js/{ChatPage-CIUGXjJ_.js → ChatPage-CNZjHhUr.js} +16 -16
- package/frontend/dist/js/{GalleryPage-CMqUQtns.js → GalleryPage-BwPcUdbX.js} +1 -1
- package/frontend/dist/js/ModelsPage-2EzbE4Sf.js +1 -0
- package/frontend/dist/js/PersonasPage-CZrFe-EX.js +13 -0
- package/frontend/dist/js/{UserManagementPage-C4vtOCZ6.js → UserManagementPage-doHbL51e.js} +1 -1
- package/frontend/dist/js/{ui-vendor-DxZsuKzb.js → ui-vendor-BxYipEVo.js} +1 -1
- package/package.json +2 -1
- package/plugins/openclaw-agent.json +69 -0
- package/frontend/dist/assets/index-DMlahgv7.js +0 -51
- package/frontend/dist/js/ModelsPage-DQ2ud-YG.js +0 -1
- package/frontend/dist/js/PersonasPage-HqcbbtTL.js +0 -13
package/frontend/dist/index.html
CHANGED
|
@@ -9,10 +9,10 @@
|
|
|
9
9
|
<meta name="description" content="A modern, minimalist WebUI for interacting with local LLMs through Ollama API" />
|
|
10
10
|
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
11
11
|
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
12
|
-
<script type="module" crossorigin src="/assets/index-
|
|
12
|
+
<script type="module" crossorigin src="/assets/index-BHPEXBOC.js"></script>
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/js/router-vendor-CmbUVdlE.js">
|
|
14
14
|
<link rel="modulepreload" crossorigin href="/js/markdown-vendor-QwEm2Xso.js">
|
|
15
|
-
<link rel="modulepreload" crossorigin href="/js/ui-vendor-
|
|
15
|
+
<link rel="modulepreload" crossorigin href="/js/ui-vendor-BxYipEVo.js">
|
|
16
16
|
<link rel="modulepreload" crossorigin href="/js/utils-vendor-0Ymd3GFQ.js">
|
|
17
17
|
<link rel="stylesheet" crossorigin href="/css/index-D9uKnbHR.css">
|
|
18
18
|
</head>
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./markdown-vendor-QwEm2Xso.js";import{r as c}from"./router-vendor-CmbUVdlE.js";import{a as
|
|
1
|
+
import{j as e}from"./markdown-vendor-QwEm2Xso.js";import{r as c}from"./router-vendor-CmbUVdlE.js";import{a as D,u as I,B as t,c as R,O as y}from"../assets/index-BHPEXBOC.js";import{a as w,N as k,C as f,O as N,k as C,az as z,f as J,Q as S,W as T,G as B,Y as M}from"./ui-vendor-BxYipEVo.js";const P=({artifact:s,className:d})=>{const{t:r}=D(),[h,m]=c.useState(!1),[n,i]=c.useState("preview"),A=c.useRef(null),{theme:x,openArtifactPanel:g}=I(),p=async a=>{try{await navigator.clipboard.writeText(a),m(!0),setTimeout(()=>m(!1),2e3)}catch(l){console.error("Failed to copy:",l)}},u=()=>{const a=new Blob([s.content],{type:L(s.type)}),l=URL.createObjectURL(a),o=document.createElement("a");o.href=l,o.download=`${s.title}.${O(s.type)}`,document.body.appendChild(o),o.click(),document.body.removeChild(o),URL.revokeObjectURL(l)},L=a=>{switch(a){case"html":return"text/html";case"react":return"text/javascript";case"svg":return"image/svg+xml";case"css":return"text/css";case"json":return"application/json";default:return"text/plain"}},O=a=>{switch(a){case"html":return"html";case"react":return"jsx";case"svg":return"svg";case"css":return"css";case"json":return"json";default:return"txt"}},b=()=>{switch(s.type){case"html":return e.jsx(B,{className:"h-4 w-4"});case"react":return e.jsx(T,{className:"h-4 w-4"});case"svg":return e.jsx(S,{className:"h-4 w-4"});case"code":return e.jsx(T,{className:"h-4 w-4"});default:return e.jsx(S,{className:"h-4 w-4"})}},E=()=>{const a=`
|
|
2
2
|
<!DOCTYPE html>
|
|
3
3
|
<html>
|
|
4
4
|
<head>
|
|
@@ -21,4 +21,4 @@ import{j as e}from"./markdown-vendor-QwEm2Xso.js";import{r as c}from"./router-ve
|
|
|
21
21
|
${s.content}
|
|
22
22
|
</body>
|
|
23
23
|
</html>
|
|
24
|
-
`;return e.jsx("iframe",{ref:A,srcDoc:a,className:"w-full h-64 sm:h-80 lg:h-96 border-0 rounded-lg",sandbox:"allow-scripts allow-same-origin",title:s.title})},F=()=>{try{return e.jsx("div",{className:"w-full h-64 sm:h-80 lg:h-96 flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg overflow-hidden border border-gray-200 dark:border-dark-200",dangerouslySetInnerHTML:{__html:s.content}})}catch{return e.jsx("div",{className:"w-full h-64 sm:h-80 lg:h-96 flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg border border-gray-200 dark:border-dark-200",children:e.jsxs("div",{className:"text-center",children:[e.jsx(M,{className:"h-8 w-8 text-red-500 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("artifacts.invalidSvg")})]})})}},v=()=>{const a=()=>{if(s.language)return s.language;switch(s.type){case"html":return"html";case"react":return"jsx";case"svg":return"xml";case"json":return"json";default:return"text"}};return e.jsx("div",{className:"relative max-h-64 sm:max-h-80 lg:max-h-96 overflow-auto",children:e.jsx(y,{language:a(),isDark:x.mode==="dark",className:"!m-0 !rounded-lg",children:s.content})})},
|
|
24
|
+
`;return e.jsx("iframe",{ref:A,srcDoc:a,className:"w-full h-64 sm:h-80 lg:h-96 border-0 rounded-lg",sandbox:"allow-scripts allow-same-origin",title:s.title})},F=()=>{try{return e.jsx("div",{className:"w-full h-64 sm:h-80 lg:h-96 flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg overflow-hidden border border-gray-200 dark:border-dark-200",dangerouslySetInnerHTML:{__html:s.content}})}catch{return e.jsx("div",{className:"w-full h-64 sm:h-80 lg:h-96 flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg border border-gray-200 dark:border-dark-200",children:e.jsxs("div",{className:"text-center",children:[e.jsx(M,{className:"h-8 w-8 text-red-500 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("artifacts.invalidSvg")})]})})}},v=()=>{const a=()=>{if(s.language)return s.language;switch(s.type){case"html":return"html";case"react":return"jsx";case"svg":return"xml";case"json":return"json";default:return"text"}};return e.jsx("div",{className:"relative max-h-64 sm:max-h-80 lg:max-h-96 overflow-auto",children:e.jsx(y,{language:a(),isDark:x.mode==="dark",className:"!m-0 !rounded-lg",children:s.content})})},U=()=>{try{const a=JSON.parse(s.content),l=JSON.stringify(a,null,2);return e.jsx("div",{className:"relative max-h-64 sm:max-h-80 lg:max-h-96 overflow-auto",children:e.jsx(y,{language:"json",isDark:x.mode==="dark",className:"!m-0 !rounded-lg",children:l})})}catch{return e.jsx("div",{className:"w-full h-32 flex items-center justify-center bg-gray-50 dark:bg-dark-100 rounded-lg border border-gray-200 dark:border-dark-200",children:e.jsxs("div",{className:"text-center",children:[e.jsx(M,{className:"h-8 w-8 text-red-500 mx-auto mb-2"}),e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400",children:r("artifacts.invalidJson")})]})})}},_=()=>{if(n==="code")return v();switch(s.type){case"html":return E();case"svg":return F();case"json":return U();default:return v()}},j=()=>s.type==="html"||s.type==="svg"||s.type==="react";return e.jsxs("div",{className:R("border border-gray-200 dark:border-dark-200 ophelia:border-[#1a1a1a] rounded-xl bg-white dark:bg-dark-25 ophelia:bg-[#050505] shadow-lg transition-all duration-300 hover:shadow-xl","w-full max-w-full overflow-hidden animate-fade-in","max-h-[400px] flex flex-col",d),children:[e.jsxs("div",{className:"px-1.5 py-1.5 sm:p-4 border-b border-gray-100 dark:border-dark-200 ophelia:border-[#1a1a1a] flex-shrink-0",children:[e.jsxs("div",{className:"flex flex-col gap-2 sm:hidden",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"h-4 w-4 flex-shrink-0 flex items-center justify-center",children:b()}),e.jsx("h3",{className:"font-medium text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] truncate text-sm leading-tight flex-1",children:s.title})]}),e.jsxs("div",{className:"flex items-center justify-end gap-0.5",children:[j()&&e.jsxs(e.Fragment,{children:[e.jsx(t,{variant:n==="preview"?"primary":"ghost",size:"sm",onClick:()=>i("preview"),className:"h-5 px-0.5 text-xs",title:r("artifacts.previewMode"),children:e.jsx(w,{className:"h-2.5 w-2.5"})}),e.jsx(t,{variant:n==="code"?"primary":"ghost",size:"sm",onClick:()=>i("code"),className:"h-5 px-0.5 text-xs",title:r("artifacts.codeMode"),children:e.jsx(k,{className:"h-2.5 w-2.5"})}),e.jsx("div",{className:"w-px h-2 bg-gray-300 dark:bg-gray-600 ophelia:bg-[#262626] mx-0.5"})]}),e.jsx(t,{variant:"ghost",size:"sm",onClick:()=>p(s.content),className:"h-5 w-5 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212] touch-manipulation",title:r("artifacts.copyContent"),children:h?e.jsx(f,{className:"h-2.5 w-2.5 text-green-500"}):e.jsx(N,{className:"h-2.5 w-2.5"})}),e.jsx(t,{variant:"ghost",size:"sm",onClick:u,className:"h-5 w-5 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212] touch-manipulation",title:r("artifacts.download"),children:e.jsx(C,{className:"h-2.5 w-2.5"})}),e.jsx(t,{variant:"ghost",size:"sm",onClick:()=>g(s),className:"h-5 w-5 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212] touch-manipulation border border-gray-200 dark:border-dark-300 ophelia:border-[#262626] hover:border-gray-300 dark:hover:border-dark-400 ophelia:hover:border-[#3f3f46]",title:r("artifacts.openInPanel"),children:e.jsx(z,{className:"h-2.5 w-2.5"})})]})]}),e.jsxs("div",{className:"hidden sm:flex items-center justify-between gap-2",children:[e.jsxs("div",{className:"flex items-center gap-3 min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0 flex-1",children:[e.jsx("div",{className:"flex-shrink-0",children:b()}),e.jsx("h3",{className:"font-semibold text-gray-900 dark:text-gray-100 ophelia:text-[#fafafa] truncate",children:s.title})]}),e.jsx("span",{className:"text-xs bg-primary-50 dark:bg-primary-900/20 ophelia:bg-[rgba(147,51,234,0.2)] text-primary-700 dark:text-primary-300 ophelia:text-[#c084fc] px-2 py-1 rounded-full font-medium flex-shrink-0",children:s.type.toUpperCase()})]}),e.jsxs("div",{className:"flex items-center gap-1 flex-shrink-0",children:[j()&&e.jsxs(e.Fragment,{children:[e.jsxs(t,{variant:n==="preview"?"primary":"ghost",size:"sm",onClick:()=>i("preview"),className:"h-8 px-3 text-xs",title:r("artifacts.previewMode"),children:[e.jsx(w,{className:"h-3 w-3 mr-1"}),r("artifacts.preview")]}),e.jsxs(t,{variant:n==="code"?"primary":"ghost",size:"sm",onClick:()=>i("code"),className:"h-8 px-3 text-xs",title:r("artifacts.codeMode"),children:[e.jsx(k,{className:"h-3 w-3 mr-1"}),r("artifacts.code")]}),e.jsx("div",{className:"w-px h-4 bg-gray-300 dark:bg-gray-600 ophelia:bg-[#262626] mx-1"})]}),e.jsx(t,{variant:"ghost",size:"sm",onClick:()=>p(s.content),className:"h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212]",title:r("artifacts.copyContent"),children:h?e.jsx(f,{className:"h-4 w-4 text-green-500"}):e.jsx(N,{className:"h-4 w-4"})}),e.jsx(t,{variant:"ghost",size:"sm",onClick:u,className:"h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212]",title:r("artifacts.download"),children:e.jsx(C,{className:"h-4 w-4"})}),e.jsx(t,{variant:"ghost",size:"sm",onClick:()=>g(s),className:"h-8 w-8 p-0 hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212]",title:r("artifacts.openInPanel"),children:e.jsx(z,{className:"h-4 w-4"})})]})]})]}),e.jsxs("div",{className:"p-4 flex-1 overflow-hidden min-h-0",children:[s.description&&e.jsx("p",{className:"text-sm text-gray-600 dark:text-gray-400 ophelia:text-[#a3a3a3] mb-4",children:s.description}),e.jsx("div",{className:"h-full overflow-auto",children:_()})]}),e.jsxs("div",{className:"flex items-center justify-between p-3 border-t border-gray-100 dark:border-dark-200 ophelia:border-[#1a1a1a] bg-gray-50 dark:bg-dark-100/50 ophelia:bg-[#0a0a0a] flex-shrink-0",children:[e.jsxs("div",{className:"text-xs text-gray-500 dark:text-gray-400 ophelia:text-[#737373]",children:[r("artifacts.created"),":"," ",new Date(s.createdAt).toLocaleString()]}),(s.type==="html"||s.type==="react")&&e.jsxs(t,{variant:"ghost",size:"sm",onClick:()=>{const a=window.open("","_blank");a&&(a.document.write(s.content),a.document.close())},className:"text-xs hover:bg-gray-100 dark:hover:bg-dark-200 ophelia:hover:bg-[#121212] ophelia:text-[#a3a3a3]",children:[e.jsx(J,{className:"h-3 w-3 mr-1"}),r("artifacts.openInNewWindow")]})]})]})},V=({artifacts:s,className:d})=>!s||s.length===0?null:e.jsx("div",{className:R("space-y-3",d),children:s.map(r=>e.jsx(P,{artifact:r},r.id))});export{V as A};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./markdown-vendor-QwEm2Xso.js";import{r as d}from"./router-vendor-CmbUVdlE.js";import{A as c}from"./ArtifactContainer-
|
|
1
|
+
import{j as e}from"./markdown-vendor-QwEm2Xso.js";import{r as d}from"./router-vendor-CmbUVdlE.js";import{A as c}from"./ArtifactContainer-CR_N0zJa.js";import{B as l}from"../assets/index-BHPEXBOC.js";import"./ui-vendor-BxYipEVo.js";import"./utils-vendor-0Ymd3GFQ.js";const i=[{id:"demo-html-1",type:"html",title:"Interactive Button Demo",description:"A simple HTML page with interactive elements",content:`<div style="text-align: center; padding: 20px;">
|
|
2
2
|
<h1 style="color: #333; font-family: Arial, sans-serif;">Welcome to Libre WebUI!</h1>
|
|
3
3
|
<p style="color: #666; font-size: 16px;">This is an interactive HTML artifact.</p>
|
|
4
4
|
<button
|