libre-webui 0.14.0 → 0.14.2

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.
Files changed (38) hide show
  1. package/README.md +1 -1
  2. package/backend/dist/services/pluginService.d.ts +1 -2
  3. package/backend/dist/services/pluginService.d.ts.map +1 -1
  4. package/backend/dist/services/pluginService.js +31 -52
  5. package/backend/dist/services/pluginService.js.map +1 -1
  6. package/backend/dist/utils/pluginChatAdapter.d.ts.map +1 -1
  7. package/backend/dist/utils/pluginChatAdapter.js +23 -2
  8. package/backend/dist/utils/pluginChatAdapter.js.map +1 -1
  9. package/backend/dist/utils/pluginStreamAdapter.d.ts +1 -0
  10. package/backend/dist/utils/pluginStreamAdapter.d.ts.map +1 -1
  11. package/backend/dist/utils/pluginStreamAdapter.js +119 -0
  12. package/backend/dist/utils/pluginStreamAdapter.js.map +1 -1
  13. package/backend/dist/utils/pluginValidation.d.ts +2 -0
  14. package/backend/dist/utils/pluginValidation.d.ts.map +1 -1
  15. package/backend/dist/utils/pluginValidation.js +39 -0
  16. package/backend/dist/utils/pluginValidation.js.map +1 -1
  17. package/backend/package.json +1 -1
  18. package/frontend/dist/assets/{index-Cp8PdlFo.js → index-CDvTfv-t.js} +3 -3
  19. package/frontend/dist/index.html +2 -2
  20. package/frontend/dist/js/{ArtifactContainer-Blx2e3aj.js → ArtifactContainer-RPQq1DRo.js} +1 -1
  21. package/frontend/dist/js/{ArtifactDemoPage-ChIM17kG.js → ArtifactDemoPage-Dd0Rbl3N.js} +1 -1
  22. package/frontend/dist/js/{ArtifactSlideOutPanel-BypEW58A.js → ArtifactSlideOutPanel-oA5Iy8Nc.js} +1 -1
  23. package/frontend/dist/js/{ChatPage-gNqQdhRe.js → ChatPage-DdLe5r1n.js} +1 -1
  24. package/frontend/dist/js/{FirstTimeSetup-DS5-kf4m.js → FirstTimeSetup-DL_WZABT.js} +1 -1
  25. package/frontend/dist/js/{GalleryPage-vdXO-QSc.js → GalleryPage-BTA5LAmZ.js} +1 -1
  26. package/frontend/dist/js/{LibreClawPage-CA7LgGj7.js → LibreClawPage-CuQ8tJUW.js} +1 -1
  27. package/frontend/dist/js/{ModelsPage-Bxig1vZN.js → ModelsPage-BVfl9FU_.js} +1 -1
  28. package/frontend/dist/js/{PersonasPage-BMm3MuVw.js → PersonasPage-wP36Pd7I.js} +1 -1
  29. package/frontend/dist/js/{RichMessageContent-COEmecOd.js → RichMessageContent-CdgQHk6Q.js} +1 -1
  30. package/frontend/dist/js/{SettingsModal-DvFcpdVU.js → SettingsModal-CLdxDdQV.js} +1 -1
  31. package/frontend/dist/js/{UserManagementPage-C6ZvMO_V.js → UserManagementPage-BwnBtNj1.js} +1 -1
  32. package/frontend/dist/js/{api-BNnUZaFX.js → api-BRz6cQiD.js} +2 -2
  33. package/frontend/dist/js/{useBaseQuery-EKJwyGqK.js → useBaseQuery-C8AWX-Cq.js} +1 -1
  34. package/frontend/dist/js/useQuery-CbYbdhch.js +1 -0
  35. package/package.json +8 -5
  36. package/plugins/anthropic.json +6 -24
  37. package/plugins/kimi-code.json +73 -0
  38. package/frontend/dist/js/useQuery-CCuhLVjf.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,G as i,J as a,Q as o,U as s,W as c,X as l,Y as u,Z as d,at as f,ct as p,dt as m,et as h,it as g,lt as _,nt as v,ot as y,rt as b,st as x,tt as S,ut as C}from"../assets/index-Cp8PdlFo.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 d{constructor(e,t){super(),i(this,z),m(this,w,void 0),m(this,T,void 0),m(this,E,void 0),m(this,D,void 0),m(this,O,void 0),m(this,k,void 0),m(this,A,void 0),m(this,j,void 0),m(this,M,void 0),m(this,N,void 0),m(this,P,void 0),m(this,F,void 0),m(this,I,void 0),m(this,L,void 0),m(this,R,new Set),this.options=t,p(w,this,e),p(j,this,null),p(A,this,a()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(T,this).addObserver(this),J(_(T,this),this.options)?C(z,this,B).call(this):this.updateResult(),C(z,this,W).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Y(_(T,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Y(_(T,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,C(z,this,G).call(this),C(z,this,K).call(this),_(T,this).removeObserver(this)}setOptions(e){let t=this.options,n=_(T,this);if(this.options=_(w,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof v(this.options.enabled,_(T,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);C(z,this,q).call(this),_(T,this).setOptions(this.options),t._defaulted&&!g(this.options,t)&&_(w,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:_(T,this),observer:this});let r=this.hasListeners();r&&X(_(T,this),n,this.options,t)&&C(z,this,B).call(this),this.updateResult(),r&&(_(T,this)!==n||v(this.options.enabled,_(T,this))!==v(t.enabled,_(T,this))||b(this.options.staleTime,_(T,this))!==b(t.staleTime,_(T,this)))&&C(z,this,V).call(this);let i=C(z,this,H).call(this);r&&(_(T,this)!==n||v(this.options.enabled,_(T,this))!==v(t.enabled,_(T,this))||i!==_(L,this))&&C(z,this,U).call(this,i)}getOptimisticResult(e){let t=_(w,this).getQueryCache().build(_(w,this),e),n=this.createResult(t,e);return re(this,n)&&(p(D,this,n),p(k,this,this.options),p(O,this,_(T,this).state)),n}getCurrentResult(){return _(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&&_(A,this).status===`pending`&&_(A,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){_(R,this).add(e)}getCurrentQuery(){return _(T,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=_(w,this).defaultQueryOptions(e),n=_(w,this).getQueryCache().build(_(w,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return C(z,this,B).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),_(D,this)))}createResult(e,t){let n=_(T,this),r=this.options,i=_(D,this),o=_(O,this),s=_(k,this),l=e===n?_(E,this):e.state,{state:u}=e,d={...u},f=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&J(e,t),o=i&&X(e,n,t,r);(a||o)&&(d={...d,...c(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:g,status:y}=d;m=d.data;let b=!1;if(t.placeholderData!==void 0&&m===void 0&&y===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=i.data,b=!0):e=typeof t.placeholderData==`function`?t.placeholderData(_(P,this)?.state.data,_(P,this)):t.placeholderData,e!==void 0&&(y=`success`,m=S(i?.data,e,t),f=!0)}if(t.select&&m!==void 0&&!b)if(i&&m===o?.data&&t.select===_(M,this))m=_(N,this);else try{p(M,this,t.select),m=t.select(m),m=S(i?.data,m,t),p(N,this,m),p(j,this,null)}catch(e){p(j,this,e)}_(j,this)&&(h=_(j,this),m=_(N,this),g=Date.now(),y=`error`);let x=d.fetchStatus===`fetching`,C=y===`pending`,w=y===`error`,F=C&&x,I=m!==void 0,L={status:y,fetchStatus:d.fetchStatus,isPending:C,isSuccess:y===`success`,isError:w,isInitialLoading:F,isLoading:F,data:m,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!C,isLoadingError:w&&!I,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:w&&I,isStale:Z(e,t),refetch:this.refetch,promise:_(A,this),isEnabled:v(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(p(A,this,L.promise=a()))},s=_(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=_(D,this),t=this.createResult(_(T,this),this.options);p(O,this,_(T,this).state),p(k,this,this.options),_(O,this).data!==void 0&&p(P,this,_(T,this)),!g(t,e)&&(p(D,this,t),C(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&&!_(R,this).size)return!0;let r=new Set(n??_(R,this));return this.options.throwOnError&&r.add(`error`),Object.keys(_(D,this)).some(t=>{let n=t;return _(D,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&C(z,this,W).call(this)}});function B(e){C(z,this,q).call(this);let t=_(T,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}function V(){C(z,this,G).call(this);let e=b(this.options.staleTime,_(T,this));if(o.isServer()||_(D,this).isStale||!r(e))return;let t=y(_(D,this).dataUpdatedAt,e)+1;p(F,this,x.setTimeout(()=>{_(D,this).isStale||this.updateResult()},t))}function H(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(_(T,this)):this.options.refetchInterval)??!1}function U(e){C(z,this,K).call(this),p(L,this,e),!(o.isServer()||v(this.options.enabled,_(T,this))===!1||!r(_(L,this))||_(L,this)===0)&&p(I,this,x.setInterval(()=>{(this.options.refetchIntervalInBackground||l.isFocused())&&C(z,this,B).call(this)},_(L,this)))}function W(){C(z,this,V).call(this),C(z,this,U).call(this,C(z,this,H).call(this))}function G(){_(F,this)!==void 0&&(x.clearTimeout(_(F,this)),p(F,this,void 0))}function K(){_(I,this)!==void 0&&(x.clearInterval(_(I,this)),p(I,this,void 0))}function q(){let e=_(w,this).getQueryCache().build(_(w,this),this.options);if(e===_(T,this))return;let t=_(T,this);p(T,this,e),p(E,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function te(e){u.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(_(D,this))}),_(w,this).getQueryCache().notify({query:_(T,this),type:`observerResultsUpdated`})})}function ne(e,t){return v(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&v(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(v(t.enabled,e)!==!1&&b(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||v(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Z(e,n)}function Z(e,t){return v(t.enabled,e)!==!1&&e.isStaleByTime(b(t.staleTime,e))}function re(e,t){return!g(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`?f(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||f(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 r=ue(),i=oe(),a=s(n),c=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let l=a.getQueryCache().get(c.queryHash),d=e.subscribed!==!1;c._optimisticResults=r?`isRestoring`:d?`optimistic`:void 0,de(c),se(c,i,l),ce(i);let f=!a.getQueryCache().get(c.queryHash),[p]=Q.useState(()=>new t(a,c)),m=p.getOptimisticResult(c),g=!r&&d;if(Q.useSyncExternalStore(Q.useCallback(e=>{let t=g?p.subscribe(u.batchCalls(e)):h;return p.updateResult(),t},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),Q.useEffect(()=>{p.setOptions(c)},[c,p]),pe(c,m))throw me(c,p,i);if(le({result:m,errorResetBoundary:i,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!o.isServer()&&fe(m,r)&&(f?me(c,p,i):l?.promise)?.catch(h).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?m:p.trackResult(m)}export{ee as n,he as t};
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,G as i,J as a,Q as o,U as s,W as c,X as l,Y as u,Z as d,at as f,ct as p,dt as m,et as h,it as g,lt as _,nt as v,ot as y,rt as b,st as x,tt as S,ut as C}from"../assets/index-CDvTfv-t.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 d{constructor(e,t){super(),i(this,z),m(this,w,void 0),m(this,T,void 0),m(this,E,void 0),m(this,D,void 0),m(this,O,void 0),m(this,k,void 0),m(this,A,void 0),m(this,j,void 0),m(this,M,void 0),m(this,N,void 0),m(this,P,void 0),m(this,F,void 0),m(this,I,void 0),m(this,L,void 0),m(this,R,new Set),this.options=t,p(w,this,e),p(j,this,null),p(A,this,a()),this.bindMethods(),this.setOptions(t)}bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(_(T,this).addObserver(this),J(_(T,this),this.options)?C(z,this,B).call(this):this.updateResult(),C(z,this,W).call(this))}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return Y(_(T,this),this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return Y(_(T,this),this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,C(z,this,G).call(this),C(z,this,K).call(this),_(T,this).removeObserver(this)}setOptions(e){let t=this.options,n=_(T,this);if(this.options=_(w,this).defaultQueryOptions(e),this.options.enabled!==void 0&&typeof this.options.enabled!=`boolean`&&typeof this.options.enabled!=`function`&&typeof v(this.options.enabled,_(T,this))!=`boolean`)throw Error(`Expected enabled to be a boolean or a callback that returns a boolean`);C(z,this,q).call(this),_(T,this).setOptions(this.options),t._defaulted&&!g(this.options,t)&&_(w,this).getQueryCache().notify({type:`observerOptionsUpdated`,query:_(T,this),observer:this});let r=this.hasListeners();r&&X(_(T,this),n,this.options,t)&&C(z,this,B).call(this),this.updateResult(),r&&(_(T,this)!==n||v(this.options.enabled,_(T,this))!==v(t.enabled,_(T,this))||b(this.options.staleTime,_(T,this))!==b(t.staleTime,_(T,this)))&&C(z,this,V).call(this);let i=C(z,this,H).call(this);r&&(_(T,this)!==n||v(this.options.enabled,_(T,this))!==v(t.enabled,_(T,this))||i!==_(L,this))&&C(z,this,U).call(this,i)}getOptimisticResult(e){let t=_(w,this).getQueryCache().build(_(w,this),e),n=this.createResult(t,e);return re(this,n)&&(p(D,this,n),p(k,this,this.options),p(O,this,_(T,this).state)),n}getCurrentResult(){return _(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&&_(A,this).status===`pending`&&_(A,this).reject(Error(`experimental_prefetchInRender feature flag is not enabled`))),Reflect.get(e,n))})}trackProp(e){_(R,this).add(e)}getCurrentQuery(){return _(T,this)}refetch({...e}={}){return this.fetch({...e})}fetchOptimistic(e){let t=_(w,this).defaultQueryOptions(e),n=_(w,this).getQueryCache().build(_(w,this),t);return n.fetch().then(()=>this.createResult(n,t))}fetch(e){return C(z,this,B).call(this,{...e,cancelRefetch:e.cancelRefetch??!0}).then(()=>(this.updateResult(),_(D,this)))}createResult(e,t){let n=_(T,this),r=this.options,i=_(D,this),o=_(O,this),s=_(k,this),l=e===n?_(E,this):e.state,{state:u}=e,d={...u},f=!1,m;if(t._optimisticResults){let i=this.hasListeners(),a=!i&&J(e,t),o=i&&X(e,n,t,r);(a||o)&&(d={...d,...c(u.data,e.options)}),t._optimisticResults===`isRestoring`&&(d.fetchStatus=`idle`)}let{error:h,errorUpdatedAt:g,status:y}=d;m=d.data;let b=!1;if(t.placeholderData!==void 0&&m===void 0&&y===`pending`){let e;i?.isPlaceholderData&&t.placeholderData===s?.placeholderData?(e=i.data,b=!0):e=typeof t.placeholderData==`function`?t.placeholderData(_(P,this)?.state.data,_(P,this)):t.placeholderData,e!==void 0&&(y=`success`,m=S(i?.data,e,t),f=!0)}if(t.select&&m!==void 0&&!b)if(i&&m===o?.data&&t.select===_(M,this))m=_(N,this);else try{p(M,this,t.select),m=t.select(m),m=S(i?.data,m,t),p(N,this,m),p(j,this,null)}catch(e){p(j,this,e)}_(j,this)&&(h=_(j,this),m=_(N,this),g=Date.now(),y=`error`);let x=d.fetchStatus===`fetching`,C=y===`pending`,w=y===`error`,F=C&&x,I=m!==void 0,L={status:y,fetchStatus:d.fetchStatus,isPending:C,isSuccess:y===`success`,isError:w,isInitialLoading:F,isLoading:F,data:m,dataUpdatedAt:d.dataUpdatedAt,error:h,errorUpdatedAt:g,failureCount:d.fetchFailureCount,failureReason:d.fetchFailureReason,errorUpdateCount:d.errorUpdateCount,isFetched:e.isFetched(),isFetchedAfterMount:d.dataUpdateCount>l.dataUpdateCount||d.errorUpdateCount>l.errorUpdateCount,isFetching:x,isRefetching:x&&!C,isLoadingError:w&&!I,isPaused:d.fetchStatus===`paused`,isPlaceholderData:f,isRefetchError:w&&I,isStale:Z(e,t),refetch:this.refetch,promise:_(A,this),isEnabled:v(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(p(A,this,L.promise=a()))},s=_(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=_(D,this),t=this.createResult(_(T,this),this.options);p(O,this,_(T,this).state),p(k,this,this.options),_(O,this).data!==void 0&&p(P,this,_(T,this)),!g(t,e)&&(p(D,this,t),C(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&&!_(R,this).size)return!0;let r=new Set(n??_(R,this));return this.options.throwOnError&&r.add(`error`),Object.keys(_(D,this)).some(t=>{let n=t;return _(D,this)[n]!==e[n]&&r.has(n)})})()}))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&C(z,this,W).call(this)}});function B(e){C(z,this,q).call(this);let t=_(T,this).fetch(this.options,e);return e?.throwOnError||(t=t.catch(h)),t}function V(){C(z,this,G).call(this);let e=b(this.options.staleTime,_(T,this));if(o.isServer()||_(D,this).isStale||!r(e))return;let t=y(_(D,this).dataUpdatedAt,e)+1;p(F,this,x.setTimeout(()=>{_(D,this).isStale||this.updateResult()},t))}function H(){return(typeof this.options.refetchInterval==`function`?this.options.refetchInterval(_(T,this)):this.options.refetchInterval)??!1}function U(e){C(z,this,K).call(this),p(L,this,e),!(o.isServer()||v(this.options.enabled,_(T,this))===!1||!r(_(L,this))||_(L,this)===0)&&p(I,this,x.setInterval(()=>{(this.options.refetchIntervalInBackground||l.isFocused())&&C(z,this,B).call(this)},_(L,this)))}function W(){C(z,this,V).call(this),C(z,this,U).call(this,C(z,this,H).call(this))}function G(){_(F,this)!==void 0&&(x.clearTimeout(_(F,this)),p(F,this,void 0))}function K(){_(I,this)!==void 0&&(x.clearInterval(_(I,this)),p(I,this,void 0))}function q(){let e=_(w,this).getQueryCache().build(_(w,this),this.options);if(e===_(T,this))return;let t=_(T,this);p(T,this,e),p(E,this,e.state),this.hasListeners()&&(t?.removeObserver(this),e.addObserver(this))}function te(e){u.batch(()=>{e.listeners&&this.listeners.forEach(e=>{e(_(D,this))}),_(w,this).getQueryCache().notify({query:_(T,this),type:`observerResultsUpdated`})})}function ne(e,t){return v(t.enabled,e)!==!1&&e.state.data===void 0&&!(e.state.status===`error`&&v(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(v(t.enabled,e)!==!1&&b(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||v(r.enabled,e)===!1)&&(!n.suspense||e.state.status!==`error`)&&Z(e,n)}function Z(e,t){return v(t.enabled,e)!==!1&&e.isStaleByTime(b(t.staleTime,e))}function re(e,t){return!g(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`?f(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||f(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 r=ue(),i=oe(),a=s(n),c=a.defaultQueryOptions(e);a.getDefaultOptions().queries?._experimental_beforeQuery?.(c);let l=a.getQueryCache().get(c.queryHash),d=e.subscribed!==!1;c._optimisticResults=r?`isRestoring`:d?`optimistic`:void 0,de(c),se(c,i,l),ce(i);let f=!a.getQueryCache().get(c.queryHash),[p]=Q.useState(()=>new t(a,c)),m=p.getOptimisticResult(c),g=!r&&d;if(Q.useSyncExternalStore(Q.useCallback(e=>{let t=g?p.subscribe(u.batchCalls(e)):h;return p.updateResult(),t},[p,g]),()=>p.getCurrentResult(),()=>p.getCurrentResult()),Q.useEffect(()=>{p.setOptions(c)},[c,p]),pe(c,m))throw me(c,p,i);if(le({result:m,errorResetBoundary:i,throwOnError:c.throwOnError,query:l,suspense:c.suspense}))throw m.error;return a.getDefaultOptions().queries?._experimental_afterQuery?.(c,m),c.experimental_prefetchInRender&&!o.isServer()&&fe(m,r)&&(f?me(c,p,i):l?.promise)?.catch(h).finally(()=>{p.updateResult()}),c.notifyOnChangeProps?m:p.trackResult(m)}export{ee as n,he as t};
@@ -0,0 +1 @@
1
+ import{n as e,t}from"./useBaseQuery-C8AWX-Cq.js";function n(n,r){return t(n,e,r)}export{n as t};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "libre-webui",
3
- "version": "0.14.0",
3
+ "version": "0.14.2",
4
4
  "description": "Privacy-first AI chat interface. Self-hosted, open source, extensible.",
