nextclaw 0.37.0 → 0.38.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.
Files changed (50) hide show
  1. package/package.json +12 -12
  2. package/resources/USAGE.md +1 -1
  3. package/ui-dist/assets/{api-CuPWhNDM.js → api-BJioGtWS.js} +1 -1
  4. package/ui-dist/assets/{appearance-settings-page-DRjg6UP3.js → appearance-settings-page-DAF1fd14.js} +1 -1
  5. package/ui-dist/assets/{book-open-B4ovWX14.js → book-open-aDv6R1av.js} +1 -1
  6. package/ui-dist/assets/{channels-list-page-B26GXq63.js → channels-list-page-Dubt8r9S.js} +1 -1
  7. package/ui-dist/assets/{chat-page-QA0dpNyU.js → chat-page-JbwjeUo4.js} +1 -1
  8. package/ui-dist/assets/{config-split-page-Box_-aBK.js → config-split-page-Bs1wArsX.js} +1 -1
  9. package/ui-dist/assets/{confirm-dialog-uqcCxomz.js → confirm-dialog-BFatCZUq.js} +1 -1
  10. package/ui-dist/assets/{desktop-update-config-DkDor159.js → desktop-update-config-DFefhK96.js} +1 -1
  11. package/ui-dist/assets/{dist-CZLIZntJ.js → dist-CV9wIyME.js} +1 -1
  12. package/ui-dist/assets/{dist-Co2G-YjN.js → dist-D1I3blO_.js} +1 -1
  13. package/ui-dist/assets/{doc-browser-CbCBDdap.js → doc-browser-BFfstBoh.js} +1 -1
  14. package/ui-dist/assets/doc-browser-DEdoMb3X.js +1 -0
  15. package/ui-dist/assets/{doc-browser-context-aeZu0FHR.js → doc-browser-context-BcwcVwX_.js} +1 -1
  16. package/ui-dist/assets/{form-actions-C3Pa1HQb.js → form-actions-YSnn7q_U.js} +1 -1
  17. package/ui-dist/assets/{index-CCWgeWoR.js → index-L58BO782.js} +18 -18
  18. package/ui-dist/assets/loader-circle-CsNiT6VM.js +1 -0
  19. package/ui-dist/assets/mcp-marketplace-page-DfUCF-L5.js +1 -0
  20. package/ui-dist/assets/{mcp-marketplace-page-BmqbIQQQ.js → mcp-marketplace-page-ZTHpQTvi.js} +1 -1
  21. package/ui-dist/assets/{model-config-page-BXUoZEEZ.js → model-config-page-jYCwpq4U.js} +1 -1
  22. package/ui-dist/assets/{navigation-link-DngetDmN.js → navigation-link-7oSjAC9R.js} +1 -1
  23. package/ui-dist/assets/plus-D6UN8XN5.js +1 -0
  24. package/ui-dist/assets/{provider-scoped-model-input-C4a2TuV7.js → provider-scoped-model-input-C1CUHVJx.js} +1 -1
  25. package/ui-dist/assets/{providers-config-page-CHSka1kQ.js → providers-config-page-CMvI4R1e.js} +1 -1
  26. package/ui-dist/assets/{react-CPH0zySO.js → react-7zG0fz1I.js} +1 -1
  27. package/ui-dist/assets/{refresh-cw-vTYZqC0b.js → refresh-cw-BUg7hI3u.js} +1 -1
  28. package/ui-dist/assets/remote-BYPq49kD.js +1 -0
  29. package/ui-dist/assets/rotate-cw-B3qmXtfJ.js +1 -0
  30. package/ui-dist/assets/{runtime-config-page-V75_zqXa.js → runtime-config-page-DYuYv5yM.js} +1 -1
  31. package/ui-dist/assets/{save-lWb6TI69.js → save-CTCYuZqu.js} +1 -1
  32. package/ui-dist/assets/{search-BuUX_0KY.js → search-CfFUpaf7.js} +1 -1
  33. package/ui-dist/assets/{search-config-page-rlkRJZCF.js → search-config-page-GUtGbk6i.js} +1 -1
  34. package/ui-dist/assets/{secrets-config-page-BxCEc8r5.js → secrets-config-page-Delo8ab0.js} +1 -1
  35. package/ui-dist/assets/security-config-DoVoel5I.js +1 -0
  36. package/ui-dist/assets/{select-oalsltZV.js → select-MSvkWmPP.js} +1 -1
  37. package/ui-dist/assets/{settings-2-Bd9xiNAY.js → settings-2-DXUfAWgg.js} +1 -1
  38. package/ui-dist/assets/skeleton-DDFivi9Y.js +1 -0
  39. package/ui-dist/assets/{tag-chip-B324d_Xk.js → tag-chip-u8g0b0Nf.js} +1 -1
  40. package/ui-dist/assets/x-DdOEUmR4.js +1 -0
  41. package/ui-dist/index.html +19 -19
  42. package/ui-dist/assets/doc-browser-DUqckL2E.js +0 -1
  43. package/ui-dist/assets/loader-circle-DfbWUPdI.js +0 -1
  44. package/ui-dist/assets/mcp-marketplace-page-B2D7ciJL.js +0 -1
  45. package/ui-dist/assets/plus-wNpOxBfP.js +0 -1
  46. package/ui-dist/assets/remote-DgfRmokf.js +0 -1
  47. package/ui-dist/assets/rotate-cw-L_seGUwq.js +0 -1
  48. package/ui-dist/assets/security-config-Cqxe13za.js +0 -1
  49. package/ui-dist/assets/skeleton-D72EdBNa.js +0 -1
  50. package/ui-dist/assets/x-Cps-je1K.js +0 -1
