@puddle-code/cli 0.0.25 → 0.0.27

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 (32) hide show
  1. package/CHANGELOG.md +12 -66
  2. package/dist/index.js +13 -13
  3. package/dist/public/assets/{Dashboard-6o1ejKoK.js → Dashboard-CnreZDWT.js} +1 -1
  4. package/dist/public/assets/{EditorTabClose-BgK6C2jA.js → EditorTabClose-Cf6Ithkd.js} +1 -1
  5. package/dist/public/assets/{LazyTerminal-CDBfqZwZ.js → LazyTerminal-CBUKfCRA.js} +2 -2
  6. package/dist/public/assets/{ModelRefcount-xKqoegmi.js → ModelRefcount-BlBx1A4I.js} +1 -1
  7. package/dist/public/assets/{PaneEditorBody-BUd9HdMX.js → PaneEditorBody-yHuXb_2i.js} +2 -2
  8. package/dist/public/assets/SettingsDialog-D0Dg6hYk.js +1 -0
  9. package/dist/public/assets/{Terminal-wqPSeGSJ.js → Terminal-B7B5s9of.js} +17 -17
  10. package/dist/public/assets/Workspace-1pzIYqz0.js +7 -0
  11. package/dist/public/assets/{buffer-store-DbSmSAdC.js → buffer-store-ZpUFG5SK.js} +2 -2
  12. package/dist/public/assets/{context-menu-PMB0-xF7.js → context-menu-BqdZKIwP.js} +1 -1
  13. package/dist/public/assets/{cssMode-E7KJQLQr.js → cssMode-Bx7_D8TV.js} +1 -1
  14. package/dist/public/assets/{editor-sync-BOsmDr0F.js → editor-sync-BnwyuZGE.js} +1 -1
  15. package/dist/public/assets/hotkeys-VY-O_esT.js +1 -0
  16. package/dist/public/assets/{htmlMode-CogIKVWT.js → htmlMode-DIhfisqE.js} +1 -1
  17. package/dist/public/assets/index-C4dEk1bI.js +10 -0
  18. package/dist/public/assets/index-CBZ-vDvn.css +2 -0
  19. package/dist/public/assets/{jsonMode-GTuB6qz9.js → jsonMode-CUZib3Ic.js} +1 -1
  20. package/dist/public/assets/preview-kind-BKn8hI4T.js +1 -0
  21. package/dist/public/assets/{session-seed-BdQ_tCMQ.js → session-seed-c86Sck-7.js} +1 -1
  22. package/dist/public/assets/ssh-mode-zTe6dpiB.js +1 -0
  23. package/dist/public/assets/{tsMode-ChphGxQc.js → tsMode-D0SpNQhC.js} +1 -1
  24. package/dist/public/index.html +42 -5
  25. package/package.json +1 -1
  26. package/dist/public/assets/SettingsDialog-D8tgroEU.js +0 -1
  27. package/dist/public/assets/Workspace-B1OSrzoE.js +0 -7
  28. package/dist/public/assets/hotkeys-Bmah7TAT.js +0 -1
  29. package/dist/public/assets/index-BKVDB6Tt.css +0 -2
  30. package/dist/public/assets/index-BytCIda4.js +0 -10
  31. package/dist/public/assets/preview-kind-CsZyJGBK.js +0 -1
  32. package/dist/public/assets/ssh-mode-CcChY6en.js +0 -1