5
5
  "main": "electron/main.js",
6
6
  "bin": {
@@ -28,9 +28,9 @@
28
28
  "build": "npm run build:frontend && npm run build:backend",
29
29
  "build:frontend": "cd frontend && npm run build",
30
30
  "build:backend": "cd backend && npm run build",
31
- "test:package": "node --test scripts/test-deprecated-dependencies.mjs && npm run build && node --test scripts/test-chat-context.mjs && node --test scripts/test-tts-routing.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 && node --test scripts/test-electron-macos-signing.mjs",
31
+ "test:package": "node --test scripts/test-deprecated-dependencies.mjs && node --test scripts/test-security-audit.mjs && node --test scripts/test-helm-versioning.mjs && npm run build && node --test scripts/test-chat-context.mjs && node --test scripts/test-tts-routing.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 && node --test scripts/test-electron-macos-signing.mjs && node --test scripts/test-homebrew-publishing.mjs",
32
32
  "test:e2e": "npm run e2e --workspace=frontend",
33
- "security:audit": "npm audit --audit-level=moderate",
33
+ "security:audit": "node scripts/security-audit.mjs",
34
34
  "release:check": "npm run format:check && npm run lint && npm run security:audit && npm run test:package && npm run npm:publish:dry-run",
35
35
  "start": "cd backend && npm start",
36
36
  "install:all": "npm install && cd frontend && npm install && cd ../backend && npm install",
@@ -91,7 +91,10 @@
91
91
  "prismjs": "^1.30.0"
92
92
  }
