@kaitranntt/ccs 7.50.0-dev.1 → 7.50.0-dev.10

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 (208) hide show
  1. package/README.md +65 -4
  2. package/config/base-iflow.settings.json +4 -4
  3. package/dist/api/services/profile-writer.d.ts +1 -1
  4. package/dist/api/services/profile-writer.d.ts.map +1 -1
  5. package/dist/api/services/profile-writer.js +18 -5
  6. package/dist/api/services/profile-writer.js.map +1 -1
  7. package/dist/auth/account-context.d.ts +11 -0
  8. package/dist/auth/account-context.d.ts.map +1 -1
  9. package/dist/auth/account-context.js +42 -8
  10. package/dist/auth/account-context.js.map +1 -1
  11. package/dist/auth/auth-commands.d.ts.map +1 -1
  12. package/dist/auth/auth-commands.js +9 -0
  13. package/dist/auth/auth-commands.js.map +1 -1
  14. package/dist/auth/commands/create-command-env.d.ts +3 -0
  15. package/dist/auth/commands/create-command-env.d.ts.map +1 -0
  16. package/dist/auth/commands/create-command-env.js +55 -0
  17. package/dist/auth/commands/create-command-env.js.map +1 -0
  18. package/dist/auth/commands/create-command.d.ts.map +1 -1
  19. package/dist/auth/commands/create-command.js +136 -30
  20. package/dist/auth/commands/create-command.js.map +1 -1
  21. package/dist/auth/commands/list-command.d.ts.map +1 -1
  22. package/dist/auth/commands/list-command.js +5 -1
  23. package/dist/auth/commands/list-command.js.map +1 -1
  24. package/dist/auth/commands/show-command.d.ts.map +1 -1
  25. package/dist/auth/commands/show-command.js +1 -0
  26. package/dist/auth/commands/show-command.js.map +1 -1
  27. package/dist/auth/commands/types.d.ts +3 -0
  28. package/dist/auth/commands/types.d.ts.map +1 -1
  29. package/dist/auth/commands/types.js +24 -0
  30. package/dist/auth/commands/types.js.map +1 -1
  31. package/dist/auth/profile-detector.d.ts.map +1 -1
  32. package/dist/auth/profile-detector.js +1 -0
  33. package/dist/auth/profile-detector.js.map +1 -1
  34. package/dist/auth/profile-registry.d.ts +2 -0
  35. package/dist/auth/profile-registry.d.ts.map +1 -1
  36. package/dist/auth/profile-registry.js +45 -7
  37. package/dist/auth/profile-registry.js.map +1 -1
  38. package/dist/ccs.js +46 -8
  39. package/dist/ccs.js.map +1 -1
  40. package/dist/cliproxy/account-safety.d.ts.map +1 -1
  41. package/dist/cliproxy/account-safety.js +4 -0
  42. package/dist/cliproxy/account-safety.js.map +1 -1
  43. package/dist/cliproxy/antigravity-responsibility.d.ts +36 -0
  44. package/dist/cliproxy/antigravity-responsibility.d.ts.map +1 -0
  45. package/dist/cliproxy/antigravity-responsibility.js +171 -0
  46. package/dist/cliproxy/antigravity-responsibility.js.map +1 -0
  47. package/dist/cliproxy/auth/auth-types.d.ts +2 -0
  48. package/dist/cliproxy/auth/auth-types.d.ts.map +1 -1
  49. package/dist/cliproxy/auth/oauth-handler.d.ts.map +1 -1
  50. package/dist/cliproxy/auth/oauth-handler.js +18 -0
  51. package/dist/cliproxy/auth/oauth-handler.js.map +1 -1
  52. package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
  53. package/dist/cliproxy/config/env-builder.js +57 -0
  54. package/dist/cliproxy/config/env-builder.js.map +1 -1
  55. package/dist/cliproxy/config/generator.d.ts +2 -1
  56. package/dist/cliproxy/config/generator.d.ts.map +1 -1
  57. package/dist/cliproxy/config/generator.js +18 -8
  58. package/dist/cliproxy/config/generator.js.map +1 -1
  59. package/dist/cliproxy/executor/index.d.ts.map +1 -1
  60. package/dist/cliproxy/executor/index.js +30 -0
  61. package/dist/cliproxy/executor/index.js.map +1 -1
  62. package/dist/commands/help-command.d.ts.map +1 -1
  63. package/dist/commands/help-command.js +11 -1
  64. package/dist/commands/help-command.js.map +1 -1
  65. package/dist/config/migration-manager.d.ts.map +1 -1
  66. package/dist/config/migration-manager.js +19 -0
  67. package/dist/config/migration-manager.js.map +1 -1
  68. package/dist/config/unified-config-loader.d.ts +11 -1
  69. package/dist/config/unified-config-loader.d.ts.map +1 -1
  70. package/dist/config/unified-config-loader.js +127 -59
  71. package/dist/config/unified-config-loader.js.map +1 -1
  72. package/dist/config/unified-config-types.d.ts +16 -0
  73. package/dist/config/unified-config-types.d.ts.map +1 -1
  74. package/dist/config/unified-config-types.js +8 -1
  75. package/dist/config/unified-config-types.js.map +1 -1
  76. package/dist/management/instance-manager.d.ts +1 -0
  77. package/dist/management/instance-manager.d.ts.map +1 -1
  78. package/dist/management/instance-manager.js +14 -8
  79. package/dist/management/instance-manager.js.map +1 -1
  80. package/dist/management/profile-context-sync-lock.d.ts +14 -0
  81. package/dist/management/profile-context-sync-lock.d.ts.map +1 -0
  82. package/dist/management/profile-context-sync-lock.js +174 -0
  83. package/dist/management/profile-context-sync-lock.js.map +1 -0
  84. package/dist/management/shared-manager.d.ts +18 -0
  85. package/dist/management/shared-manager.d.ts.map +1 -1
  86. package/dist/management/shared-manager.js +145 -6
  87. package/dist/management/shared-manager.js.map +1 -1
  88. package/dist/targets/droid-adapter.d.ts +1 -1
  89. package/dist/targets/droid-adapter.d.ts.map +1 -1
  90. package/dist/targets/droid-adapter.js +16 -4
  91. package/dist/targets/droid-adapter.js.map +1 -1
  92. package/dist/targets/droid-config-manager.d.ts +9 -1
  93. package/dist/targets/droid-config-manager.d.ts.map +1 -1
  94. package/dist/targets/droid-config-manager.js +131 -3
  95. package/dist/targets/droid-config-manager.js.map +1 -1
  96. package/dist/targets/droid-provider.d.ts +40 -0
  97. package/dist/targets/droid-provider.d.ts.map +1 -0
  98. package/dist/targets/droid-provider.js +140 -0
  99. package/dist/targets/droid-provider.js.map +1 -0
  100. package/dist/targets/droid-reasoning-runtime.d.ts +14 -0
  101. package/dist/targets/droid-reasoning-runtime.d.ts.map +1 -0
  102. package/dist/targets/droid-reasoning-runtime.js +42 -0
  103. package/dist/targets/droid-reasoning-runtime.js.map +1 -0
  104. package/dist/targets/index.d.ts +2 -0
  105. package/dist/targets/index.d.ts.map +1 -1
  106. package/dist/targets/index.js +4 -1
  107. package/dist/targets/index.js.map +1 -1
  108. package/dist/targets/target-adapter.d.ts +6 -0
  109. package/dist/targets/target-adapter.d.ts.map +1 -1
  110. package/dist/types/config.d.ts +2 -0
  111. package/dist/types/config.d.ts.map +1 -1
  112. package/dist/types/config.js.map +1 -1
  113. package/dist/ui/assets/accounts-y2u0CVK8.js +1 -0
  114. package/dist/ui/assets/{alert-dialog-DmrIcJav.js → alert-dialog-CetY4Iww.js} +1 -1
  115. package/dist/ui/assets/api-5q1FT1uL.js +1 -0
  116. package/dist/ui/assets/auth-section-CaQeee-F.js +1 -0
  117. package/dist/ui/assets/{backups-section-jwtuA5Ay.js → backups-section-hF88BjYJ.js} +1 -1
  118. package/dist/ui/assets/{checkbox-CNqHZx7Z.js → checkbox-Dhm5Fzkb.js} +1 -1
  119. package/dist/ui/assets/cliproxy-BeYNWmY_.js +3 -0
  120. package/dist/ui/assets/{cliproxy-control-panel--WUVyBIk.js → cliproxy-control-panel-CJELeI80.js} +1 -1
  121. package/dist/ui/assets/{confirm-dialog-CQNxkz9X.js → confirm-dialog-Dn3SrwNV.js} +1 -1
  122. package/dist/ui/assets/{copilot-DLxxmnsW.js → copilot-vwT-4_V4.js} +1 -1
  123. package/dist/ui/assets/{cursor-YRIza7sP.js → cursor-CN3lIX63.js} +1 -1
  124. package/dist/ui/assets/droid-DBP2yCY7.js +2 -0
  125. package/dist/ui/assets/globalenv-section-DNKAJasL.js +1 -0
  126. package/dist/ui/assets/{health-BWPd6F4h.js → health-C7tNiLzc.js} +1 -1
  127. package/dist/ui/assets/icons-DrewC9c3.js +1 -0
  128. package/dist/ui/assets/index-C8-ef-r7.js +1 -0
  129. package/dist/ui/assets/{index-D244tv89.js → index-MGh88HoC.js} +1 -1
  130. package/dist/ui/assets/{index-BlldLmNl.js → index-QBUSDLTx.js} +1 -1
  131. package/dist/ui/assets/index-k-HuyjpO.js +47 -0
  132. package/dist/ui/assets/index-s-oTl3hW.css +1 -0
  133. package/dist/ui/assets/index-uYnNU6Ut.js +1 -0
  134. package/dist/ui/assets/proxy-status-widget-CIm5vKY7.js +1 -0
  135. package/dist/ui/assets/{radix-ui-DIWAxjEp.js → radix-ui-C1Gpgz6I.js} +1 -1
  136. package/dist/ui/assets/{separator-OcJLDgYQ.js → separator-BLVyAGAm.js} +1 -1
  137. package/dist/ui/assets/shared-CHH09ZNi.js +8 -0
  138. package/dist/ui/assets/{switch-s8pp-m8L.js → switch-CwLyB4JK.js} +1 -1
  139. package/dist/ui/assets/{tanstack-Hn82hibe.js → tanstack-DDJIhNJd.js} +1 -1
  140. package/dist/ui/assets/{updates-BQRhDVbP.js → updates-VlxL3aum.js} +1 -1
  141. package/dist/ui/index.html +5 -5
  142. package/dist/web-server/model-pricing.d.ts.map +1 -1
  143. package/dist/web-server/model-pricing.js +114 -22
  144. package/dist/web-server/model-pricing.js.map +1 -1
  145. package/dist/web-server/routes/account-route-helpers.d.ts +20 -0
  146. package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -0
  147. package/dist/web-server/routes/account-route-helpers.js +34 -0
  148. package/dist/web-server/routes/account-route-helpers.js.map +1 -0
  149. package/dist/web-server/routes/account-routes.d.ts.map +1 -1
  150. package/dist/web-server/routes/account-routes.js +160 -27
  151. package/dist/web-server/routes/account-routes.js.map +1 -1
  152. package/dist/web-server/routes/cliproxy-auth-routes.d.ts.map +1 -1
  153. package/dist/web-server/routes/cliproxy-auth-routes.js +58 -24
  154. package/dist/web-server/routes/cliproxy-auth-routes.js.map +1 -1
  155. package/dist/web-server/routes/config-routes.d.ts.map +1 -1
  156. package/dist/web-server/routes/config-routes.js +73 -0
  157. package/dist/web-server/routes/config-routes.js.map +1 -1
  158. package/dist/web-server/routes/droid-routes.d.ts +3 -0
  159. package/dist/web-server/routes/droid-routes.d.ts.map +1 -0
  160. package/dist/web-server/routes/droid-routes.js +61 -0
  161. package/dist/web-server/routes/droid-routes.js.map +1 -0
  162. package/dist/web-server/routes/index.d.ts.map +1 -1
  163. package/dist/web-server/routes/index.js +3 -0
  164. package/dist/web-server/routes/index.js.map +1 -1
  165. package/dist/web-server/routes/profile-routes.d.ts.map +1 -1
  166. package/dist/web-server/routes/profile-routes.js +29 -3
  167. package/dist/web-server/routes/profile-routes.js.map +1 -1
  168. package/dist/web-server/routes/route-helpers.d.ts +2 -1
  169. package/dist/web-server/routes/route-helpers.d.ts.map +1 -1
  170. package/dist/web-server/routes/route-helpers.js +20 -1
  171. package/dist/web-server/routes/route-helpers.js.map +1 -1
  172. package/dist/web-server/routes/settings-routes.d.ts.map +1 -1
  173. package/dist/web-server/routes/settings-routes.js +110 -12
  174. package/dist/web-server/routes/settings-routes.js.map +1 -1
  175. package/dist/web-server/services/compatible-cli-docs-registry.d.ts +23 -0
  176. package/dist/web-server/services/compatible-cli-docs-registry.d.ts.map +1 -0
  177. package/dist/web-server/services/compatible-cli-docs-registry.js +81 -0
  178. package/dist/web-server/services/compatible-cli-docs-registry.js.map +1 -0
  179. package/dist/web-server/services/compatible-cli-json-file-service.d.ts +41 -0
  180. package/dist/web-server/services/compatible-cli-json-file-service.d.ts.map +1 -0
  181. package/dist/web-server/services/compatible-cli-json-file-service.js +205 -0
  182. package/dist/web-server/services/compatible-cli-json-file-service.js.map +1 -0
  183. package/dist/web-server/services/compatible-cli-types.d.ts +82 -0
  184. package/dist/web-server/services/compatible-cli-types.d.ts.map +1 -0
  185. package/dist/web-server/services/compatible-cli-types.js +3 -0
  186. package/dist/web-server/services/compatible-cli-types.js.map +1 -0
  187. package/dist/web-server/services/droid-dashboard-service.d.ts +29 -0
  188. package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -0
  189. package/dist/web-server/services/droid-dashboard-service.js +238 -0
  190. package/dist/web-server/services/droid-dashboard-service.js.map +1 -0
  191. package/dist/web-server/shared-routes.d.ts.map +1 -1
  192. package/dist/web-server/shared-routes.js +350 -52
  193. package/dist/web-server/shared-routes.js.map +1 -1
  194. package/lib/hooks/websearch-transformer.cjs +78 -52
  195. package/package.json +4 -2
  196. package/scripts/maintainability-check.js +163 -0
  197. package/dist/ui/assets/accounts-BKK-Lc16.js +0 -1
  198. package/dist/ui/assets/api-DzTwRtww.js +0 -1
  199. package/dist/ui/assets/auth-section-CP_2r8oJ.js +0 -1
  200. package/dist/ui/assets/cliproxy-CtO9BwgG.js +0 -3
  201. package/dist/ui/assets/globalenv-section-vUSIK5rf.js +0 -1
  202. package/dist/ui/assets/icons-Dk2sL3Mr.js +0 -1
  203. package/dist/ui/assets/index-B9dJZNls.js +0 -1
  204. package/dist/ui/assets/index-BZdHAol5.js +0 -1
  205. package/dist/ui/assets/index-DEDy1J8t.css +0 -1
  206. package/dist/ui/assets/index-PWMOllOf.js +0 -47
  207. package/dist/ui/assets/proxy-status-widget-MlyNgoPh.js +0 -1
  208. package/dist/ui/assets/shared-LxAdbm4g.js +0 -1
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-DIWAxjEp.js";import{r as y}from"./react-vendor-CNOkPC89.js";import{b9 as X,aL as Y,ba as Z,bb as _,bc as ee,bd as se,be as te,c as d,B as E,aw as ae,K as ne,N as re,q as oe,r as ie,s as le,t as ce,v as de,b as T,T as xe,o as me,p as ue,W as he}from"./index-PWMOllOf.js";import{A as ge,a as pe,b as fe,c as be,d as je,e as ye,f as Ne,g as we}from"./alert-dialog-DmrIcJav.js";import{u as L,a as ve,b as Ce,e as Se}from"./tanstack-Hn82hibe.js";import{t as V}from"./notifications-B2HqRBj7.js";import{a2 as ke,A as Pe,R as f,aI as Ve,aJ as Ae,aK as Te,X as De,S as Ie,aL as Ue,aM as $e,U as Ee,p as qe,j as Le,a1 as Re,ao as Me,T as q,av as Fe}from"./icons-Dk2sL3Mr.js";async function Ke(){const s=await fetch("/api/cliproxy/sync/status");if(!s.ok){let n="Failed to fetch sync status";try{const t=await s.json();n=t.error||t.message||n}catch{}throw new Error(n)}return s.json()}async function Be(){const s=new AbortController,n=setTimeout(()=>s.abort(),3e4);try{const t=await fetch("/api/cliproxy/sync",{method:"POST",headers:{"Content-Type":"application/json"},signal:s.signal});if(!t.ok){let a="Sync failed";try{const r=await t.json();a=r.error||r.message||a}catch{}throw new Error(a)}return t.json()}catch(t){throw t instanceof Error&&t.name==="AbortError"?new Error("Sync request timed out after 30 seconds"):t}finally{clearTimeout(n)}}function Qe(){return L({queryKey:["cliproxy-sync-status"],queryFn:Ke,refetchInterval:3e4,retry:1,staleTime:1e4})}function ze(){const s=ve();return Ce({mutationFn:Be,onSuccess:n=>{s.invalidateQueries({queryKey:["cliproxy-sync-status"]}),s.invalidateQueries({queryKey:["cliproxy-sync-preview"]}),n.syncedCount===0?V.info("No profiles to sync"):V.success(`Synced ${n.syncedCount} profile${n.syncedCount===1?"":"s"} to CLIProxy`)},onError:n=>{V.error(`Sync failed: ${n.message}`)}})}function A(s,n){const t=s.replace(/-\d+$/,"").split(".").map(Number),a=n.replace(/-\d+$/,"").split(".").map(Number);for(let r=0;r<3;r++){if((t[r]||0)>(a[r]||0))return!0;if((t[r]||0)<(a[r]||0))return!1}return!1}function Oe(s){if(!s)return"";const n=new Date(s).getTime(),a=Date.now()-n,r=Math.floor(a/(1e3*60*60)),i=Math.floor(a%(1e3*60*60)/(1e3*60));return r>0?`${r}h ${i}m`:`${i}m`}function He(s){if(!s)return"";const n=Date.now()-s,t=Math.floor(n/(1e3*60)),a=Math.floor(n/(1e3*60*60));return t<1?"just now":t<60?`${t}m ago`:`${a}h ago`}function N({icon:s,tooltip:n,onClick:t,disabled:a,isPending:r,className:i,variant:l="ghost"}){return e.jsxs(xe,{children:[e.jsx(me,{asChild:!0,children:e.jsx(T,{variant:l==="destructive-ghost"?"ghost":l,size:"sm",className:d("h-7 w-7 p-0",l==="destructive-ghost"&&"hover:bg-destructive/10 hover:text-destructive hover:border-destructive/30",i),onClick:t,disabled:a,children:r?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(s,{className:"w-3.5 h-3.5"})})}),e.jsx(ue,{side:"bottom",className:"text-xs",children:n})]})}function es(){const{data:s,isLoading:n}=X(),{data:t}=Y(),{data:a,isLoading:r}=Z(),i=_(),l=ee(),w=se(),u=te(),{data:R}=Qe(),{mutate:M,isPending:v}=ze(),[h,D]=y.useState(!1),[g,F]=y.useState(""),[K,b]=y.useState(!1),[C,S]=y.useState(null),{data:B}=L({queryKey:["cliproxy-server-config"],queryFn:()=>he.cliproxyServer.get(),staleTime:3e4}),Q=Se({mutationKey:["update-backend"]})>0,x=B?.remote,I=x?.enabled&&x?.host,p=s?.running??!1,k=i.isPending||l.isPending||w.isPending||u.isPending||Q||v,z=t?.hasUpdate??!1,m=t?.isStable===!1,U=t?.currentVersion,j=R?.configured??!1,O=j?"Sync Ready":"No Config",P=m?t?.maxStableVersion||a?.latestStable:t?.latestVersion,$=o=>{if(!o)return;const c=a?.maxStableVersion||"6.6.80";if(A(o,c)){S(o),b(!0);return}u.mutate({version:o})},H=()=>{C&&u.mutate({version:C,force:!0}),b(!1),S(null)},W=()=>{b(!1),S(null)},G=I?(()=>{const o=x.protocol||"http",c=x.port||(o==="https"?443:80);return o==="https"&&c===443||o==="http"&&c===80?x.host:`${x.host}:${c}`})():null;return I?e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors","border-blue-500/30 bg-blue-500/5"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ke,{className:"w-4 h-4 text-blue-500"}),e.jsx("span",{className:"text-sm font-medium",children:"Remote Proxy"}),e.jsx(E,{variant:"secondary",className:"text-[10px] h-4 px-1.5 bg-blue-100 text-blue-700 dark:bg-blue-900/30 dark:text-blue-400",children:"Active"})]}),e.jsx(Pe,{className:"w-3 h-3 text-blue-600"})]}),e.jsxs("div",{className:"mt-2 text-xs text-muted-foreground",children:[e.jsx("div",{className:"flex items-center gap-1 mb-1",children:e.jsx("span",{className:"font-mono",children:G})}),e.jsx("p",{className:"text-[10px] text-muted-foreground/70 leading-tight",children:"Traffic auto-routed to remote server"})]})]}):e.jsx(ae,{delayDuration:300,children:e.jsxs("div",{className:d("rounded-lg border p-3 transition-colors",p?"border-green-500/30 bg-green-500/5":"border-muted bg-muted/30"),children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:d("w-2 h-2 rounded-full",p?"bg-green-500 animate-pulse":"bg-muted-foreground/30")}),e.jsx("span",{className:"text-sm font-medium",children:t?.backendLabel??"CLIProxy"})]}),e.jsxs("div",{className:"flex items-center gap-1",children:[n?e.jsx(f,{className:"w-3 h-3 animate-spin text-muted-foreground"}):p?e.jsxs(e.Fragment,{children:[e.jsx(N,{icon:v?f:Ve,tooltip:"Sync profiles to CLIProxy",onClick:()=>M(),disabled:!j||k,isPending:v}),e.jsx(N,{icon:Ae,tooltip:"Restart",onClick:()=>w.mutate(),disabled:k,isPending:w.isPending}),e.jsx(N,{icon:Te,tooltip:"Stop",onClick:()=>l.mutate(),disabled:k,isPending:l.isPending,variant:"destructive-ghost"})]}):null,e.jsx(N,{icon:h?De:Ie,tooltip:h?"Close":"Version settings",onClick:()=>D(!h),className:h?"bg-muted":void 0})]})]}),U&&e.jsxs("div",{className:"mt-1.5 flex items-center gap-2",children:[e.jsxs("span",{className:d("text-xs font-mono text-muted-foreground",m&&"text-amber-600 dark:text-amber-400"),children:["v",U]}),(z||m)&&P&&e.jsxs(E,{variant:"secondary",className:d("text-[10px] h-4 px-1.5 gap-0.5 cursor-pointer transition-colors",m?"bg-amber-100 text-amber-700 hover:bg-amber-200 dark:bg-amber-900/30 dark:text-amber-400 dark:hover:bg-amber-900/50":"bg-green-100 text-green-700 hover:bg-green-200 dark:bg-green-900/30 dark:text-green-400 dark:hover:bg-green-900/50"),onClick:()=>$(P),title:`Click to ${m?"downgrade":"update"}`,children:[m?e.jsx(Ue,{className:"w-2.5 h-2.5"}):e.jsx($e,{className:"w-2.5 h-2.5"}),P]})]}),p&&s&&e.jsxs("div",{className:"mt-2 flex items-center gap-4 text-xs text-muted-foreground",children:[e.jsxs("span",{className:"flex items-center gap-1",children:["Port ",s.port]}),s.sessionCount!==void 0&&s.sessionCount>0&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(Ee,{className:"w-3 h-3"}),s.sessionCount," session",s.sessionCount!==1?"s":""]}),s.startedAt&&e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(qe,{className:"w-3 h-3"}),Oe(s.startedAt)]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-xs",children:[j?e.jsx(Le,{className:"w-3 h-3 text-green-600 dark:text-green-400"}):e.jsx(Re,{className:"w-3 h-3 text-muted-foreground"}),e.jsx("span",{className:d("text-xs",j?"text-green-600 dark:text-green-400":"text-muted-foreground"),children:O})]}),e.jsx(ne,{open:h,onOpenChange:D,children:e.jsxs(re,{className:"mt-3 pt-3 border-t border-muted",children:[e.jsx("h4",{className:"text-xs font-medium text-muted-foreground mb-3",children:"Version Management"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs(oe,{value:g,onValueChange:F,disabled:r,children:[e.jsx(ie,{className:"h-8 text-xs flex-1",children:e.jsx(le,{placeholder:"Select version to install..."})}),e.jsx(ce,{children:a?.versions.slice(0,20).map(o=>{const c=a?.maxStableVersion&&A(o,a.maxStableVersion);return e.jsx(de,{value:o,className:"text-xs",children:e.jsxs("span",{className:"flex items-center gap-2",children:["v",o,o===a.latestStable&&e.jsx("span",{className:"text-green-600 dark:text-green-400",children:"(stable)"}),c&&e.jsx("span",{className:"text-amber-600 dark:text-amber-400",children:"⚠"})]})},o)})})]}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-8 text-xs gap-1.5 px-3",onClick:()=>$(g),disabled:u.isPending||!g,children:[u.isPending?e.jsx(f,{className:"w-3.5 h-3.5 animate-spin"}):e.jsx(Me,{className:"w-3.5 h-3.5"}),"Install"]})]}),g&&a?.maxStableVersion&&A(g,a.maxStableVersion)&&e.jsxs("div",{className:"mt-2 flex items-center gap-1.5 text-[11px] text-amber-600 dark:text-amber-400",children:[e.jsx(q,{className:"w-3.5 h-3.5 flex-shrink-0"}),e.jsxs("span",{children:["Versions above ",a.maxStableVersion," have known issues"]})]}),t?.checkedAt&&e.jsxs("div",{className:"mt-2 text-[10px] text-muted-foreground/60",children:["Last checked ",He(t.checkedAt)]})]})}),!p&&e.jsxs("div",{className:"mt-2 flex items-center justify-between",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Not running"}),e.jsxs(T,{variant:"outline",size:"sm",className:"h-7 text-xs gap-1",onClick:()=>i.mutate(),disabled:i.isPending,children:[i.isPending?e.jsx(f,{className:"w-3 h-3 animate-spin"}):e.jsx(Fe,{className:"w-3 h-3"}),"Start"]})]}),e.jsx(ge,{open:K,onOpenChange:b,children:e.jsxs(pe,{children:[e.jsxs(fe,{children:[e.jsxs(be,{className:"flex items-center gap-2",children:[e.jsx(q,{className:"w-5 h-5 text-amber-500"}),"Install Unstable Version?"]}),e.jsxs(je,{className:"space-y-2",children:[e.jsxs("p",{children:["You are about to install ",e.jsxs("strong",{children:["v",C]}),", which is above the maximum stable version"," ",e.jsxs("strong",{children:["v",a?.maxStableVersion||"6.6.80"]}),"."]}),e.jsx("p",{className:"text-amber-600 dark:text-amber-400",children:"This version has known stability issues and may cause unexpected behavior."}),e.jsx("p",{children:"Are you sure you want to proceed?"})]})]}),e.jsxs(ye,{children:[e.jsx(Ne,{onClick:W,children:"Cancel"}),e.jsx(we,{onClick:H,className:"bg-amber-500 hover:bg-amber-600 text-white",children:"Install Anyway"})]})]})})]})})}export{es as P};
@@ -1 +0,0 @@
1
- import{j as s}from"./radix-ui-DIWAxjEp.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{aY as o,aZ as m,a_ as c,a$ as x,b0 as u,b as h,C as p,a as g}from"./index-PWMOllOf.js";import{N as j,a0 as f,aA as N,T as b}from"./icons-Dk2sL3Mr.js";import"./tanstack-Hn82hibe.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";function B(){const[t,i]=l.useState("commands"),{data:e}=o(),{data:n,isLoading:r}=m(t),d=[{id:"commands",label:"Commands",icon:j,count:e?.commands??0},{id:"skills",label:"Skills",icon:f,count:e?.skills??0},{id:"agents",label:"Agents",icon:N,count:e?.agents??0}];return s.jsxs("div",{className:"p-6 max-w-6xl mx-auto space-y-8",children:[s.jsxs("div",{children:[s.jsx("h1",{className:"text-2xl font-bold",children:"Shared Data"}),s.jsx("p",{className:"text-muted-foreground",children:"Commands, skills, and agents shared across Claude instances"})]}),e&&!e.symlinkStatus.valid&&s.jsxs(c,{variant:"warning",children:[s.jsx(b,{className:"h-4 w-4"}),s.jsx(x,{children:"Configuration Required"}),s.jsxs(u,{children:[e.symlinkStatus.message,". Run `ccs sync` to configure."]})]}),s.jsx("div",{className:"flex gap-2 border-b pb-2",children:d.map(a=>s.jsxs(h,{variant:t===a.id?"default":"ghost",size:"sm",onClick:()=>i(a.id),className:"flex items-center gap-2",children:[s.jsx(a.icon,{className:"w-4 h-4"}),a.label," (",a.count,")"]},a.id))}),s.jsx("div",{className:"mt-4",children:r?s.jsx("div",{className:"text-muted-foreground",children:"Loading..."}):n?.items.length===0?s.jsxs("div",{className:"text-muted-foreground",children:["No ",t," found"]}):s.jsx("div",{className:"grid gap-3",children:n?.items.map(a=>s.jsx(p,{children:s.jsxs(g,{children:[s.jsx("div",{className:"font-medium",children:a.name}),s.jsx("p",{className:"text-sm text-muted-foreground mt-1",children:a.description}),s.jsx("p",{className:"text-xs text-muted-foreground mt-2 font-mono truncate",children:a.path})]})},a.name))})})]})}export{B as SharedPage};