agent-tower 0.3.6 → 0.3.8
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/dist/output/__tests__/claude-code-parser-token.test.js +98 -0
- package/dist/output/__tests__/claude-code-parser-token.test.js.map +1 -1
- package/dist/output/claude-code-parser.d.ts.map +1 -1
- package/dist/output/claude-code-parser.js +22 -17
- package/dist/output/claude-code-parser.js.map +1 -1
- package/dist/web/assets/{AgentDemoPage-BUf47Q1S.js → AgentDemoPage-CCHa9x-c.js} +1 -1
- package/dist/web/assets/{DemoPage-YJoGCFRc.js → DemoPage-CdT6VXkX.js} +1 -1
- package/dist/web/assets/{NotificationSettingsPage-nd-W-FdH.js → NotificationSettingsPage-CqZPABEG.js} +1 -1
- package/dist/web/assets/{ProfileSettingsPage-D2JttFbQ.js → ProfileSettingsPage-CSgX4NOe.js} +1 -1
- package/dist/web/assets/{ProjectKanbanPage-CBqZr0b3.js → ProjectKanbanPage-Pk7nnDcc.js} +3 -3
- package/dist/web/assets/{ProjectSettingsPage-oVQG2wKD.js → ProjectSettingsPage-COrzQUwG.js} +1 -1
- package/dist/web/assets/{ProviderSettingsPage-Cohs_N3t.js → ProviderSettingsPage-CzRDghu7.js} +1 -1
- package/dist/web/assets/{api-client-CK7WrmCJ.js → api-client-DUkeyNRB.js} +1 -1
- package/dist/web/assets/{chevron-down-DuVZacYQ.js → chevron-down-jKHLtCQs.js} +1 -1
- package/dist/web/assets/{circle-alert-QR4Sm3dT.js → circle-alert-DggTOwqB.js} +1 -1
- package/dist/web/assets/{circle-check-BNF8hoPa.js → circle-check-38jFi9hD.js} +1 -1
- package/dist/web/assets/{code-block-OCS4YCEC-BGPNmTcY.js → code-block-OCS4YCEC-BhBg2bzT.js} +1 -1
- package/dist/web/assets/{confirm-dialog-B39HcvMN.js → confirm-dialog-CUtMe44J.js} +1 -1
- package/dist/web/assets/{folder-picker-BbnTFUfi.js → folder-picker-BTgXPrUp.js} +1 -1
- package/dist/web/assets/{index-CodcwCOY.js → index-2lw92znX.js} +2 -2
- package/dist/web/assets/{loader-circle-Cu8puJkL.js → loader-circle-eX5KttSb.js} +1 -1
- package/dist/web/assets/{mermaid-NOHMQCX5-DJpYVrxf.js → mermaid-NOHMQCX5-CQgpbmIW.js} +19 -19
- package/dist/web/assets/{modal-CJRZJTMz.js → modal-DpSqKQgt.js} +1 -1
- package/dist/web/assets/{pencil-B3yCMa88.js → pencil-BaroHDtz.js} +1 -1
- package/dist/web/assets/{query-keys-WXeaXHkZ.js → query-keys-DpgVNQA1.js} +1 -1
- package/dist/web/assets/{select-6qwMA-o0.js → select-5Ta6iqIf.js} +1 -1
- package/dist/web/assets/{use-profiles-DxFPMF3P.js → use-profiles-BHlH-mYH.js} +1 -1
- package/dist/web/assets/{use-projects-DFCPcnP9.js → use-projects-DC5whFow.js} +1 -1
- package/dist/web/assets/{x-BmW9bXtL.js → x-_SSVUTap.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as f,r as a,j as e}from"./index-
|
|
1
|
+
import{c as f,r as a,j as e}from"./index-2lw92znX.js";import{c as i}from"./api-client-DUkeyNRB.js";import{X as x}from"./x-_SSVUTap.js";const y=[["path",{d:"M10 11v6",key:"nco0om"}],["path",{d:"M14 11v6",key:"outv1u"}],["path",{d:"M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6",key:"miytrc"}],["path",{d:"M3 6h18",key:"d0wm0j"}],["path",{d:"M8 6V4a2 2 0 0 1 2-2h4a2 2 0 0 1 2 2v2",key:"e791ji"}]],j=f("trash-2",y),b=({isOpen:t,onClose:r,title:d,children:c,action:l,className:u})=>{const[m,n]=a.useState(!1);a.useEffect(()=>{if(t)n(!0),document.body.style.overflow="hidden";else{const o=setTimeout(()=>n(!1),200);return document.body.style.overflow="unset",()=>clearTimeout(o)}},[t]);const s=a.useCallback(o=>{o.key==="Escape"&&r()},[r]);return a.useEffect(()=>{if(t)return document.addEventListener("keydown",s),()=>{document.removeEventListener("keydown",s)}},[t,s]),!m&&!t?null:e.jsxs("div",{className:i("fixed inset-0 z-50 flex items-center justify-center p-4 transition-opacity duration-200",t?"opacity-100":"opacity-0"),children:[e.jsx("div",{className:"absolute inset-0 bg-white/80 backdrop-blur-sm",onClick:r}),e.jsxs("div",{className:i("relative w-full max-w-lg bg-white rounded-xl shadow-2xl shadow-neutral-200/50 border border-neutral-100 transform transition-all duration-200",t?"scale-100 translate-y-0":"scale-95 translate-y-2",u),children:[e.jsxs("div",{className:"flex items-center justify-between px-6 py-4 border-b border-neutral-50",children:[e.jsx("h3",{className:"font-semibold text-neutral-900",children:d}),e.jsx("button",{onClick:r,className:"text-neutral-400 hover:text-neutral-900 transition-colors",children:e.jsx(x,{size:18})})]}),e.jsx("div",{className:"p-6",children:c}),l?e.jsx("div",{className:"px-6 py-4 bg-neutral-50 rounded-b-xl border-t border-neutral-100 flex justify-end gap-3",children:l}):null]})]})},w=Object.freeze(Object.defineProperty({__proto__:null,Modal:b},Symbol.toStringTag,{value:"Module"}));export{b as M,j as T,w as m};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as a}from"./index-
|
|
1
|
+
import{c as a}from"./index-2lw92znX.js";const c=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],o=a("pencil",c);export{o as P};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as G,p as K,b as d,d as w,e as y,n as M,f as P,h as A,t as Y,k as C,l as Z,m as $,o as B,q as I,v as H,w as q,r as c,x as _,u as J}from"./index-CodcwCOY.js";var tt=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#o=null,this.#n=K(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#i=void 0;#e=void 0;#r;#a;#n;#o;#m;#d;#f;#c;#u;#h;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),W(this.#t,this.options)?this.#l():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return k(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return k(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!w(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&z(this.#t,s,this.options,e)&&this.#l(),this.updateResult(),i&&(this.#t!==s||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(e.staleTime,this.#t))&&this.#v();const r=this.#b();i&&(this.#t!==s||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||r!==this.#h)&&this.#g(r)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return st(this,s)&&(this.#e=s,this.#a=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#n.status==="pending"&&this.#n.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#R();const t=y(this.options.staleTime,this.#t);if(P||this.#e.isStale||!A(t))return;const s=Y(this.#e.dataUpdatedAt,t)+1;this.#c=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(t){this.#S(),this.#h=t,!(P||d(this.options.enabled,this.#t)===!1||!A(this.#h)||this.#h===0)&&(this.#u=C.setInterval(()=>{(this.options.refetchIntervalInBackground||Z.isFocused())&&this.#l()},this.#h))}#y(){this.#v(),this.#g(this.#b())}#R(){this.#c&&(C.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(C.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const s=this.#t,i=this.options,r=this.#e,u=this.#r,a=this.#a,v=t!==s?t.state:this.#i,{state:h}=t;let n={...h},b=!1,o;if(e._optimisticResults){const l=this.hasListeners(),g=!l&&W(t,e),S=l&&z(t,s,e,i);(g||S)&&(n={...n,...$(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(n.fetchStatus="idle")}let{error:R,errorUpdatedAt:D,status:m}=n;o=n.data;let F=!1;if(e.placeholderData!==void 0&&o===void 0&&m==="pending"){let l;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(l=r.data,F=!0):l=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,l!==void 0&&(m="success",o=B(r?.data,l,e),b=!0)}if(e.select&&o!==void 0&&!F)if(r&&o===u?.data&&e.select===this.#m)o=this.#d;else try{this.#m=e.select,o=e.select(o),o=B(r?.data,o,e),this.#d=o,this.#o=null}catch(l){this.#o=l}this.#o&&(R=this.#o,o=this.#d,D=Date.now(),m="error");const T=n.fetchStatus==="fetching",x=m==="pending",Q=m==="error",j=x&&T,L=o!==void 0,p={status:m,fetchStatus:n.fetchStatus,isPending:x,isSuccess:m==="success",isError:Q,isInitialLoading:j,isLoading:j,data:o,dataUpdatedAt:n.dataUpdatedAt,error:R,errorUpdatedAt:D,failureCount:n.fetchFailureCount,failureReason:n.fetchFailureReason,errorUpdateCount:n.errorUpdateCount,isFetched:n.dataUpdateCount>0||n.errorUpdateCount>0,isFetchedAfterMount:n.dataUpdateCount>v.dataUpdateCount||n.errorUpdateCount>v.errorUpdateCount,isFetching:T,isRefetching:T&&!x,isLoadingError:Q&&!L,isPaused:n.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:Q&&L,isStale:U(t,e),refetch:this.refetch,promise:this.#n,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const l=p.data!==void 0,g=p.status==="error"&&!l,S=E=>{g?E.reject(p.error):l&&E.resolve(p.data)},N=()=>{const E=this.#n=p.promise=K();S(E)},O=this.#n;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(g||p.data!==O.value)&&N();break;case"rejected":(!g||p.error!==O.reason)&&N();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#f=this.#t),w(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const u=new Set(r??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(a=>{const f=a;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#E(t){I.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function et(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function W(t,e){return et(t,e)||t.state.data!==void 0&&k(t,e,e.refetchOnMount)}function k(t,e,s){if(d(e.enabled,t)!==!1&&y(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&U(t,e)}return!1}function z(t,e,s,i){return(t!==e||d(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&U(t,s)}function U(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(y(e.staleTime,t))}function st(t,e){return!w(t.getCurrentResult(),e)}var it=class extends G{#s;#t=void 0;#i;#e;constructor(t,e){super(),this.#s=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#s.defaultMutationOptions(t),w(this.options,e)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),e?.mutationKey&&this.options.mutationKey&&H(e.mutationKey)!==H(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#r(),this.#a()}mutate(t,e){return this.#e=e,this.#i?.removeObserver(this),this.#i=this.#s.getMutationCache().build(this.#s,this.options),this.#i.addObserver(this),this.#i.execute(t)}#r(){const t=this.#i?.state??q();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){I.batch(()=>{if(this.#e&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,i={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#e.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#e.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#t)})})}},X=c.createContext(!1),rt=()=>c.useContext(X);X.Provider;function at(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var nt=c.createContext(at()),ot=()=>c.useContext(nt),ht=(t,e,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?_(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},ct=t=>{c.useEffect(()=>{t.clearReset()},[t])},ut=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||_(s,[t.error,i])),lt=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},dt=(t,e)=>t.isLoading&&t.isFetching&&!e,ft=(t,e)=>t?.suspense&&e.isPending,V=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function pt(t,e,s){const i=rt(),r=ot(),u=J(),a=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const f=u.getQueryCache().get(a.queryHash);a._optimisticResults=i?"isRestoring":"optimistic",lt(a),ht(a,r,f),ct(r);const v=!u.getQueryCache().get(a.queryHash),[h]=c.useState(()=>new e(u,a)),n=h.getOptimisticResult(a),b=!i&&t.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(o=>{const R=b?h.subscribe(I.batchCalls(o)):M;return h.updateResult(),R},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),c.useEffect(()=>{h.setOptions(a)},[a,h]),ft(a,n))throw V(a,h,r);if(ut({result:n,errorResetBoundary:r,throwOnError:a.throwOnError,query:f,suspense:a.suspense}))throw n.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(a,n),a.experimental_prefetchInRender&&!P&&dt(n,i)&&(v?V(a,h,r):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?n:h.trackResult(n)}function bt(t,e){return pt(t,tt)}function gt(t,e){const s=J(),[i]=c.useState(()=>new it(s,t));c.useEffect(()=>{i.setOptions(t)},[i,t]);const r=c.useSyncExternalStore(c.useCallback(a=>i.subscribe(I.batchCalls(a)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=c.useCallback((a,f)=>{i.mutate(a,f).catch(M)},[i]);if(r.error&&_(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}const yt={projects:{all:["projects"],list:t=>["projects","list",t],detail:t=>["projects","detail",t]},tasks:{all:["tasks"],list:(t,e)=>["tasks","list",t,e],detail:t=>["tasks","detail",t],stats:t=>["tasks","stats",t]},workspaces:{all:["workspaces"],list:t=>["workspaces","list",t],detail:t=>["workspaces","detail",t],diff:t=>["workspaces","diff",t],gitStatus:t=>["workspaces","gitStatus",t]},sessions:{all:["sessions"],detail:t=>["sessions","detail",t]},files:{all:["files"],tree:(t,e)=>["files","tree",t,e],content:(t,e)=>["files","content",t,e]},git:{all:["git"],changes:t=>["git","changes",t],diff:(t,e,s)=>["git","diff",t,e,s],log:t=>["git","log",t],commitFiles:(t,e)=>["git","commitFiles",t,e],commitDiff:(t,e,s)=>["git","commitDiff",t,e,s]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:t=>["profiles","agent",t],variant:(t,e)=>["profiles","variant",t,e]},providers:{all:["providers"],detail:t=>["providers","detail",t]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]}};export{tt as Q,gt as a,rt as b,ot as c,ht as d,lt as e,ct as f,V as g,ut as h,pt as i,yt as q,ft as s,bt as u,dt as w};
|
|
1
|
+
import{a as G,p as K,b as d,d as w,e as y,n as M,f as P,h as A,t as Y,k as C,l as Z,m as $,o as B,q as I,v as H,w as q,r as c,x as _,u as J}from"./index-2lw92znX.js";var tt=class extends G{constructor(t,e){super(),this.options=e,this.#s=t,this.#o=null,this.#n=K(),this.bindMethods(),this.setOptions(e)}#s;#t=void 0;#i=void 0;#e=void 0;#r;#a;#n;#o;#m;#d;#f;#c;#u;#h;#p=new Set;bindMethods(){this.refetch=this.refetch.bind(this)}onSubscribe(){this.listeners.size===1&&(this.#t.addObserver(this),W(this.#t,this.options)?this.#l():this.updateResult(),this.#y())}onUnsubscribe(){this.hasListeners()||this.destroy()}shouldFetchOnReconnect(){return k(this.#t,this.options,this.options.refetchOnReconnect)}shouldFetchOnWindowFocus(){return k(this.#t,this.options,this.options.refetchOnWindowFocus)}destroy(){this.listeners=new Set,this.#R(),this.#S(),this.#t.removeObserver(this)}setOptions(t){const e=this.options,s=this.#t;if(this.options=this.#s.defaultQueryOptions(t),this.options.enabled!==void 0&&typeof this.options.enabled!="boolean"&&typeof this.options.enabled!="function"&&typeof d(this.options.enabled,this.#t)!="boolean")throw new Error("Expected enabled to be a boolean or a callback that returns a boolean");this.#O(),this.#t.setOptions(this.options),e._defaulted&&!w(this.options,e)&&this.#s.getQueryCache().notify({type:"observerOptionsUpdated",query:this.#t,observer:this});const i=this.hasListeners();i&&z(this.#t,s,this.options,e)&&this.#l(),this.updateResult(),i&&(this.#t!==s||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||y(this.options.staleTime,this.#t)!==y(e.staleTime,this.#t))&&this.#v();const r=this.#b();i&&(this.#t!==s||d(this.options.enabled,this.#t)!==d(e.enabled,this.#t)||r!==this.#h)&&this.#g(r)}getOptimisticResult(t){const e=this.#s.getQueryCache().build(this.#s,t),s=this.createResult(e,t);return st(this,s)&&(this.#e=s,this.#a=this.options,this.#r=this.#t.state),s}getCurrentResult(){return this.#e}trackResult(t,e){return new Proxy(t,{get:(s,i)=>(this.trackProp(i),e?.(i),i==="promise"&&(this.trackProp("data"),!this.options.experimental_prefetchInRender&&this.#n.status==="pending"&&this.#n.reject(new Error("experimental_prefetchInRender feature flag is not enabled"))),Reflect.get(s,i))})}trackProp(t){this.#p.add(t)}getCurrentQuery(){return this.#t}refetch({...t}={}){return this.fetch({...t})}fetchOptimistic(t){const e=this.#s.defaultQueryOptions(t),s=this.#s.getQueryCache().build(this.#s,e);return s.fetch().then(()=>this.createResult(s,e))}fetch(t){return this.#l({...t,cancelRefetch:t.cancelRefetch??!0}).then(()=>(this.updateResult(),this.#e))}#l(t){this.#O();let e=this.#t.fetch(this.options,t);return t?.throwOnError||(e=e.catch(M)),e}#v(){this.#R();const t=y(this.options.staleTime,this.#t);if(P||this.#e.isStale||!A(t))return;const s=Y(this.#e.dataUpdatedAt,t)+1;this.#c=C.setTimeout(()=>{this.#e.isStale||this.updateResult()},s)}#b(){return(typeof this.options.refetchInterval=="function"?this.options.refetchInterval(this.#t):this.options.refetchInterval)??!1}#g(t){this.#S(),this.#h=t,!(P||d(this.options.enabled,this.#t)===!1||!A(this.#h)||this.#h===0)&&(this.#u=C.setInterval(()=>{(this.options.refetchIntervalInBackground||Z.isFocused())&&this.#l()},this.#h))}#y(){this.#v(),this.#g(this.#b())}#R(){this.#c&&(C.clearTimeout(this.#c),this.#c=void 0)}#S(){this.#u&&(C.clearInterval(this.#u),this.#u=void 0)}createResult(t,e){const s=this.#t,i=this.options,r=this.#e,u=this.#r,a=this.#a,v=t!==s?t.state:this.#i,{state:h}=t;let n={...h},b=!1,o;if(e._optimisticResults){const l=this.hasListeners(),g=!l&&W(t,e),S=l&&z(t,s,e,i);(g||S)&&(n={...n,...$(h.data,t.options)}),e._optimisticResults==="isRestoring"&&(n.fetchStatus="idle")}let{error:R,errorUpdatedAt:D,status:m}=n;o=n.data;let F=!1;if(e.placeholderData!==void 0&&o===void 0&&m==="pending"){let l;r?.isPlaceholderData&&e.placeholderData===a?.placeholderData?(l=r.data,F=!0):l=typeof e.placeholderData=="function"?e.placeholderData(this.#f?.state.data,this.#f):e.placeholderData,l!==void 0&&(m="success",o=B(r?.data,l,e),b=!0)}if(e.select&&o!==void 0&&!F)if(r&&o===u?.data&&e.select===this.#m)o=this.#d;else try{this.#m=e.select,o=e.select(o),o=B(r?.data,o,e),this.#d=o,this.#o=null}catch(l){this.#o=l}this.#o&&(R=this.#o,o=this.#d,D=Date.now(),m="error");const T=n.fetchStatus==="fetching",x=m==="pending",Q=m==="error",j=x&&T,L=o!==void 0,p={status:m,fetchStatus:n.fetchStatus,isPending:x,isSuccess:m==="success",isError:Q,isInitialLoading:j,isLoading:j,data:o,dataUpdatedAt:n.dataUpdatedAt,error:R,errorUpdatedAt:D,failureCount:n.fetchFailureCount,failureReason:n.fetchFailureReason,errorUpdateCount:n.errorUpdateCount,isFetched:n.dataUpdateCount>0||n.errorUpdateCount>0,isFetchedAfterMount:n.dataUpdateCount>v.dataUpdateCount||n.errorUpdateCount>v.errorUpdateCount,isFetching:T,isRefetching:T&&!x,isLoadingError:Q&&!L,isPaused:n.fetchStatus==="paused",isPlaceholderData:b,isRefetchError:Q&&L,isStale:U(t,e),refetch:this.refetch,promise:this.#n,isEnabled:d(e.enabled,t)!==!1};if(this.options.experimental_prefetchInRender){const l=p.data!==void 0,g=p.status==="error"&&!l,S=E=>{g?E.reject(p.error):l&&E.resolve(p.data)},N=()=>{const E=this.#n=p.promise=K();S(E)},O=this.#n;switch(O.status){case"pending":t.queryHash===s.queryHash&&S(O);break;case"fulfilled":(g||p.data!==O.value)&&N();break;case"rejected":(!g||p.error!==O.reason)&&N();break}}return p}updateResult(){const t=this.#e,e=this.createResult(this.#t,this.options);if(this.#r=this.#t.state,this.#a=this.options,this.#r.data!==void 0&&(this.#f=this.#t),w(e,t))return;this.#e=e;const s=()=>{if(!t)return!0;const{notifyOnChangeProps:i}=this.options,r=typeof i=="function"?i():i;if(r==="all"||!r&&!this.#p.size)return!0;const u=new Set(r??this.#p);return this.options.throwOnError&&u.add("error"),Object.keys(this.#e).some(a=>{const f=a;return this.#e[f]!==t[f]&&u.has(f)})};this.#E({listeners:s()})}#O(){const t=this.#s.getQueryCache().build(this.#s,this.options);if(t===this.#t)return;const e=this.#t;this.#t=t,this.#i=t.state,this.hasListeners()&&(e?.removeObserver(this),t.addObserver(this))}onQueryUpdate(){this.updateResult(),this.hasListeners()&&this.#y()}#E(t){I.batch(()=>{t.listeners&&this.listeners.forEach(e=>{e(this.#e)}),this.#s.getQueryCache().notify({query:this.#t,type:"observerResultsUpdated"})})}};function et(t,e){return d(e.enabled,t)!==!1&&t.state.data===void 0&&!(t.state.status==="error"&&e.retryOnMount===!1)}function W(t,e){return et(t,e)||t.state.data!==void 0&&k(t,e,e.refetchOnMount)}function k(t,e,s){if(d(e.enabled,t)!==!1&&y(e.staleTime,t)!=="static"){const i=typeof s=="function"?s(t):s;return i==="always"||i!==!1&&U(t,e)}return!1}function z(t,e,s,i){return(t!==e||d(i.enabled,t)===!1)&&(!s.suspense||t.state.status!=="error")&&U(t,s)}function U(t,e){return d(e.enabled,t)!==!1&&t.isStaleByTime(y(e.staleTime,t))}function st(t,e){return!w(t.getCurrentResult(),e)}var it=class extends G{#s;#t=void 0;#i;#e;constructor(t,e){super(),this.#s=t,this.setOptions(e),this.bindMethods(),this.#r()}bindMethods(){this.mutate=this.mutate.bind(this),this.reset=this.reset.bind(this)}setOptions(t){const e=this.options;this.options=this.#s.defaultMutationOptions(t),w(this.options,e)||this.#s.getMutationCache().notify({type:"observerOptionsUpdated",mutation:this.#i,observer:this}),e?.mutationKey&&this.options.mutationKey&&H(e.mutationKey)!==H(this.options.mutationKey)?this.reset():this.#i?.state.status==="pending"&&this.#i.setOptions(this.options)}onUnsubscribe(){this.hasListeners()||this.#i?.removeObserver(this)}onMutationUpdate(t){this.#r(),this.#a(t)}getCurrentResult(){return this.#t}reset(){this.#i?.removeObserver(this),this.#i=void 0,this.#r(),this.#a()}mutate(t,e){return this.#e=e,this.#i?.removeObserver(this),this.#i=this.#s.getMutationCache().build(this.#s,this.options),this.#i.addObserver(this),this.#i.execute(t)}#r(){const t=this.#i?.state??q();this.#t={...t,isPending:t.status==="pending",isSuccess:t.status==="success",isError:t.status==="error",isIdle:t.status==="idle",mutate:this.mutate,reset:this.reset}}#a(t){I.batch(()=>{if(this.#e&&this.hasListeners()){const e=this.#t.variables,s=this.#t.context,i={client:this.#s,meta:this.options.meta,mutationKey:this.options.mutationKey};if(t?.type==="success"){try{this.#e.onSuccess?.(t.data,e,s,i)}catch(r){Promise.reject(r)}try{this.#e.onSettled?.(t.data,null,e,s,i)}catch(r){Promise.reject(r)}}else if(t?.type==="error"){try{this.#e.onError?.(t.error,e,s,i)}catch(r){Promise.reject(r)}try{this.#e.onSettled?.(void 0,t.error,e,s,i)}catch(r){Promise.reject(r)}}}this.listeners.forEach(e=>{e(this.#t)})})}},X=c.createContext(!1),rt=()=>c.useContext(X);X.Provider;function at(){let t=!1;return{clearReset:()=>{t=!1},reset:()=>{t=!0},isReset:()=>t}}var nt=c.createContext(at()),ot=()=>c.useContext(nt),ht=(t,e,s)=>{const i=s?.state.error&&typeof t.throwOnError=="function"?_(t.throwOnError,[s.state.error,s]):t.throwOnError;(t.suspense||t.experimental_prefetchInRender||i)&&(e.isReset()||(t.retryOnMount=!1))},ct=t=>{c.useEffect(()=>{t.clearReset()},[t])},ut=({result:t,errorResetBoundary:e,throwOnError:s,query:i,suspense:r})=>t.isError&&!e.isReset()&&!t.isFetching&&i&&(r&&t.data===void 0||_(s,[t.error,i])),lt=t=>{if(t.suspense){const s=r=>r==="static"?r:Math.max(r??1e3,1e3),i=t.staleTime;t.staleTime=typeof i=="function"?(...r)=>s(i(...r)):s(i),typeof t.gcTime=="number"&&(t.gcTime=Math.max(t.gcTime,1e3))}},dt=(t,e)=>t.isLoading&&t.isFetching&&!e,ft=(t,e)=>t?.suspense&&e.isPending,V=(t,e,s)=>e.fetchOptimistic(t).catch(()=>{s.clearReset()});function pt(t,e,s){const i=rt(),r=ot(),u=J(),a=u.defaultQueryOptions(t);u.getDefaultOptions().queries?._experimental_beforeQuery?.(a);const f=u.getQueryCache().get(a.queryHash);a._optimisticResults=i?"isRestoring":"optimistic",lt(a),ht(a,r,f),ct(r);const v=!u.getQueryCache().get(a.queryHash),[h]=c.useState(()=>new e(u,a)),n=h.getOptimisticResult(a),b=!i&&t.subscribed!==!1;if(c.useSyncExternalStore(c.useCallback(o=>{const R=b?h.subscribe(I.batchCalls(o)):M;return h.updateResult(),R},[h,b]),()=>h.getCurrentResult(),()=>h.getCurrentResult()),c.useEffect(()=>{h.setOptions(a)},[a,h]),ft(a,n))throw V(a,h,r);if(ut({result:n,errorResetBoundary:r,throwOnError:a.throwOnError,query:f,suspense:a.suspense}))throw n.error;return u.getDefaultOptions().queries?._experimental_afterQuery?.(a,n),a.experimental_prefetchInRender&&!P&&dt(n,i)&&(v?V(a,h,r):f?.promise)?.catch(M).finally(()=>{h.updateResult()}),a.notifyOnChangeProps?n:h.trackResult(n)}function bt(t,e){return pt(t,tt)}function gt(t,e){const s=J(),[i]=c.useState(()=>new it(s,t));c.useEffect(()=>{i.setOptions(t)},[i,t]);const r=c.useSyncExternalStore(c.useCallback(a=>i.subscribe(I.batchCalls(a)),[i]),()=>i.getCurrentResult(),()=>i.getCurrentResult()),u=c.useCallback((a,f)=>{i.mutate(a,f).catch(M)},[i]);if(r.error&&_(i.options.throwOnError,[r.error]))throw r.error;return{...r,mutate:u,mutateAsync:r.mutate}}const yt={projects:{all:["projects"],list:t=>["projects","list",t],detail:t=>["projects","detail",t]},tasks:{all:["tasks"],list:(t,e)=>["tasks","list",t,e],detail:t=>["tasks","detail",t],stats:t=>["tasks","stats",t]},workspaces:{all:["workspaces"],list:t=>["workspaces","list",t],detail:t=>["workspaces","detail",t],diff:t=>["workspaces","diff",t],gitStatus:t=>["workspaces","gitStatus",t]},sessions:{all:["sessions"],detail:t=>["sessions","detail",t]},files:{all:["files"],tree:(t,e)=>["files","tree",t,e],content:(t,e)=>["files","content",t,e]},git:{all:["git"],changes:t=>["git","changes",t],diff:(t,e,s)=>["git","diff",t,e,s],log:t=>["git","log",t],commitFiles:(t,e)=>["git","commitFiles",t,e],commitDiff:(t,e,s)=>["git","commitDiff",t,e,s]},profiles:{all:["profiles"],defaults:["profiles","defaults"],agent:t=>["profiles","agent",t],variant:(t,e)=>["profiles","variant",t,e]},providers:{all:["providers"],detail:t=>["providers","detail",t]},tunnel:{status:["tunnel","status"]},notifications:{settings:["notifications","settings"]}};export{tt as Q,gt as a,rt as b,ot as c,ht as d,lt as e,ct as f,V as g,ut as h,pt as i,yt as q,ft as s,bt as u,dt as w};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as n,j as t}from"./index-
|
|
1
|
+
import{r as n,j as t}from"./index-2lw92znX.js";import{c as r}from"./api-client-DUkeyNRB.js";import{C as h,a as p}from"./chevron-down-jKHLtCQs.js";function j({value:l,onChange:i,options:o,placeholder:d="Select...",disabled:m=!1,className:f}){const[s,a]=n.useState(!1),c=n.useRef(null),u=o.find(e=>e.value===l);n.useEffect(()=>{if(!s)return;const e=b=>{c.current&&!c.current.contains(b.target)&&a(!1)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[s]);const x=n.useCallback(e=>{e.key==="Escape"&&a(!1)},[]);return t.jsxs("div",{ref:c,className:r("relative",f),onKeyDown:x,children:[t.jsxs("button",{type:"button",disabled:m,onClick:()=>a(e=>!e),className:r("flex items-center justify-between w-full h-9 px-3 border rounded-lg text-sm transition-colors","bg-white border-neutral-200 hover:border-neutral-300","focus:outline-none focus:border-neutral-400","disabled:opacity-50 disabled:cursor-not-allowed",s&&"border-neutral-400",!u&&"text-neutral-400"),children:[t.jsx("span",{className:"truncate",children:u?u.label:d}),t.jsx(h,{size:14,className:r("ml-2 shrink-0 text-neutral-400 transition-transform duration-150",s&&"rotate-180")})]}),s&&t.jsx("div",{className:"absolute z-50 mt-1 w-full min-w-[160px] bg-white border border-neutral-200 rounded-lg shadow-lg shadow-neutral-200/50 py-1 max-h-[200px] overflow-y-auto",children:o.length===0?t.jsx("div",{className:"px-3 py-2 text-sm text-neutral-400",children:"No options"}):o.map(e=>t.jsxs("button",{type:"button",disabled:e.disabled,onClick:()=>{i(e.value),a(!1)},className:r("flex items-center w-full px-3 py-1.5 text-sm text-left transition-colors","hover:bg-neutral-50",e.value===l?"text-neutral-900 font-medium":"text-neutral-600",e.disabled&&"opacity-40 cursor-not-allowed"),children:[t.jsx(p,{size:14,className:r("mr-2 shrink-0",e.value===l?"opacity-100":"opacity-0")}),t.jsx("span",{className:"truncate",children:e.label})]},e.value))})]})}export{j as S};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{u as i,a as n,q as r}from"./query-keys-
|
|
1
|
+
import{u as i,a as n,q as r}from"./query-keys-DpgVNQA1.js";import{u as a}from"./index-2lw92znX.js";import{a as u}from"./api-client-DUkeyNRB.js";function y(){return i({queryKey:r.profiles.all,queryFn:()=>u.get("/profiles")})}function c(){return i({queryKey:r.profiles.defaults,queryFn:()=>u.get("/profiles/defaults")})}function q(e){return i({queryKey:r.profiles.agent(e),queryFn:()=>u.get(`/profiles/${e}`),enabled:!!e})}function d(){const e=a();return n({mutationFn:({agentType:s,variant:t,config:o})=>u.put(`/profiles/${s}/${t}`,o),onSuccess:()=>{e.invalidateQueries({queryKey:r.profiles.all})}})}function m(){const e=a();return n({mutationFn:({agentType:s,variant:t})=>u.delete(`/profiles/${s}/${t}`),onSuccess:()=>{e.invalidateQueries({queryKey:r.profiles.all})}})}export{c as a,d as b,m as c,q as d,y as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as u,u as n}from"./index-
|
|
1
|
+
import{c as u,u as n}from"./index-2lw92znX.js";import{u as i,a as o,q as a}from"./query-keys-DpgVNQA1.js";import{a as r}from"./api-client-DUkeyNRB.js";const c=[["path",{d:"M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z",key:"1oefj6"}],["path",{d:"M14 2v5a1 1 0 0 0 1 1h5",key:"wfsgrz"}]],j=u("file",c);const l=[["path",{d:"M20 20a2 2 0 0 0 2-2V8a2 2 0 0 0-2-2h-7.9a2 2 0 0 1-1.69-.9L9.6 3.9A2 2 0 0 0 7.93 3H4a2 2 0 0 0-2 2v13a2 2 0 0 0 2 2Z",key:"1kt360"}]],f=u("folder",l);function m(e){const t={};return e?.page!=null&&(t.page=String(e.page)),e?.limit!=null&&(t.limit=String(e.limit)),i({queryKey:a.projects.list(e),queryFn:()=>r.get("/projects",{params:t})})}function q(e){return i({queryKey:a.projects.detail(e),queryFn:()=>r.get(`/projects/${e}`),enabled:!!e})}function g(){const e=n();return o({mutationFn:t=>r.post("/projects",t),onSuccess:()=>{e.invalidateQueries({queryKey:a.projects.all})}})}function F(){const e=n();return o({mutationFn:({id:t,...s})=>r.put(`/projects/${t}`,s),onSuccess:(t,s)=>{e.invalidateQueries({queryKey:a.projects.all}),e.invalidateQueries({queryKey:a.projects.detail(s.id)})}})}export{f as F,j as a,F as b,q as c,g as d,m as u};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{c as o}from"./index-
|
|
1
|
+
import{c as o}from"./index-2lw92znX.js";const e=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]],s=o("plus",e);const t=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],a=o("x",t);export{s as P,a as X};
|
package/dist/web/index.html
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
|
|
6
6
|
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, viewport-fit=cover" />
|
|
7
7
|
<title>web</title>
|
|
8
|
-
<script type="module" crossorigin src="/assets/index-
|
|
8
|
+
<script type="module" crossorigin src="/assets/index-2lw92znX.js"></script>
|
|
9
9
|
<link rel="stylesheet" crossorigin href="/assets/index-Br9066ZX.css">
|
|
10
10
|
</head>
|
|
11
11
|
<body>
|