@@ -1 +1 @@
1
- import{i as e}from"./chunk-DseTPa7n.js";import{V as t,i as n,o as r,t as i,x as a,z as o}from"./react-CPH0zySO.js";import{n as s,t as c}from"./middleware-B3k-TSmZ.js";var l=`docs.nextclaw.io`,u=`docs.nextclaw.net`,d=`nextclaw-docs.pages.dev`,f=new Set([l,`www.${l}`,u,`www.${u}`,d,`www.${d}`]),p=`https://${l}`,ee=`https://${u}`,m=`home`,h=`nextclaw://new-tab`,g=`/guide/getting-started`;function _(e){return e===`zh`?`zh`:`en`}function v(e,t){let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`||n===``?`/${t}/`:/^\/(en|zh)(\/|$)/.test(n)?n:`/${t}${n}`}function y(e){let t=e?.trim();if(t)try{return new URL(t).origin}catch{return}}function b(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??``}catch{return``}}function x(e){return/^[a-z][a-z\d+.-]*:/i.test(e.trim())}function S(){return r()===`zh`||b()===`Asia/Shanghai`}function C(){return y(void 0)||(S()?y(void 0)??ee:p)}function w(e){let t=_(r()),n=C();try{let r=new URL(e,n),i=new URL(n);return!x(e)||f.has(r.hostname)||r.origin===i.origin?(r.protocol=i.protocol,r.host=i.host,r.pathname=v(r.pathname,t),r.toString()):r.toString()}catch{return new URL(`/${t}${g}`,n).toString()}}function T(){return w(g)}function E(e){return w(e)}function D(e){try{return new URL(e).pathname.replace(/\.html$/,``).replace(/\/$/,``)}catch{return e}}function O(e,t,n=`Docs`){try{let r=new URL(e,p);if(r.protocol===`data:`)return t===`docs`?n:`Detail`;let i=r.pathname.split(`/`).filter(Boolean),a=i[i.length-1]??n;return decodeURIComponent(a).replace(/[-_]/g,` `).slice(0,40)||n}catch{return n}}function k(e){try{let t=typeof window<`u`?window.location.origin:p,n=new URL(e,t);return f.has(n.hostname)}catch{return!1}}function te(e,t){return t===`docs`?w(e):e}var A=0;function j(e){return typeof e==`number`&&Number.isFinite(e)?Math.min(860,Math.max(320,e)):420}function M(){return A+=1,`doc-tab-${Date.now()}-${A}`}function N(e,t,r,i,a,o,s){let c=r?.trim()||O(e,t,t===`docs`?n(`docBrowserHelp`):`Detail`),l=a?.trim();return{id:M(),kind:t,title:c,currentUrl:e,resourceUri:l||void 0,contentParams:s,dockIcon:o,dedupeKey:i,history:[e],historyIndex:0,navVersion:0}}function P(e,t){let n=[...e.history.slice(0,e.historyIndex+1),t];return{history:n,historyIndex:n.length-1}}function F(e,t,n,r,i){let o={...t,title:r?.title||n.title||t.title,kind:n.kind,resourceUri:n.resourceUri??n.url,dockIcon:r?.dockIcon??n.dockIcon,dedupeKey:i,contentParams:n.contentParams},s=e.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind);return s&&a(t.contentParams)===a(n.contentParams)?o:s?{...o,navVersion:t.navVersion+1}:{...o,currentUrl:n.url,...P(t,n.url),navVersion:t.navVersion+1}}function I(e){return{kind:e.kind,resourceUri:e.resourceUri,tabId:e.id,url:e.currentUrl}}function L(){let e=N(h,m,n(`docBrowserHomeTitle`));return{isOpen:!1,mode:`docked`,dockedWidth:420,tabs:[e],activeTabId:e.id,activeHistory:[I(e)],activeHistoryIndex:0}}var R=`nextclaw.doc-browser.state`,z=1,B=8;function V(e){return!!e&&typeof e==`object`}function H(e){return e===`floating`||e===`docked`}function U(e,t){if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`&&e.trim().length>0);return n.length>0?n:[t]}function W(e,t,n,r){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(t,e)):r}function G(e){if(!(!V(e)||typeof e.type!=`string`)){if(e.type===`builtin`&&typeof e.name==`string`&&e.name.trim().length>0)return{type:`builtin`,name:e.name.trim()};if(e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0)return{type:`url`,url:e.url.trim()};if(e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0)return{type:`text`,value:e.value.trim()}}}function K(e){if(!V(e)||typeof e.id!=`string`||typeof e.kind!=`string`||typeof e.title!=`string`||typeof e.currentUrl!=`string`||e.currentUrl.trim().length===0)return null;let t=U(e.history,e.currentUrl),n=W(e.historyIndex,0,t.length-1,t.length-1),r=W(e.navVersion,0,2**53-1,0),i=typeof e.dedupeKey==`string`&&e.dedupeKey.trim().length>0?e.dedupeKey:void 0,a=typeof e.resourceUri==`string`&&e.resourceUri.trim().length>0?e.resourceUri.trim():void 0,o=G(e.dockIcon);return{id:e.id,kind:e.kind,title:e.title,currentUrl:t[n]??e.currentUrl,resourceUri:a,dockIcon:o,dedupeKey:i,history:t,historyIndex:n,navVersion:r}}function q(e){return{kind:e.kind,resourceUri:e.resourceUri,tabId:e.id,url:e.currentUrl}}function J(e,t){if(!V(e)||typeof e.tabId!=`string`||typeof e.kind!=`string`||typeof e.url!=`string`||e.url.trim().length===0||!t.has(e.tabId))return null;let n=typeof e.resourceUri==`string`&&e.resourceUri.trim().length>0?e.resourceUri.trim():void 0;return{kind:e.kind,resourceUri:n,tabId:e.tabId,url:e.url}}function Y(e){if(!V(e))return null;let t=Array.isArray(e.tabs)?e.tabs.map(K).filter(e=>e!==null).slice(-B):[];if(t.length===0)return null;let n=typeof e.activeTabId==`string`?e.activeTabId:null,r=t.some(e=>e.id===n)?n??t[0].id:t[0].id,i=new Map(t.map(e=>[e.id,e])),a=Array.isArray(e.activeHistory)?e.activeHistory.map(e=>J(e,i)).filter(e=>e!==null):[],o=[q(i.get(r)??t[0])],s=a.length>0?a:o,c=W(e.activeHistoryIndex,0,s.length-1,s.length-1),l=s[c],u=i.has(l.tabId)?l.tabId:r;return{isOpen:e.isOpen===!0,mode:H(e.mode)?e.mode:`docked`,dockedWidth:j(e.dockedWidth),tabs:t,activeTabId:u,activeHistory:s,activeHistoryIndex:c}}function X(e,t){return typeof t==`function`?t(e):t}var Z=i()(s(e=>({snapshot:L(),setSnapshot:t=>e(e=>({snapshot:X(e.snapshot,t)}))}),{name:R,version:z,storage:c(()=>window.localStorage),partialize:e=>({snapshot:{isOpen:e.snapshot.isOpen,mode:e.snapshot.mode,dockedWidth:e.snapshot.dockedWidth,tabs:e.snapshot.tabs.slice(-B),activeTabId:e.snapshot.activeTabId,activeHistory:e.snapshot.activeHistory,activeHistoryIndex:e.snapshot.activeHistoryIndex}}),merge:(e,t)=>{let n=Y(V(e)?e.snapshot:null);return n?{...t,snapshot:n}:t}})),Q=e(t(),1),ne=o(),$=(0,Q.createContext)(null);function re(){let e=(0,Q.useContext)($);if(!e)throw Error(`useDocBrowser must be used within DocBrowserProvider`);return e}function ie({children:e,manager:t}){let n=Z(e=>e.snapshot),r=(0,Q.useMemo)(()=>n.tabs.find(e=>e.id===n.activeTabId)??n.tabs[0],[n.activeTabId,n.tabs]),i=(0,Q.useMemo)(()=>({...n,currentTab:r,open:t.open,openTarget:t.openTarget,openNewTab:t.openNewTab,close:t.close,toggleMode:t.toggleMode,setDockedWidth:t.setDockedWidth,navigate:t.navigate,syncUrl:t.syncUrl,goBack:t.goBack,goForward:t.goForward,closeTab:t.closeTab,setActiveTab:t.setActiveTab}),[r,t,n]);return(0,ne.jsx)($.Provider,{value:i,children:e})}export{D as _,L as a,j as c,m as d,h as f,k as g,O as h,P as i,F as l,E as m,re as n,I as o,T as p,Z as r,N as s,ie as t,p as u,te as v};
1
+ import{i as e}from"./chunk-DseTPa7n.js";import{V as t,i as n,o as r,t as i,x as a,z as o}from"./react-7zG0fz1I.js";import{n as s,t as c}from"./middleware-B3k-TSmZ.js";var l=`docs.nextclaw.io`,u=`docs.nextclaw.net`,d=`nextclaw-docs.pages.dev`,f=new Set([l,`www.${l}`,u,`www.${u}`,d,`www.${d}`]),p=`https://${l}`,ee=`https://${u}`,m=`home`,h=`nextclaw://new-tab`,g=`/guide/getting-started`;function _(e){return e===`zh`?`zh`:`en`}function v(e,t){let n=e.startsWith(`/`)?e:`/${e}`;return n===`/`||n===``?`/${t}/`:/^\/(en|zh)(\/|$)/.test(n)?n:`/${t}${n}`}function y(e){let t=e?.trim();if(t)try{return new URL(t).origin}catch{return}}function b(){try{return Intl.DateTimeFormat().resolvedOptions().timeZone??``}catch{return``}}function x(e){return/^[a-z][a-z\d+.-]*:/i.test(e.trim())}function S(){return r()===`zh`||b()===`Asia/Shanghai`}function C(){return y(void 0)||(S()?y(void 0)??ee:p)}function w(e){let t=_(r()),n=C();try{let r=new URL(e,n),i=new URL(n);return!x(e)||f.has(r.hostname)||r.origin===i.origin?(r.protocol=i.protocol,r.host=i.host,r.pathname=v(r.pathname,t),r.toString()):r.toString()}catch{return new URL(`/${t}${g}`,n).toString()}}function T(){return w(g)}function E(e){return w(e)}function D(e){try{return new URL(e).pathname.replace(/\.html$/,``).replace(/\/$/,``)}catch{return e}}function O(e,t,n=`Docs`){try{let r=new URL(e,p);if(r.protocol===`data:`)return t===`docs`?n:`Detail`;let i=r.pathname.split(`/`).filter(Boolean),a=i[i.length-1]??n;return decodeURIComponent(a).replace(/[-_]/g,` `).slice(0,40)||n}catch{return n}}function k(e){try{let t=typeof window<`u`?window.location.origin:p,n=new URL(e,t);return f.has(n.hostname)}catch{return!1}}function te(e,t){return t===`docs`?w(e):e}var A=0;function j(e){return typeof e==`number`&&Number.isFinite(e)?Math.min(860,Math.max(320,e)):420}function M(){return A+=1,`doc-tab-${Date.now()}-${A}`}function N(e,t,r,i,a,o,s){let c=r?.trim()||O(e,t,t===`docs`?n(`docBrowserHelp`):`Detail`),l=a?.trim();return{id:M(),kind:t,title:c,currentUrl:e,resourceUri:l||void 0,contentParams:s,dockIcon:o,dedupeKey:i,history:[e],historyIndex:0,navVersion:0}}function P(e,t){let n=[...e.history.slice(0,e.historyIndex+1),t];return{history:n,historyIndex:n.length-1}}function F(e,t,n,r,i){let o={...t,title:r?.title||n.title||t.title,kind:n.kind,resourceUri:n.resourceUri??n.url,dockIcon:r?.dockIcon??n.dockIcon,dedupeKey:i,contentParams:n.contentParams},s=e.areUrlsEquivalent(t.currentUrl,n.url,t.kind,n.kind);return s&&a(t.contentParams)===a(n.contentParams)?o:s?{...o,navVersion:t.navVersion+1}:{...o,currentUrl:n.url,...P(t,n.url),navVersion:t.navVersion+1}}function I(e){return{kind:e.kind,resourceUri:e.resourceUri,tabId:e.id,url:e.currentUrl}}function L(){let e=N(h,m,n(`docBrowserHomeTitle`));return{isOpen:!1,mode:`docked`,dockedWidth:420,tabs:[e],activeTabId:e.id,activeHistory:[I(e)],activeHistoryIndex:0}}var R=`nextclaw.doc-browser.state`,z=1,B=8;function V(e){return!!e&&typeof e==`object`}function H(e){return e===`floating`||e===`docked`}function U(e,t){if(!Array.isArray(e))return[t];let n=e.filter(e=>typeof e==`string`&&e.trim().length>0);return n.length>0?n:[t]}function W(e,t,n,r){return typeof e==`number`&&Number.isFinite(e)?Math.min(n,Math.max(t,e)):r}function G(e){if(!(!V(e)||typeof e.type!=`string`)){if(e.type===`builtin`&&typeof e.name==`string`&&e.name.trim().length>0)return{type:`builtin`,name:e.name.trim()};if(e.type===`url`&&typeof e.url==`string`&&e.url.trim().length>0)return{type:`url`,url:e.url.trim()};if(e.type===`text`&&typeof e.value==`string`&&e.value.trim().length>0)return{type:`text`,value:e.value.trim()}}}function K(e){if(!V(e)||typeof e.id!=`string`||typeof e.kind!=`string`||typeof e.title!=`string`||typeof e.currentUrl!=`string`||e.currentUrl.trim().length===0)return null;let t=U(e.history,e.currentUrl),n=W(e.historyIndex,0,t.length-1,t.length-1),r=W(e.navVersion,0,2**53-1,0),i=typeof e.dedupeKey==`string`&&e.dedupeKey.trim().length>0?e.dedupeKey:void 0,a=typeof e.resourceUri==`string`&&e.resourceUri.trim().length>0?e.resourceUri.trim():void 0,o=G(e.dockIcon);return{id:e.id,kind:e.kind,title:e.title,currentUrl:t[n]??e.currentUrl,resourceUri:a,dockIcon:o,dedupeKey:i,history:t,historyIndex:n,navVersion:r}}function q(e){return{kind:e.kind,resourceUri:e.resourceUri,tabId:e.id,url:e.currentUrl}}function J(e,t){if(!V(e)||typeof e.tabId!=`string`||typeof e.kind!=`string`||typeof e.url!=`string`||e.url.trim().length===0||!t.has(e.tabId))return null;let n=typeof e.resourceUri==`string`&&e.resourceUri.trim().length>0?e.resourceUri.trim():void 0;return{kind:e.kind,resourceUri:n,tabId:e.tabId,url:e.url}}function Y(e){if(!V(e))return null;let t=Array.isArray(e.tabs)?e.tabs.map(K).filter(e=>e!==null).slice(-B):[];if(t.length===0)return null;let n=typeof e.activeTabId==`string`?e.activeTabId:null,r=t.some(e=>e.id===n)?n??t[0].id:t[0].id,i=new Map(t.map(e=>[e.id,e])),a=Array.isArray(e.activeHistory)?e.activeHistory.map(e=>J(e,i)).filter(e=>e!==null):[],o=[q(i.get(r)??t[0])],s=a.length>0?a:o,c=W(e.activeHistoryIndex,0,s.length-1,s.length-1),l=s[c],u=i.has(l.tabId)?l.tabId:r;return{isOpen:e.isOpen===!0,mode:H(e.mode)?e.mode:`docked`,dockedWidth:j(e.dockedWidth),tabs:t,activeTabId:u,activeHistory:s,activeHistoryIndex:c}}function X(e,t){return typeof t==`function`?t(e):t}var Z=i()(s(e=>({snapshot:L(),setSnapshot:t=>e(e=>({snapshot:X(e.snapshot,t)}))}),{name:R,version:z,storage:c(()=>window.localStorage),partialize:e=>({snapshot:{isOpen:e.snapshot.isOpen,mode:e.snapshot.mode,dockedWidth:e.snapshot.dockedWidth,tabs:e.snapshot.tabs.slice(-B),activeTabId:e.snapshot.activeTabId,activeHistory:e.snapshot.activeHistory,activeHistoryIndex:e.snapshot.activeHistoryIndex}}),merge:(e,t)=>{let n=Y(V(e)?e.snapshot:null);return n?{...t,snapshot:n}:t}})),Q=e(t(),1),ne=o(),$=(0,Q.createContext)(null);function re(){let e=(0,Q.useContext)($);if(!e)throw Error(`useDocBrowser must be used within DocBrowserProvider`);return e}function ie({children:e,manager:t}){let n=Z(e=>e.snapshot),r=(0,Q.useMemo)(()=>n.tabs.find(e=>e.id===n.activeTabId)??n.tabs[0],[n.activeTabId,n.tabs]),i=(0,Q.useMemo)(()=>({...n,currentTab:r,open:t.open,openTarget:t.openTarget,openNewTab:t.openNewTab,close:t.close,toggleMode:t.toggleMode,setDockedWidth:t.setDockedWidth,navigate:t.navigate,syncUrl:t.syncUrl,goBack:t.goBack,goForward:t.goForward,closeTab:t.closeTab,setActiveTab:t.setActiveTab}),[r,t,n]);return(0,ne.jsx)($.Provider,{value:i,children:e})}export{D as _,L as a,j as c,m as d,h as f,k as g,O as h,P as i,F as l,E as m,re as n,I as o,T as p,Z as r,N as s,ie as t,p as u,te as v};
@@ -1 +1 @@
1
- import{I as e,z as t}from"./react-CPH0zySO.js";var n=t();function r({align:t=`end`,className:r,...i}){return(0,n.jsx)(`div`,{className:e(`flex flex-wrap items-center gap-2`,t===`start`&&`justify-start`,t===`end`&&`justify-end`,t===`between`&&`justify-between`,r),...i})}export{r as t};
1
+ import{I as e,z as t}from"./react-7zG0fz1I.js";var n=t();function r({align:t=`end`,className:r,...i}){return(0,n.jsx)(`div`,{className:e(`flex flex-wrap items-center gap-2`,t===`start`&&`justify-start`,t===`end`&&`justify-end`,t===`between`&&`justify-between`,r),...i})}export{r as t};