93
93
  },
94
- "minimatch": ">=10.2.1"
94
+ "minimatch": ">=10.2.1",
95
+ "brace-expansion": "5.0.7",
96
+ "js-yaml": "4.3.0",
97
+ "shell-quote": "1.10.0"
95
98
  },
96
99
  "devDependencies": {
97
100
  "@eslint/js": "^9.39.4",
@@ -131,7 +134,7 @@
131
134
  "pdfjs-dist": "^6.0.227",
132
135
  "sanitize-filename": "^1.6.3",
133
136
  "sonner": "^2.0.7",
134
- "tar": "^7.5.10",
137
+ "tar": "7.5.22",
135
138
  "uuid": "^14.0.0",
136
139
  "ws": "^8.14.2"
137
140
  }
@@ -11,11 +11,11 @@
11
11
  "model_map": [
12
12
  "claude-fable-5",
13
13
  "claude-haiku-4-5-20251001",
14
- "claude-opus-4-1-20250805",
15
14
  "claude-opus-4-5-20251101",
16
15
  "claude-opus-4-6",
17
16
  "claude-opus-4-7",
18
17
  "claude-opus-4-8",
18
+ "claude-opus-5",
19
19
  "claude-sonnet-4-5-20250929",
20
20
  "claude-sonnet-4-6",
21
21
  "claude-sonnet-5"
@@ -32,17 +32,17 @@
32
32
  "name": "temperature",
33
33
  "type": "number",
34
34
  "label": "Temperature",
35
- "description": "Controls randomness. Lower values are more focused, higher values more creative.",
35
+ "description": "Controls randomness on compatible legacy Claude models. Current models use their default sampling behavior.",
36
36
  "default": 0.7,
37
37
  "min": 0,
38
- "max": 2
38
+ "max": 1
39
39
  },
