libre-webui 0.13.0 → 0.13.1
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/backend/package.json +1 -1
- package/frontend/dist/assets/{index-pmlsmnQ4.js → index-6X4Fay3z.js} +3 -3
- package/frontend/dist/index.html +2 -2
- package/frontend/dist/js/{ArtifactContainer-DYmgznWk.js → ArtifactContainer-lBT2Cf0m.js} +1 -1
- package/frontend/dist/js/{ArtifactDemoPage-D9cUJCUT.js → ArtifactDemoPage-622qBoTt.js} +1 -1
- package/frontend/dist/js/{ArtifactSlideOutPanel-DlS_laML.js → ArtifactSlideOutPanel-CfbbHcaI.js} +1 -1
- package/frontend/dist/js/{ChatPage-CQ0V4ote.js → ChatPage-DGqHo1eh.js} +1 -1
- package/frontend/dist/js/{FirstTimeSetup-BO1IPnfI.js → FirstTimeSetup-BDCojgfX.js} +1 -1
- package/frontend/dist/js/{GalleryPage-B2hhzIun.js → GalleryPage-DWjvQFPR.js} +1 -1
- package/frontend/dist/js/{LibreClawPage-Bs8vK_yo.js → LibreClawPage-BQ5dN-0J.js} +1 -1
- package/frontend/dist/js/{ModelManagerModals-CSGR9o2J.js → ModelManagerModals-BECfRnGl.js} +1 -1
- package/frontend/dist/js/{ModelsPage-CpVM6Qhl.js → ModelsPage-Ccmog6B5.js} +2 -2
- package/frontend/dist/js/{PersonasPage-CwqOhNVH.js → PersonasPage-DvTDH2Fy.js} +1 -1
- package/frontend/dist/js/{RichMessageContent-DH5WM9fX.js → RichMessageContent-CBR2ML5W.js} +1 -1
- package/frontend/dist/js/{SettingsModal-DzkKC4ks.js → SettingsModal-CV9iz6Lk.js} +1 -1
- package/frontend/dist/js/{UserManagementPage-C0bC1w1D.js → UserManagementPage-k1mBGCDH.js} +1 -1
- package/frontend/dist/js/{api-D9FuobIF.js → api-Ddawdcbi.js} +2 -2
- package/frontend/dist/js/{useBaseQuery-D0MMQYNQ.js → useBaseQuery-5VtX6QMw.js} +1 -1
- package/frontend/dist/js/useQuery-CXwvr2_e.js +1 -0
- package/package.json +5 -4
- package/scripts/postinstall.js +54 -0
- package/frontend/dist/js/useQuery-B2OUd39C.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{d as t,f as n}from"./markdown-core-fkbHPd-g.js";import{$ as r,J as i,Q as a,Y as o,at as s,ct as c,dt as l,et as u,ft as d,ht as f,it as p,lt as m,mt as h,nt as g,ot as _,pt as v,q as y,rt as b,st as x,tt as S,ut as C}from"../assets/index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{d as t,f as n}from"./markdown-core-fkbHPd-g.js";import{$ as r,J as i,Q as a,Y as o,at as s,ct as c,dt as l,et as u,ft as d,ht as f,it as p,lt as m,mt as h,nt as g,ot as _,pt as v,q as y,rt as b,st as x,tt as S,ut as C}from"../assets/index-6X4Fay3z.js";var w,T,E,D,O,k,A,j,M,N,P,F,I,L,R,z,ee=(w=new WeakMap,T=new WeakMap,E=new WeakMap,D=new WeakMap,O=new WeakMap,k=new WeakMap,A=new WeakMap,j=new WeakMap,M=new WeakMap,N=new WeakMap,P=new WeakMap,F=new WeakMap,I=new WeakMap,L=new WeakMap,R=new WeakMap,z=new WeakSet,class extends S{constructor(e,t){super(),o(this,z),f(this,w,void 0),f(this,T,void 0),f(this,E,void 0),f(this,D,void 0),f(this,O,void 0),f(this,k,void 0),f(this,A,void 0),f(this,j,void 0),f(this,M,void 0),f(this,N,void 0),f(this,P,void 0),f(this,F,void 0),f(this,I,void 0),f(this,L,void 0),f(this,R,new Set),this.options=t,d(w,this,e),d(j,this,null),d(A,this,a()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(v(T,this).addObserver(this),J(v(T,this),this.options)?h(z,this,B).call(this):this.updateResult(),h(z,this,W).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Y(v(T,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Y(v(T,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,h(z,this,G).call(this),h(z,this,K).call(this),v(T,this).removeObserver(this)}setOptions(e){let t=this.options,n=v(T,this);if(this.options=v(w,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof _(this.options.enabled,v(T,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);h(z,this,q).call(this),v(T,this).setOptions(this.options),t._defaulted&&!c(this.options,t)&&v(w,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:v(T,this),observer:this});let r=this.hasListeners();r&&X(v(T,this),n,this.options,t)&&h(z,this,B).call(this),this.updateResult(),r&&(v(T,this)!==n||_(this.options.enabled,v(T,this))!==_(t.enabled,v(T,this))||x(this.options.staleTime,v(T,this))!==x(t.staleTime,v(T,this)))&&h(z,this,V).call(this);let i=h(z,this,H).call(this);r&&(v(T,this)!==n||_(this.options.enabled,v(T,this))!==_(t.enabled,v(T,this))||i!==v(L,this))&&h(z,this,U).call(this,i)}getOptimisticResult(e){let t=v(w,this).getQueryCache().build(v(w,this),e),n=this.createResult(t,e);return re(this,n)&&(d(D,this,n),d(k,this,this.options),d(O,this,v(T,this).state)),n}getCurrentResult(){return v(D,this)}trackResult(e,t){return new Proxy(e,{get:(e,n)=>(this.trackProp(n),t?.(n),n===`promise`&&(this.trackProp(`data`),!this.options.experimental_prefetchInRender&&v(A,this).status===`pending`&&v(A,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){v(R,this).add(e)}getCurrentQuery(){return v(T,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=v(w,this).defaultQueryOptions(e),n=v(w,this).getQueryCache().build(v(w,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return h(z,this,B).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),v(D,this)))}createResult(e,t){let n=v(T,this),r=this.options,o=v(D,this),c=v(O,this),l=v(k,this),u=e===n?v(E,this):e.state,{state:f}=e,p={...f},m=!1,h;if(t._optimisticResults){let a=this.hasListeners(),o=!a&&J(e,t),s=a&&X(e,n,t,r);(o||s)&&(p={...p,...i(f.data,e.options)}),t._optimisticResults===`isRestoring`&&(p.fetchStatus=`idle`)}let{error:g,errorUpdatedAt:y,status:b}=p;h=p.data;let x=!1;if(t.placeholderData!==void 0&&h===void 0&&b===`pending`){let e;o?.isPlaceholderData&&t.placeholderData===l?.placeholderData?(e=o.data,x=!0):e=typeof t.placeholderData==`function`?t.placeholderData(v(P,this)?.state.data,v(P,this)):t.placeholderData,e!==void 0&&(b=`success`,h=s(o?.data,e,t),m=!0)}if(t.select&&h!==void 0&&!x)if(o&&h===c?.data&&t.select===v(M,this))h=v(N,this);else try{d(M,this,t.select),h=t.select(h),h=s(o?.data,h,t),d(N,this,h),d(j,this,null)}catch(e){d(j,this,e)}v(j,this)&&(g=v(j,this),h=v(N,this),y=Date.now(),b=`error`);let S=p.fetchStatus===`fetching`,C=b===`pending`,w=b===`error`,F=C&&S,I=h!==void 0,L={status:b,fetchStatus:p.fetchStatus,isPending:C,isSuccess:b===`success`,isError:w,isInitialLoading:F,isLoading:F,data:h,dataUpdatedAt:p.dataUpdatedAt,error:g,errorUpdatedAt:y,failureCount:p.fetchFailureCount,failureReason:p.fetchFailureReason,errorUpdateCount:p.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:p.dataUpdateCount>u.dataUpdateCount||p.errorUpdateCount>u.errorUpdateCount,isFetching:S,isRefetching:S&&!C,isLoadingError:w&&!I,isPaused:p.fetchStatus===`paused`,isPlaceholderData:m,isRefetchError:w&&I,isStale:Z(e,t),refetch:this.refetch,promise:v(A,this),isEnabled:_(t.enabled,e)!==!1};if(this.options.experimental_prefetchInRender){let t=L.data!==void 0,r=L.status===`error`&&!t,i=e=>{r?e.reject(L.error):t&&e.resolve(L.data)},o=()=>{i(d(A,this,L.promise=a()))},s=v(A,this);switch(s.status){case`pending`:e.queryHash===n.queryHash&&i(s);break;case`fulfilled`:(r||L.data!==s.value)&&o();break;case`rejected`:(!r||L.error!==s.reason)&&o();break}}return L}updateResult(){let e=v(D,this),t=this.createResult(v(T,this),this.options);d(O,this,v(T,this).state),d(k,this,this.options),v(O,this).data!==void 0&&d(P,this,v(T,this)),!c(t,e)&&(d(D,this,t),h(z,this,te).call(this,{listeners:(()=>{if(!e)return!0;let{notifyOnChangeProps:t}=this.options,n=typeof t==`function`?t():t;if(n===`all`||!n&&!v(R,this).size)return!0;let r=new Set(n??v(R,this));return this.options.throwOnError&&r.add(`error`),Object.keys(v(D,this)).some(t=>{let n=t;return v(D,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&h(z,this,W).call(this)}});function B(e){h(z,this,q).call(this);let t=v(T,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(p)),t}function V(){h(z,this,G).call(this);let e=x(this.options.staleTime,v(T,this));if(g.isServer()||v(D,this).isStale||!b(e))return;let t=C(v(D,this).dataUpdatedAt,e)+1;d(F,this,l.setTimeout(()=>{v(D,this).isStale||this.updateResult()},t))}function H(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(v(T,this)):this.options.refetchInterval)??!1}function U(e){h(z,this,K).call(this),d(L,this,e),!(g.isServer()||_(this.options.enabled,v(T,this))===!1||!b(v(L,this))||v(L,this)===0)&&d(I,this,l.setInterval(()=>{(this.options.refetchIntervalInBackground||u.isFocused())&&h(z,this,B).call(this)},v(L,this)))}function W(){h(z,this,V).call(this),h(z,this,U).call(this,h(z,this,H).call(this))}function G(){v(F,this)!==void 0&&(l.clearTimeout(v(F,this)),d(F,this,void 0))}function K(){v(I,this)!==void 0&&(l.clearInterval(v(I,this)),d(I,this,void 0))}function q(){let e=v(w,this).getQueryCache().build(v(w,this),this.options);if(e===v(T,this))return;let t=v(T,this);d(T,this,e),d(E,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function te(e){r.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(v(D,this))}),v(w,this).getQueryCache().notify({query:v(T,this),type:`observerResultsUpdated`})})}function ne(e,t){return _(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&_(t.retryOnMount,e)===!1)}function J(e,t){return ne(e,t)||e.state.data!==void 0&&Y(e,t,t.refetchOnMount)}function Y(e,t,n){if(_(t.enabled,e)!==!1&&x(t.staleTime,e)!==`static`){let r=typeof n==`function`?n(e):n;return r===`always`||r!==!1&&Z(e,t)}return!1}function X(e,t,n,r){return(e!==t||_(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Z(e,n)}function Z(e,t){return _(t.enabled,e)!==!1&&e.isStaleByTime(x(t.staleTime,e))}function re(e,t){return!c(e.getCurrentResult(),t)}var Q=e(n(),1);t();function ie(){let e=!1;return{clearReset:()=>{e=!1},reset:()=>{e=!0},isReset:()=>e}}var ae=Q.createContext(ie()),oe=()=>Q.useContext(ae),se=(e,t,n)=>{let r=n?.state.error&&typeof e.throwOnError==`function`?m(e.throwOnError,[n.state.error,n]):e.throwOnError;(e.suspense||e.experimental_prefetchInRender||r)&&(t.isReset()||(e.retryOnMount=!1))},ce=e=>{Q.useEffect(()=>{e.clearReset()},[e])},le=({result:e,errorResetBoundary:t,throwOnError:n,query:r,suspense:i})=>e.isError&&!t.isReset()&&!e.isFetching&&r&&(i&&e.data===void 0||m(n,[e.error,r])),$=Q.createContext(!1),ue=()=>Q.useContext($);$.Provider;var de=e=>{if(e.suspense){let t=1e3,n=e=>e===`static`?e:Math.max(e??t,t),r=e.staleTime;e.staleTime=typeof r==`function`?(...e)=>n(r(...e)):n(r),typeof e.gcTime==`number`&&(e.gcTime=Math.max(e.gcTime,t))}},fe=(e,t)=>e.isLoading&&e.isFetching&&!t,pe=(e,t)=>e?.suspense&&t.isPending,me=(e,t,n)=>t.fetchOptimistic(e).catch(()=>{n.clearReset()});function he(e,t,n){let i=ue(),a=oe(),o=y(n),s=o.defaultQueryOptions(e);o.getDefaultOptions().queries?._experimental_beforeQuery?.(s);let c=o.getQueryCache().get(s.queryHash),l=e.subscribed!==!1;s._optimisticResults=i?`isRestoring`:l?`optimistic`:void 0,de(s),se(s,a,c),ce(a);let u=!o.getQueryCache().get(s.queryHash),[d]=Q.useState(()=>new t(o,s)),f=d.getOptimisticResult(s),m=!i&&l;if(Q.useSyncExternalStore(Q.useCallback(e=>{let t=m?d.subscribe(r.batchCalls(e)):p;return d.updateResult(),t},[d,m]),()=>d.getCurrentResult(),()=>d.getCurrentResult()),Q.useEffect(()=>{d.setOptions(s)},[s,d]),pe(s,f))throw me(s,d,a);if(le({result:f,errorResetBoundary:a,throwOnError:s.throwOnError,query:c,suspense:s.suspense}))throw f.error;return o.getDefaultOptions().queries?._experimental_afterQuery?.(s,f),s.experimental_prefetchInRender&&!g.isServer()&&fe(f,i)&&(u?me(s,d,a):c?.promise)?.catch(p).finally(()=>{d.updateResult()}),s.notifyOnChangeProps?f:d.trackResult(f)}export{ee as n,he as t};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{n as e,t}from"./useBaseQuery-5VtX6QMw.js";function n(n,r){return t(n,e,r)}export{n as t};
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "libre-webui",
|
|
3
|
-
"version": "0.13.
|
|
3
|
+
"version": "0.13.1",
|
|
4
4
|
"description": "Privacy-first AI chat interface. Self-hosted, open source, extensible.",
|
|
5
5
|
"main": "electron/main.js",
|
|
6
6
|
"bin": {
|
|
7
|
-
"libre-webui": "
|
|
7
|
+
"libre-webui": "bin/cli.js"
|
|
8
8
|
},
|
|
9
9
|
"files": [
|
|
10
10
|
"bin",
|
|
@@ -12,6 +12,7 @@
|
|
|
12
12
|
"backend/dist",
|
|
13
13
|
"frontend/dist",
|
|
14
14
|
"plugins/*.json",
|
|
15
|
+
"scripts/postinstall.js",
|
|
15
16
|
"README.md",
|
|
16
17
|
"LICENSE"
|
|
17
18
|
],
|
|
@@ -27,7 +28,7 @@
|
|
|
27
28
|
"build": "npm run build:frontend && npm run build:backend",
|
|
28
29
|
"build:frontend": "cd frontend && npm run build",
|
|
29
30
|
"build:backend": "cd backend && npm run build",
|
|
30
|
-
"test:package": "npm run build && node --test scripts/test-chat-context.mjs && node --test scripts/test-package-layout.mjs && node --test scripts/test-release-notes.mjs",
|
|
31
|
+
"test:package": "npm run build && node --test scripts/test-chat-context.mjs && node --test scripts/test-package-layout.mjs && node --test scripts/test-release-notes.mjs && node --test scripts/test-release-status.mjs && node --test scripts/test-docker-layout.mjs",
|
|
31
32
|
"test:e2e": "npm run e2e --workspace=frontend",
|
|
32
33
|
"security:audit": "npm audit --audit-level=moderate",
|
|
33
34
|
"release:check": "npm run format:check && npm run lint && npm run security:audit && npm run test:package && npm run npm:publish:dry-run",
|
|
@@ -43,7 +44,7 @@
|
|
|
43
44
|
"lint:fix:frontend": "cd frontend && npm run lint:fix",
|
|
44
45
|
"lint:fix:backend": "cd backend && npm run lint:fix",
|
|
45
46
|
"setup-hooks": "git config core.hooksPath .githooks && git config commit.template .gitmessage",
|
|
46
|
-
"postinstall": "
|
|
47
|
+
"postinstall": "node scripts/postinstall.js",
|
|
47
48
|
"release": "node scripts/release.js",
|
|
48
49
|
"release:patch": "node scripts/release.js patch",
|
|
49
50
|
"release:minor": "node scripts/release.js minor",
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Libre WebUI
|
|
3
|
+
* Copyright (C) 2025 Kroonen AI, Inc.
|
|
4
|
+
*
|
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
6
|
+
* you may not use this file except in compliance with the License.
|
|
7
|
+
* You may obtain a copy of the License at:
|
|
8
|
+
*
|
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
|
10
|
+
*
|
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
14
|
+
* See the License for the specific language governing permissions and
|
|
15
|
+
* limitations under the License.
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const { spawnSync } = require('child_process');
|
|
19
|
+
const fs = require('fs');
|
|
20
|
+
const path = require('path');
|
|
21
|
+
|
|
22
|
+
const projectRoot = path.resolve(__dirname, '..');
|
|
23
|
+
|
|
24
|
+
function runNpm(args, stdio = 'ignore') {
|
|
25
|
+
const npmExecPath = process.env.npm_execpath;
|
|
26
|
+
|
|
27
|
+
if (npmExecPath) {
|
|
28
|
+
return spawnSync(process.execPath, [npmExecPath, ...args], {
|
|
29
|
+
cwd: projectRoot,
|
|
30
|
+
stdio,
|
|
31
|
+
});
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
return spawnSync(process.platform === 'win32' ? 'npm.cmd' : 'npm', args, {
|
|
35
|
+
cwd: projectRoot,
|
|
36
|
+
shell: process.platform === 'win32',
|
|
37
|
+
stdio,
|
|
38
|
+
});
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
const workspaceRebuild = runNpm([
|
|
42
|
+
'rebuild',
|
|
43
|
+
'better-sqlite3',
|
|
44
|
+
'--workspace=backend',
|
|
45
|
+
]);
|
|
46
|
+
|
|
47
|
+
if (workspaceRebuild.status !== 0) {
|
|
48
|
+
runNpm(['rebuild', 'better-sqlite3']);
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Repository hooks are only relevant for a source checkout, not an npm install.
|
|
52
|
+
if (fs.existsSync(path.join(projectRoot, '.git'))) {
|
|
53
|
+
runNpm(['run', 'setup-hooks'], 'inherit');
|
|
54
|
+
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{n as e,t}from"./useBaseQuery-D0MMQYNQ.js";function n(n,r){return t(n,e,r)}export{n as t};
|