@@ -1 +0,0 @@
1
- import{r as e}from"./rolldown-runtime-QTnfLwEv.js";import{t}from"./react-CZI7_Jkm.js";import{t as n}from"./jsx-runtime-ffCh33zF.js";import{D as r,E as i,S as a,_ as o,b as s,v as c,w as l,y as u}from"./hotkeys-Bmah7TAT.js";import{S as d,n as f,r as p}from"./api-B3lAdmrV.js";var m=class extends l{constructor(e,t){super(e,t)}bindMethods(){super.bindMethods(),this.fetchNextPage=this.fetchNextPage.bind(this),this.fetchPreviousPage=this.fetchPreviousPage.bind(this)}setOptions(e){e._type=`infinite`,super.setOptions(e)}getOptimisticResult(e){return e._type=`infinite`,super.getOptimisticResult(e)}fetchNextPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`forward`}}})}fetchPreviousPage(e){return this.fetch({...e,meta:{fetchMore:{direction:`backward`}}})}createResult(e,t){let{state:n}=e,a=super.createResult(e,t),{isFetching:o,isRefetching:s,isError:c,isRefetchError:l}=a,u=n.fetchMeta?.fetchMore?.direction,d=c&&u===`forward`,f=o&&u===`forward`,p=c&&u===`backward`,m=o&&u===`backward`;return{...a,fetchNextPage:this.fetchNextPage,fetchPreviousPage:this.fetchPreviousPage,hasNextPage:i(t,n.data),hasPreviousPage:r(t,n.data),isFetchNextPageError:d,isFetchingNextPage:f,isFetchPreviousPageError:p,isFetchingPreviousPage:m,isRefetchError:l&&!d&&!p,isRefetching:s&&!f&&!m}}};function ee(e,t){return s(e,m,t)}var h=50;function g(e){return e===void 0?``:`&root=${encodeURIComponent(e)}`}function _(e,t,n){return u({queryKey:n===void 0?[`wt-tree`,e,t]:[`wt-tree`,e,t,n],queryFn:()=>f(`GET`,`/api/worktrees/${e}/tree?path=${encodeURIComponent(t)}${g(n)}`),enabled:e!==void 0})}function v(e,t,n){let r=n?.root;return u({queryKey:r===void 0?[`wt-file`,e,t]:[`wt-file`,e,t,r],queryFn:()=>f(`GET`,`/api/worktrees/${e}/file?path=${encodeURIComponent(t)}${g(r)}`),enabled:e!==void 0&&(n?.enabled??!0)})}function y(e,t){let n=a();return c({mutationFn:({path:n,...r})=>f(`PUT`,`/api/worktrees/${e}/file?path=${encodeURIComponent(n)}${g(t)}`,r),onSuccess:(r,{path:i})=>{n.invalidateQueries({queryKey:t===void 0?[`wt-file`,e,i]:[`wt-file`,e,i,t]}),n.invalidateQueries({queryKey:[`wt-diff`,e]})}})}function b(e,t){let n=t?.against??`base`,r=t?.root;return u({queryKey:r===void 0?[`wt-diff`,e,n]:[`wt-diff`,e,n,r],queryFn:()=>f(`GET`,`/api/worktrees/${e}/diff?against=${n}${g(r)}`),enabled:e!==void 0&&(t?.enabled??!0),refetchInterval:o(1e4),refetchOnWindowFocus:!0})}function x(e,t){let n=t?.root;return u({queryKey:n===void 0?[`wt-git-status`,e]:[`wt-git-status`,e,n],queryFn:()=>f(`GET`,`/api/worktrees/${e}/git-status${S(n)}`),enabled:e!==void 0&&(t?.enabled??!0),refetchInterval:o(1e4),refetchOnWindowFocus:!0})}function S(e){return e===void 0?``:`?root=${encodeURIComponent(e)}`}function te(e,t,n,r){return f(`POST`,`/api/worktrees/${e}/create${S(r)}`,{path:t,kind:n})}function ne(e,t,n,r){return f(`POST`,`/api/worktrees/${e}/rename${S(r)}`,{from:t,to:n})}function C(e,t,n,r){return f(`POST`,`/api/worktrees/${e}/copy${S(r)}`,{from:t,to:n})}function w(e,t,n){return f(`POST`,`/api/worktrees/${e}/delete${S(n)}`,{path:t})}function T(e,t,n){let{query:r,regex:i,caseSensitive:a,wholeWord:o}=t;return u({queryKey:[`wt-search`,e,r,i,a,o,n],queryFn:()=>{let t=new URLSearchParams({q:r});return i&&t.set(`regex`,`1`),a&&t.set(`case`,`1`),o&&t.set(`word`,`1`),n!==void 0&&t.set(`root`,n),f(`GET`,`/api/worktrees/${e}/search?${t.toString()}`)},enabled:e!==void 0&&r.length>0,staleTime:2e3})}function E(e,t,n,r){let i=r?.root;return u({queryKey:[`wt-file-at`,e,t,n,i],queryFn:()=>f(`GET`,`/api/worktrees/${e}/file-at?ref=${encodeURIComponent(t)}&path=${encodeURIComponent(n)}${g(i)}`),enabled:e!==void 0&&(r?.enabled??!0),staleTime:1/0})}function D(e,t){let n=t?.root;return ee({queryKey:n===void 0?[`wt-log`,e]:[`wt-log`,e,n],queryFn:({pageParam:t})=>f(`GET`,`/api/worktrees/${e}/log?limit=${h}&skip=${t}${g(n)}`),initialPageParam:0,getNextPageParam:(e,t)=>e.has_more?t.length*h:void 0,enabled:e!==void 0&&(t?.enabled??!0)})}function O(e,t,n){return u({queryKey:n===void 0?[`wt-show`,e,t]:[`wt-show`,e,t,n],queryFn:()=>f(`GET`,`/api/worktrees/${e}/show/${t}${S(n)}`),enabled:e!==void 0&&t!==void 0,staleTime:1/0})}var k=64*1024*1024;function A(e,t){let n=[],r=[],i=0;for(let a of e)r.length>0&&i+a.size>t&&(n.push(r),r=[],i=0),r.push(a),i+=a.size;return r.length>0&&n.push(r),n}async function j(e,t,n,r){let i=[];for(let a of A(n,k)){let n=new FormData;for(let e of a)n.append(`files`,e,e.name);let o=await p(`POST`,`/api/worktrees/${e}/upload?dir=${encodeURIComponent(t)}${g(r)}`,{body:n});i.push(...(await o.json()).files)}return{files:i}}function M(e,t){if(!e)return t;let n=/filename\*=UTF-8''([^;]+)/i.exec(e);if(n?.[1])try{return decodeURIComponent(n[1])}catch{return t}return/filename="?([^"; ]+)"?/i.exec(e)?.[1]??t}async function N(e,t,n){let r=await p(`GET`,`/api/worktrees/${e}/download?path=${encodeURIComponent(t)}${g(n)}`),i=await r.blob(),a=t.split(`/`).filter(Boolean).pop()??`worktree`,o=M(r.headers.get(`content-disposition`),a),s=URL.createObjectURL(i);try{let e=document.createElement(`a`);e.href=s,e.download=o,document.body.appendChild(e),e.click(),e.remove()}finally{URL.revokeObjectURL(s)}}var P=`UTC`;function F(e){return new Date(e).toLocaleDateString(`en-GB`,{day:`numeric`,month:`short`,year:`numeric`,timeZone:P})}var I=60,L=60*I,R=24*L,re=7*R;function z(e,t=new Date){let n=new Date(e).getTime(),r=Math.max(0,Math.floor((t.getTime()-n)/1e3));return r<I?`just now`:r<L?`${Math.floor(r/I)} m ago`:r<R?`${Math.floor(r/L)} h ago`:r<re?`${Math.floor(r/R)} d ago`:F(n)}function B(e,t){return t?`added`:e}function V(e){return f(`POST`,`/api/profiles/${e}/untitled`)}function H(e,t){return u({queryKey:[`untitled`,e,t],queryFn:()=>f(`GET`,`/api/profiles/${e}/untitled/${t}`),enabled:e!==null,staleTime:1/0})}function U(e,t,n){return f(`PUT`,`/api/profiles/${e}/untitled/${t}`,{content:n})}function W(e,t){return f(`DELETE`,`/api/profiles/${e}/untitled/${t}`)}var G=null,K=new Map;function q(e){G=e}function J(e){G?.(e)}function Y(e,t){K.set(e,t)}function X(e){K.delete(e)}var Z=e(t(),1),ie=n(),Q=(0,Z.createContext)({openFile:()=>void 0,handler:null,setHandler:()=>void 0});function ae({children:e}){let[t,n]=(0,Z.useState)(null),r=(0,Z.useCallback)(e=>n(()=>e),[]),i=(0,Z.useCallback)((e,n,r,i)=>{if(!t){d(`The editor is not ready yet.`);return}t(e,n,r,i)},[t]),a=(0,Z.useMemo)(()=>({openFile:i,handler:t,setHandler:r}),[i,t,r]);return(0,ie.jsx)(Q.Provider,{value:a,children:e})}function oe(){let{openFile:e}=(0,Z.useContext)(Q);return{openFile:e}}function $(e){let{setHandler:t}=(0,Z.useContext)(Q),n=(0,Z.useRef)(e);n.current=e,(0,Z.useEffect)(()=>(t((e,t,r,i)=>n.current(e,t,r,i)),()=>t(null)),[t])}var se={md:`markdown`,markdown:`markdown`,mdown:`markdown`,html:`html`,htm:`html`};function ce(e){let t=e.split(`/`).pop()??e,n=t.lastIndexOf(`.`);return n<=0?null:se[t.slice(n+1).toLowerCase()]??null}function le(e,t){if(t===``||t.startsWith(`#`)||t.startsWith(`//`)||/^[a-z][a-z0-9+.-]*:/i.test(t))return null;let n=t.split(`#`)[0].split(`?`)[0];if(n===``||n===`/`)return null;let r=[...n.startsWith(`/`)?[]:e.split(`/`).slice(0,-1)];for(let e of decodeURI(n).split(`/`))if(!(e===``||e===`.`))if(e===`..`){if(r.length===0)return null;r.pop()}else r.push(e);return r.length>0?r.join(`/`):null}export{T as A,O as C,v as D,b as E,x as O,j as S,y as T,te as _,$ as a,ne as b,J as c,W as d,U as f,C as g,z as h,oe as i,_ as j,D as k,q as l,B as m,le as n,X as o,H as p,ae as r,Y as s,ce as t,V as u,w as v,E as w,g as x,N as y};
@@ -1 +0,0 @@
1
- import{r as e}from"./index-BytCIda4.js";function t(){return e.get()}export{t};