40
40
  {
41
41
  "name": "max_tokens",
42
42
  "type": "number",
43
43
  "label": "Max Tokens",
44
- "description": "Maximum number of tokens to generate in the response.",
45
- "default": 4096,
44
+ "description": "Maximum combined thinking and response tokens. Current Claude models may use part of this budget for adaptive thinking.",
45
+ "default": 16384,
46
46
  "min": 1,
47
47
  "max": 128000
48
48
  },
@@ -50,29 +50,11 @@
50
50
  "name": "top_p",
51
51
  "type": "number",
52
52
  "label": "Top P",
53
- "description": "Nucleus sampling. Lower values make output more focused.",
53
+ "description": "Nucleus sampling for compatible legacy Claude models. Current models use their default sampling behavior.",
54
54
  "default": 1,
55
55
  "min": 0,
56
56
  "max": 1
57
57
  },
58
- {
59
- "name": "frequency_penalty",
60
- "type": "number",
61
- "label": "Frequency Penalty",
62
- "description": "Reduces repetition of frequent tokens.",
63
- "default": 0,
64
- "min": -2,
65
- "max": 2
66
- },
67
- {
68
- "name": "presence_penalty",
69
- "type": "number",
70
- "label": "Presence Penalty",
71
- "description": "Encourages the model to talk about new topics.",
72
- "default": 0,
73
- "min": -2,
74
- "max": 2
75
- },
76
58
  {
77
59
  "name": "stream",
78
60
  "type": "boolean",
@@ -0,0 +1,73 @@
1
+ {
2
+ "id": "kimi-code",
3
+ "name": "Kimi Code (Moonshot AI)",
4
+ "type": "completion",
5
+ "endpoint": "https://api.kimi.com/coding/v1/chat/completions",
6
+ "auth": {
7
+ "header": "Authorization",
8
+ "prefix": "Bearer ",
9
+ "key_env": "KIMI_API_KEY"
10
+ },
11
+ "model_map": ["k3", "kimi-for-coding", "kimi-for-coding-highspeed"],
12
+ "variables": [
13
+ {
14
+ "name": "endpoint",
15
+ "type": "string",
16
+ "label": "API Endpoint",
17
+ "description": "Override the Kimi Code OpenAI-compatible endpoint.",
18
+ "default": "https://api.kimi.com/coding/v1/chat/completions"
19
+ },
20
+ {
21
+ "name": "temperature",
22
+ "type": "number",
23
+ "label": "Temperature",
24
+ "description": "Controls randomness. Lower values are more focused, higher values more creative.",
25
+ "default": 0.7,
26
+ "min": 0,
27
+ "max": 2
28
+ },
29
+ {
30
+ "name": "max_tokens",
31
+ "type": "number",
32
+ "label": "Max Output Tokens",
33
+ "description": "Maximum number of tokens to generate in the response.",
34
+ "default": 8192,
35
+ "min": 1,
36
+ "max": 128000
37
+ },
38
+ {
39
+ "name": "top_p",
40
+ "type": "number",
41
+ "label": "Top P",
42
+ "description": "Nucleus sampling. Lower values make output more focused.",
43
+ "default": 1,
44
+ "min": 0,
45
+ "max": 1
46
+ },
47
+ {
48
+ "name": "frequency_penalty",
49
+ "type": "number",
50
+ "label": "Frequency Penalty",
51
+ "description": "Reduces repetition of frequent tokens.",
52
+ "default": 0,
53
+ "min": -2,
54
+ "max": 2
55
+ },
56
+ {
57
+ "name": "presence_penalty",
58
+ "type": "number",
59
+ "label": "Presence Penalty",
60
+ "description": "Encourages the model to introduce new topics.",
61
+ "default": 0,
62
+ "min": -2,
63
+ "max": 2
64
+ },
65
+ {
66
+ "name": "stream",
67
+ "type": "boolean",
68
+ "label": "Stream Response",
69
+ "description": "Stream the response token by token.",
70
+ "default": true
71
+ }
72
+ ]
73
+ }
@@ -1 +0,0 @@
1
- import{n as e,t}from"./useBaseQuery-EKJwyGqK.js";function n(n,r){return t(n,e,r)}export{n as t};