@kaitranntt/ccs 7.69.1-dev.3 → 7.69.1-dev.5

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 (54) hide show
  1. package/dist/cliproxy/binary/version-cache.d.ts +10 -0
  2. package/dist/cliproxy/binary/version-cache.d.ts.map +1 -1
  3. package/dist/cliproxy/binary/version-cache.js +29 -7
  4. package/dist/cliproxy/binary/version-cache.js.map +1 -1
  5. package/dist/cliproxy/binary/version-checker.d.ts +14 -3
  6. package/dist/cliproxy/binary/version-checker.d.ts.map +1 -1
  7. package/dist/cliproxy/binary/version-checker.js +65 -36
  8. package/dist/cliproxy/binary/version-checker.js.map +1 -1
  9. package/dist/ui/assets/accounts-DamxGxu1.js +1 -0
  10. package/dist/ui/assets/{alert-dialog-BA39vaYL.js → alert-dialog-sars2LJq.js} +1 -1
  11. package/dist/ui/assets/{api-D2cjf1H4.js → api-DHF10LeP.js} +1 -1
  12. package/dist/ui/assets/{auth-section-BNX8_9MJ.js → auth-section-BNmbrWhd.js} +1 -1
  13. package/dist/ui/assets/{backups-section-Bt0FA5zl.js → backups-section-DGURGm2o.js} +1 -1
  14. package/dist/ui/assets/channels-B0j9pbpo.js +1 -0
  15. package/dist/ui/assets/{checkbox-DHF-UBrH.js → checkbox-DQIFU7Wu.js} +1 -1
  16. package/dist/ui/assets/claude-extension-qxiVTjYL.js +1 -0
  17. package/dist/ui/assets/{cliproxy-CD7z-_q8.js → cliproxy-CdvU0y2i.js} +1 -1
  18. package/dist/ui/assets/{cliproxy-ai-providers-QSOOqh8F.js → cliproxy-ai-providers-zgUBcUcJ.js} +1 -1
  19. package/dist/ui/assets/{cliproxy-control-panel-D9dLU28p.js → cliproxy-control-panel-S6FdJjgh.js} +1 -1
  20. package/dist/ui/assets/codex-B79sHpGl.js +27 -0
  21. package/dist/ui/assets/{confirm-dialog-BICDz_zm.js → confirm-dialog-DwrX5gr_.js} +1 -1
  22. package/dist/ui/assets/{copilot-BnQrRCuJ.js → copilot-CgE4vyvS.js} +1 -1
  23. package/dist/ui/assets/{cursor-CXopLKfC.js → cursor-rYsOav5G.js} +1 -1
  24. package/dist/ui/assets/{droid-CLFg9ELE.js → droid-CQlRU59Q.js} +1 -1
  25. package/dist/ui/assets/{globalenv-section-NPjCcYBN.js → globalenv-section-DSQ3m4Ei.js} +1 -1
  26. package/dist/ui/assets/{health-B_3JpCrY.js → health-DE-wdzdl.js} +1 -1
  27. package/dist/ui/assets/{index-B5Egq7qY.js → index-BcJqrfhu.js} +1 -1
  28. package/dist/ui/assets/{index-BgGHTjTd.js → index-BwtPYSbP.js} +1 -1
  29. package/dist/ui/assets/{index-BY2j-o67.js → index-C5VFMOG4.js} +1 -1
  30. package/dist/ui/assets/index-CqJW-L_1.js +1 -0
  31. package/dist/ui/assets/{index-BcUkpsGj.js → index-D1jFmelj.js} +1 -1
  32. package/dist/ui/assets/index-g2g1k0QS.js +72 -0
  33. package/dist/ui/assets/{logs-Bb1OVYeK.js → logs-CDpci_AI.js} +1 -1
  34. package/dist/ui/assets/{masked-input-b4-lEKNq.js → masked-input-DXzbXJrE.js} +1 -1
  35. package/dist/ui/assets/{proxy-status-widget-s89zaj3X.js → proxy-status-widget-DCQBVSBP.js} +1 -1
  36. package/dist/ui/assets/{raw-json-settings-editor-panel-Dr_BNQwQ.js → raw-json-settings-editor-panel-Db_WTo0f.js} +1 -1
  37. package/dist/ui/assets/{searchable-select-FJPe_YWv.js → searchable-select-CHzzY0Km.js} +1 -1
  38. package/dist/ui/assets/{separator-DJ0ku_ak.js → separator-Bd4OFZm5.js} +1 -1
  39. package/dist/ui/assets/{shared-DyQlJnbj.js → shared-B8K097LC.js} +1 -1
  40. package/dist/ui/assets/{table-6Yg65ZZH.js → table-7IypCMku.js} +1 -1
  41. package/dist/ui/assets/updates-4X5hHhUg.js +1 -0
  42. package/dist/ui/index.html +1 -1
  43. package/dist/web-server/routes/cliproxy-stats-routes.d.ts +37 -0
  44. package/dist/web-server/routes/cliproxy-stats-routes.d.ts.map +1 -1
  45. package/dist/web-server/routes/cliproxy-stats-routes.js +56 -10
  46. package/dist/web-server/routes/cliproxy-stats-routes.js.map +1 -1
  47. package/package.json +1 -1
  48. package/dist/ui/assets/accounts-DN0lP-yj.js +0 -1
  49. package/dist/ui/assets/channels-FaDUjf3Y.js +0 -1
  50. package/dist/ui/assets/claude-extension-D-skBToQ.js +0 -1
  51. package/dist/ui/assets/codex-CHO5_hku.js +0 -27
  52. package/dist/ui/assets/index-DNmWbKbN.js +0 -72
  53. package/dist/ui/assets/index-DZddoGfE.js +0 -1
  54. package/dist/ui/assets/updates-DSCXb6Au.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as e}from"./radix-ui-Zb8sVEtn.js";import{L,r as c}from"./react-vendor-CNOkPC89.js";import{a as x,B as P,c as S,W as M,d as u,x as U,C,j as v,k as N,_ as w,b as j,n as b,I as B}from"./index-g2g1k0QS.js";import{a1 as F,$ as z,b8 as W,x as H,E as Q,Q as G,aa as K,C as q,b9 as J,au as V}from"./icons-KVCk4_U8.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const Y={new:"border-blue-200 bg-blue-50 text-blue-700 dark:border-blue-900/50 dark:bg-blue-900/20 dark:text-blue-300",stable:"border-green-200 bg-green-50 text-green-700 dark:border-green-900/50 dark:bg-green-900/20 dark:text-green-300",planned:"border-amber-200 bg-amber-50 text-amber-700 dark:border-amber-900/50 dark:bg-amber-900/20 dark:text-amber-300"};function Z({status:t,className:s}){const{t:r}=x(),i={new:r("updates.statusNew"),stable:r("updates.statusStable"),planned:r("updates.statusPlanned")};return e.jsx(P,{variant:"outline",className:S("font-medium",Y[t],s),children:i[t]})}const g={target:"Target CLI",cliproxy:"CLIProxy Provider","api-profiles":"API Profile",websearch:"WebSearch"},X=[{id:"codex-target-runtime-support",title:"Native Codex runtime support is live",summary:"Codex now participates as a first-class runtime target through ccs-codex, ccsx, ccsxp, or --target codex.",primaryAction:"Use Codex as a runtime target for native Codex sessions and Codex-routed CLIProxy flows.",publishedAt:"2026-03-28",status:"new",scopes:["target","cliproxy","api-profiles"],entryIds:["codex-target","codex-cliproxy"],highlights:["Use ccs-codex or ccsx for native Codex runs.","Use ccsxp for the built-in CCS Codex provider shortcut on native Codex.","Built-in Codex and Codex bridge profiles can run on native Codex with --target codex.","Saved default targets for API profiles and variants can now be claude, droid, or codex."],actions:[{id:"copy-codex-alias-command",label:"Open native Codex",description:"Launch Codex through the explicit CCS runtime alias.",type:"command",command:"ccs-codex"},{id:"copy-codex-provider-command",label:"Run built-in Codex on Codex",description:"Use the built-in Codex provider shortcut on native Codex.",type:"command",command:'ccsxp "your prompt"'},{id:"copy-codex-provider-command-explicit",label:"Run built-in Codex on Codex (explicit)",description:"Use the explicit built-in Codex provider route on native Codex.",type:"command",command:'ccs codex --target codex "your prompt"'},{id:"open-codex-dashboard",label:"Open Codex dashboard",description:"Review Codex runtime support, config layers, and dashboard setup flows.",type:"route",path:"/codex"}],routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx",'ccsxp "your prompt"','ccs codex --target codex "your prompt"']},{id:"droid-target-support",title:"Factory Droid support is live",summary:"API Profiles and CLIProxy variants now support Droid as a first-class execution target.",primaryAction:"Set Droid as your default execution target for non-Claude workflows.",publishedAt:"2026-02-25",status:"new",scopes:["target","api-profiles","cliproxy"],entryIds:["droid-target","custom-api-profiles","codex-cliproxy","agy-cliproxy"],highlights:["Set default target to Droid when creating or editing API Profiles.","Set default target to Droid for CLIProxy variants, including Codex and Antigravity flows.","Use ccs-droid as the explicit alias, with ccsd kept as the legacy shortcut."],actions:[{id:"open-api-profiles",label:"Set default target in API Profiles",description:"Open API Profiles and set Default Target to Droid for profiles you run often.",type:"route",path:"/providers"},{id:"open-cliproxy",label:"Set default target in CLIProxy variants",description:"Open CLIProxy variants and set target to Droid for Codex/Antigravity or custom variants.",type:"route",path:"/cliproxy"},{id:"copy-ccs-droid-command",label:"Run once with explicit Droid alias",description:"Use ccs-droid to force the Droid target with your current profile.",type:"command",command:"ccs-droid glm"},{id:"copy-target-override",label:"Run once with --target override",description:"Keep your default profile but force Droid for a single command.",type:"command",command:'ccs codex --target droid "your prompt"'}],routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm",'ccs codex --target droid "your prompt"',"ccs cliproxy create mycodex --provider codex --target droid"]},{id:"updates-center-launch",title:"Updates Center is available for rollout tasks",summary:"A focused Updates Center exists for setup tasks and rollout guidance when you need it.",primaryAction:"Use this page only when needed for rollout tasks, then return to your normal workflow.",publishedAt:"2026-02-25",status:"new",scopes:["target","cliproxy","api-profiles","websearch"],entryIds:["droid-target","codex-cliproxy","custom-api-profiles","opencode-websearch"],highlights:["Single data source powers update content and integration mapping.","Notices can be tracked as new, seen, done, or dismissed.","Catalog covers target CLI, CLIProxy providers, and WebSearch integrations."],actions:[{id:"open-updates-page",label:"Open Updates Center when needed",description:"Review rollout tasks only when you want guided setup changes.",type:"route",path:"/updates"},{id:"copy-open-dashboard",label:"Open dashboard from terminal",description:"Re-open config dashboard anytime from CLI.",type:"command",command:"ccs config"}],routes:[{label:"Updates Center",path:"/updates"}],commands:["ccs config"]}],ee=[{id:"claude-target",name:"Claude Code",scope:"target",status:"stable",summary:"Default runtime target for all CCS profile types.",pillars:{baseUrl:"From profile settings (ANTHROPIC_BASE_URL)",auth:"From profile settings (ANTHROPIC_AUTH_TOKEN)",model:"From profile settings (ANTHROPIC_MODEL)"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs",'ccs glm "your prompt"']},{id:"droid-target",name:"Factory Droid",scope:"target",status:"new",summary:"First-class target for API Profiles and CLIProxy variants.",pillars:{baseUrl:"From profile or variant settings",auth:"From profile or variant settings",model:"From profile or variant settings"},routes:[{label:"API Profiles",path:"/providers"},{label:"CLIProxy",path:"/cliproxy"}],commands:["ccs-droid glm","ccs km --target droid","ccs codex --target droid"],notes:"Use ccs-droid as the explicit runtime alias. Legacy ccsd still works."},{id:"codex-target",name:"Codex CLI",scope:"target",status:"new",summary:"First-class runtime target for native Codex sessions and Codex-routed CLIProxy flows.",pillars:{baseUrl:"Native ~/.codex config for default mode, transient -c overrides for CCS-backed routes",auth:"Native Codex auth for default mode, env_key injection for CCS-backed routes",model:"Native Codex config or routed Codex model mapping from CLIProxy"},routes:[{label:"Codex CLI",path:"/codex"}],commands:["ccs-codex","ccsx","ccs codex --target codex","ccs codex-api --target codex"],notes:"Saved default targets for API profiles and CLIProxy variants can now be claude, droid, or codex."},{id:"codex-cliproxy",name:"Codex via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed provider with configurable variant model and a native Codex shortcut.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:['ccsxp "your prompt"',"ccs codex --target codex","ccs codex","ccs cliproxy create mycodex --provider codex","ccs api create codex-api --cliproxy-provider codex"],notes:"Use ccsxp when you want the built-in Codex provider on native Codex without retyping --target codex."},{id:"gemini-cliproxy",name:"Gemini via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Gemini provider with multi-account management.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs gemini","ccs cliproxy create mygem --provider gemini"]},{id:"agy-cliproxy",name:"Antigravity via CLIProxy",scope:"cliproxy",status:"stable",summary:"OAuth-backed Antigravity provider with variant target controls.",pillars:{baseUrl:"Managed by CLIProxy backend",auth:"OAuth account via CLIProxy auth flow",model:"Selectable per provider or variant"},routes:[{label:"CLIProxy",path:"/cliproxy"},{label:"Control Panel",path:"/cliproxy/control-panel"}],commands:["ccs agy","ccs cliproxy create myagy --provider agy --target droid"]},{id:"custom-api-profiles",name:"Custom API Profiles",scope:"api-profiles",status:"stable",summary:"Any Anthropic-compatible endpoint with per-profile target and model mapping.",pillars:{baseUrl:"User-defined endpoint",auth:"User-defined token/key",model:"User-defined model identifier"},routes:[{label:"API Profiles",path:"/providers"}],commands:["ccs api create myprofile",'ccs myprofile "your prompt"']},{id:"opencode-websearch",name:"OpenCode WebSearch",scope:"websearch",status:"stable",summary:"WebSearch provider surfaced in Settings for third-party profile workflows.",pillars:{baseUrl:"Managed by OpenCode CLI integration",auth:"Provider-specific (managed externally)",model:"Configurable in WebSearch settings"},routes:[{label:"Settings",path:"/settings"}],commands:["ccs config",'ccs codex "your prompt"'],notes:"Enable OpenCode in Settings > WebSearch to activate fallback search."}];function l(t,s,r){return M.t(t,{defaultValue:s,...r})}function te(){return{target:l("supportCatalog.scope.target",g.target),cliproxy:l("supportCatalog.scope.cliproxy",g.cliproxy),"api-profiles":l("supportCatalog.scope.apiProfiles",g["api-profiles"]),websearch:l("supportCatalog.scope.websearch",g.websearch)}}function se(t){return{...t,title:l(`supportCatalog.notice.${t.id}.title`,t.title),summary:l(`supportCatalog.notice.${t.id}.summary`,t.summary),primaryAction:l(`supportCatalog.notice.${t.id}.primaryAction`,t.primaryAction),highlights:t.highlights.map((s,r)=>l(`supportCatalog.notice.${t.id}.highlight.${r}`,s)),actions:t.actions.map(s=>({...s,label:l(`supportCatalog.notice.${t.id}.action.${s.id}.label`,s.label),description:l(`supportCatalog.notice.${t.id}.action.${s.id}.description`,s.description)})),routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.notice.${t.id}.route.${r}.label`,s.label)}))}}function re(t){return{...t,name:l(`supportCatalog.entry.${t.id}.name`,t.name),summary:l(`supportCatalog.entry.${t.id}.summary`,t.summary),pillars:{baseUrl:l(`supportCatalog.entry.${t.id}.pillar.baseUrl`,t.pillars.baseUrl),auth:l(`supportCatalog.entry.${t.id}.pillar.auth`,t.pillars.auth),model:l(`supportCatalog.entry.${t.id}.pillar.model`,t.pillars.model)},routes:t.routes.map((s,r)=>({...s,label:l(`supportCatalog.entry.${t.id}.route.${r}.label`,s.label)})),notes:t.notes?l(`supportCatalog.entry.${t.id}.notes`,t.notes):t.notes}}function ae(){return X.map(se)}function oe(){return ee.map(re)}function ie(t){const s=new Map(oe().map(r=>[r.id,r]));return t.entryIds.map(r=>s.get(r)).filter(r=>!!r)}function O(t){const s=new Date(`${t}T00:00:00Z`);return Number.isNaN(s.getTime())?t:new Intl.DateTimeFormat(void 0,{year:"numeric",month:"short",day:"numeric",timeZone:"UTC"}).format(s)}const $="ccs:updates:notice-progress:v1";function de(t){return t==="new"?"new":"seen"}function m(t,s){return s[t.id]??de(t.status)}function A(t){return t!=="done"&&t!=="dismissed"}function le(){if(typeof window>"u")return{};try{const t=window.localStorage.getItem($);if(!t)return{};const s=JSON.parse(t);if(!s||typeof s!="object"||Array.isArray(s))return{};const r={};for(const[i,d]of Object.entries(s))typeof i=="string"&&(d==="new"||d==="seen"||d==="done"||d==="dismissed")&&(r[i]=d);return r}catch{return{}}}function ne(t){typeof window>"u"||window.localStorage.setItem($,JSON.stringify(t))}function D({state:t,className:s}){const{t:r}=x(),i={new:{label:r("updates.progressNeedsAction"),className:"border-amber-300/70 bg-amber-100/70 text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/15 dark:text-amber-300",showDot:!0},seen:{label:r("updates.progressInReview"),className:"border-blue-300/70 bg-blue-100/70 text-blue-800 dark:border-blue-500/40 dark:bg-blue-500/15 dark:text-blue-300"},done:{label:r("updates.progressDone"),className:"border-emerald-300/70 bg-emerald-100/70 text-emerald-800 dark:border-emerald-500/40 dark:bg-emerald-500/15 dark:text-emerald-300"},dismissed:{label:r("updates.progressDismissed"),className:"border-muted-foreground/20 bg-muted text-muted-foreground dark:border-muted-foreground/30"}}[t];return e.jsxs(P,{variant:"outline",className:S("gap-1.5 border text-[10px] font-medium",i.className,s),children:[i.showDot&&e.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-current"}),i.label]})}function ce({action:t}){const{t:s}=x();return e.jsxs("div",{className:"rounded-md border bg-muted/20 p-3",children:[e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-0.5",children:[e.jsx("p",{className:"text-sm font-medium",children:t.label}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t.description})]}),t.type==="route"&&t.path&&e.jsx(u,{size:"sm",asChild:!0,children:e.jsxs(L,{to:t.path,children:[s("updates.open"),e.jsx(F,{className:"h-3.5 w-3.5"})]})})]}),t.type==="command"&&t.command&&e.jsxs("div",{className:"mt-2 flex items-center gap-2 rounded-md border bg-background px-2 py-1.5",children:[e.jsx(z,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("code",{className:"min-w-0 flex-1 truncate text-[11px]",children:t.command}),e.jsx(U,{value:t.command})]})]})}function pe({notice:t,progress:s,relatedEntries:r,onUpdateProgress:i}){const{t:d}=x(),f=te();return t?e.jsxs("div",{className:"flex-1 min-w-0 bg-background grid grid-rows-[auto_minmax(0,1fr)] overflow-hidden",children:[e.jsxs("div",{className:"border-b bg-background px-4 py-3",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("h2",{className:"text-base font-semibold leading-tight",children:t.title}),e.jsx("p",{className:"text-sm text-muted-foreground",children:t.summary})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[s&&e.jsx(D,{state:s}),e.jsx(Z,{status:t.status})]})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2 text-xs text-muted-foreground",children:[e.jsx(W,{className:"h-3.5 w-3.5"}),e.jsx("span",{children:d("updates.published",{date:O(t.publishedAt)})})]}),e.jsxs("div",{className:"mt-3 flex flex-wrap gap-2",children:[e.jsxs(u,{size:"sm",onClick:()=>i("done"),children:[e.jsx(H,{className:"h-4 w-4"}),d("updates.markDone")]}),e.jsxs(u,{size:"sm",variant:"outline",onClick:()=>i("dismissed"),children:[e.jsx(Q,{className:"h-4 w-4"}),d("updates.dismiss")]}),e.jsxs(u,{size:"sm",variant:"ghost",onClick:()=>i("new"),children:[e.jsx(G,{className:"h-4 w-4"}),d("updates.reopen")]})]})]}),e.jsx("div",{className:"min-h-0 p-4",children:e.jsxs("div",{className:"grid h-full gap-4 xl:grid-cols-[minmax(0,1.5fr)_minmax(320px,1fr)] overflow-hidden",children:[e.jsxs(C,{className:"h-full overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(K,{className:"h-4 w-4 text-primary"}),e.jsx(N,{className:"text-base",children:d("updates.doNext")})]}),e.jsx(w,{children:t.primaryAction})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-3",children:t.actions.map(o=>e.jsx(ce,{action:o},`${t.id}-${o.id}`))})})})]}),e.jsxs("div",{className:"grid h-full grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-4 overflow-hidden",children:[e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.impactedIntegrations")}),e.jsx(w,{children:d("updates.impactedDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("div",{className:"space-y-2",children:r.map(o=>e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5",children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsx("p",{className:"min-w-0 truncate text-sm font-medium",children:o.name}),e.jsx(P,{variant:"outline",className:"h-5 px-1.5 text-[10px]",children:f[o.scope]})]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[o.routes[0]&&e.jsx(u,{size:"sm",variant:"outline",asChild:!0,children:e.jsx(L,{to:o.routes[0].path,children:o.routes[0].label})}),o.commands[0]&&e.jsxs("div",{className:"ml-auto flex min-w-0 items-center gap-1.5",children:[e.jsx("code",{className:"truncate rounded bg-background px-1.5 py-0.5 text-[11px]",children:o.commands[0]}),e.jsx(U,{value:o.commands[0]})]})]})]},o.id))})})})]}),e.jsxs(C,{className:"overflow-hidden",children:[e.jsxs(v,{className:"pb-3",children:[e.jsx(N,{className:"text-base",children:d("updates.whyMatters")}),e.jsx(w,{children:d("updates.whyMattersDesc")})]}),e.jsx(j,{className:"min-h-0",children:e.jsx(b,{className:"h-full pr-2",children:e.jsx("ul",{className:"space-y-2 text-sm text-muted-foreground",children:t.highlights.map(o=>e.jsxs("li",{children:["- ",o]},`${t.id}-${o}`))})})})]})]})]})})]}):e.jsx("div",{className:"flex h-full items-center justify-center rounded-lg border border-dashed bg-muted/20 p-6",children:e.jsx("p",{className:"text-sm text-muted-foreground",children:d("updates.noUpdates")})})}function me({notice:t,progress:s,selected:r,onSelect:i}){return e.jsxs("button",{type:"button",onClick:i,className:S("w-full rounded-lg border px-3 py-3 text-left transition-colors",r?"border-primary/30 bg-primary/10":"border-transparent bg-background/40 hover:border-border hover:bg-muted/70"),children:[e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0 space-y-1",children:[e.jsx("p",{className:"truncate text-sm font-medium",children:t.title}),e.jsx("p",{className:"line-clamp-2 text-xs text-muted-foreground",children:t.primaryAction})]}),e.jsx(q,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"})]}),e.jsxs("div",{className:"mt-2 flex items-center justify-between gap-2",children:[e.jsx("span",{className:"text-[11px] text-muted-foreground",children:O(t.publishedAt)}),e.jsx(D,{state:s})]})]})}function ue(t,s){return s?[t.title,t.summary,t.primaryAction,...t.highlights,...t.commands,...t.actions.map(i=>`${i.label} ${i.description} ${i.command||""}`),...t.routes.map(i=>i.label)].join(" ").toLowerCase().includes(s):!0}function je(){const{t}=x(),s=[...ae()].sort((a,n)=>n.publishedAt.localeCompare(a.publishedAt)),[r,i]=c.useState("inbox"),[d,f]=c.useState(""),[o,I]=c.useState(()=>le()),[k,E]=c.useState(null);c.useEffect(()=>{ne(o)},[o]);const h=c.useMemo(()=>{const a=d.trim().toLowerCase();return s.filter(n=>{const y=m(n,o);return ue(n,a)?r==="done"?y==="done":r==="inbox"?A(y):!0:!1})},[s,o,d,r]),p=c.useMemo(()=>{const a=r==="all"?s:h;return a.find(n=>n.id===k)??a[0]??null},[s,k,r,h]),R=a=>{E(a.id),I(n=>m(a,n)!=="new"?n:{...n,[a.id]:"seen"})},T=c.useMemo(()=>s.filter(a=>A(m(a,o))).length,[s,o]),_=c.useMemo(()=>s.filter(a=>m(a,o)==="done").length,[s,o]);return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"w-80 border-r bg-muted/30 flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(J,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:t("updates.inboxTitle")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("updates.inboxSubtitle")})]}),e.jsxs("div",{className:"grid grid-cols-2 gap-2 text-xs",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.needsAction")}),e.jsx("p",{className:"text-base font-semibold",children:T})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-1.5",children:[e.jsx("p",{className:"text-muted-foreground",children:t("updates.doneCount")}),e.jsx("p",{className:"text-base font-semibold",children:_})]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(V,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(B,{value:d,onChange:a=>f(a.target.value),placeholder:t("updates.searchPlaceholder"),className:"h-9 pl-8"})]}),e.jsx("div",{className:"flex flex-wrap gap-1.5",children:[{id:"inbox",label:t("updates.actionRequired")},{id:"done",label:t("updates.done")},{id:"all",label:t("updates.all")}].map(a=>e.jsx(u,{size:"sm",variant:r===a.id?"default":"outline",onClick:()=>i(a.id),children:a.label},a.id))})]}),e.jsx(b,{className:"flex-1",children:e.jsx("div",{className:"space-y-2 p-2",children:h.length===0?e.jsx("div",{className:"rounded-md border border-dashed p-3 text-xs text-muted-foreground",children:t("updates.noNotices")}):h.map(a=>e.jsx(me,{notice:a,progress:m(a,o),selected:p?.id===a.id,onSelect:()=>R(a)},a.id))})})]}),e.jsx(pe,{notice:p,progress:p?m(p,o):null,relatedEntries:p?ie(p):[],onUpdateProgress:a=>{p&&I(n=>({...n,[p.id]:a}))}})]})}export{je as UpdatesPage};
@@ -24,7 +24,7 @@
24
24
  href="https://fonts.googleapis.com/css2?family=IBM+Plex+Sans:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap"
25
25
  rel="stylesheet"
26
26
  />
27
- <script type="module" crossorigin src="/assets/index-DNmWbKbN.js"></script>
27
+ <script type="module" crossorigin src="/assets/index-g2g1k0QS.js"></script>
28
28
  <link rel="modulepreload" crossorigin href="/assets/react-vendor-CNOkPC89.js">
29
29
  <link rel="modulepreload" crossorigin href="/assets/radix-ui-Zb8sVEtn.js">
30
30
  <link rel="modulepreload" crossorigin href="/assets/tanstack-CrmUhA7Z.js">
@@ -1,6 +1,8 @@
1
1
  /**
2
2
  * CLIProxy Stats Routes - Stats, status, models, error logs for CLIProxyAPI
3
3
  */
4
+ import { checkCliproxyUpdate, getInstalledCliproxyVersion } from '../../cliproxy/binary-manager';
5
+ import { fetchAllVersions } from '../../cliproxy/binary/version-checker';
4
6
  declare const router: import("express-serve-static-core").Router;
5
7
  /**
6
8
  * Cache only stable failures; skip transient network errors (timeouts, 429s, 5xx).
@@ -14,5 +16,40 @@ export declare function shouldCacheQuotaResult(result: {
14
16
  retryable?: boolean;
15
17
  error?: string;
16
18
  }): boolean;
19
+ /** Get configured backend from config */
20
+ declare function getConfiguredBackend(): import("../../cliproxy/types").CLIProxyBackend;
21
+ interface ResolveUpdateCheckDeps {
22
+ checkCliproxyUpdateFn?: typeof checkCliproxyUpdate;
23
+ getInstalledVersionFn?: typeof getInstalledCliproxyVersion;
24
+ }
25
+ interface ResolveVersionsDeps {
26
+ fetchAllVersionsFn?: typeof fetchAllVersions;
27
+ getInstalledVersionFn?: typeof getInstalledCliproxyVersion;
28
+ }
29
+ export declare function resolveCliproxyUpdateCheckPayload(backend: ReturnType<typeof getConfiguredBackend>, deps?: ResolveUpdateCheckDeps): Promise<import("../../cliproxy/binary-manager").CliproxyUpdateCheckResult | {
30
+ hasUpdate: boolean;
31
+ currentVersion: string;
32
+ latestVersion: string;
33
+ fromCache: boolean;
34
+ checkedAt: number;
35
+ backend: import("../../cliproxy/types").CLIProxyBackend;
36
+ backendLabel: string;
37
+ isStable: boolean;
38
+ maxStableVersion: string;
39
+ stabilityMessage: string | undefined;
40
+ }>;
41
+ export declare function resolveCliproxyVersionsPayload(backend: ReturnType<typeof getConfiguredBackend>, deps?: ResolveVersionsDeps): Promise<{
42
+ versions: string[];
43
+ latestStable: string;
44
+ latest: string;
45
+ fromCache: boolean;
46
+ checkedAt: number;
47
+ currentVersion: string;
48
+ maxStableVersion: string;
49
+ faultyRange: {
50
+ min: string;
51
+ max: string;
52
+ };
53
+ }>;
17
54
  export default router;
18
55
  //# sourceMappingURL=cliproxy-stats-routes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"cliproxy-stats-routes.d.ts","sourceRoot":"","sources":["../../../src/web-server/routes/cliproxy-stats-routes.ts"],"names":[],"mappings":"AAAA;;GAEG;AA2DH,QAAA,MAAM,MAAM,4CAAW,CAAC;AAsDxB;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,MAAM,EAAE;IAC7C,OAAO,EAAE,OAAO,CAAC;IACjB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,E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,IAAI,GAAE,mBAAwB;;;;;;;;;;;;GAe/B;AAu3BD,eAAe,MAAM,CAAC"}
@@ -26,7 +26,7 @@ var __importStar = (this && this.__importStar) || function (mod) {
26
26
  return result;
27
27
  };
28
28
  Object.defineProperty(exports, "__esModule", { value: true });
29
- exports.shouldCacheQuotaResult = void 0;
29
+ exports.resolveCliproxyVersionsPayload = exports.resolveCliproxyUpdateCheckPayload = exports.shouldCacheQuotaResult = void 0;
30
30
  const express_1 = require("express");
31
31
  const fs = __importStar(require("fs"));
32
32
  const path = __importStar(require("path"));
@@ -121,6 +121,59 @@ function getConfiguredBackend() {
121
121
  return platform_detector_1.DEFAULT_BACKEND;
122
122
  }
123
123
  }
124
+ function buildUpdateCheckFallback(backend, getInstalledVersionFn = binary_manager_1.getInstalledCliproxyVersion) {
125
+ const currentVersion = getInstalledVersionFn(backend);
126
+ const isStable = !(0, version_checker_1.isNewerVersion)(currentVersion, platform_detector_1.CLIPROXY_MAX_STABLE_VERSION);
127
+ const backendLabel = backend === 'plus' ? 'CLIProxy Plus' : 'CLIProxy';
128
+ return {
129
+ hasUpdate: false,
130
+ currentVersion,
131
+ latestVersion: currentVersion,
132
+ fromCache: true,
133
+ checkedAt: Date.now(),
134
+ backend,
135
+ backendLabel,
136
+ isStable,
137
+ maxStableVersion: platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
138
+ stabilityMessage: isStable
139
+ ? undefined
140
+ : `v${currentVersion} has known stability issues. Max stable: v${platform_detector_1.CLIPROXY_MAX_STABLE_VERSION}`,
141
+ };
142
+ }
143
+ function buildVersionsFallback(backend, getInstalledVersionFn = binary_manager_1.getInstalledCliproxyVersion) {
144
+ const currentVersion = getInstalledVersionFn(backend);
145
+ return {
146
+ versions: currentVersion ? [currentVersion] : [],
147
+ latestStable: currentVersion || platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
148
+ latest: currentVersion || platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
149
+ fromCache: true,
150
+ checkedAt: Date.now(),
151
+ currentVersion,
152
+ maxStableVersion: platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
153
+ faultyRange: platform_detector_1.CLIPROXY_FAULTY_RANGE,
154
+ };
155
+ }
156
+ async function resolveCliproxyUpdateCheckPayload(backend, deps = {}) {
157
+ const checkCliproxyUpdateFn = deps.checkCliproxyUpdateFn ?? binary_manager_1.checkCliproxyUpdate;
158
+ const getInstalledVersionFn = deps.getInstalledVersionFn ?? binary_manager_1.getInstalledCliproxyVersion;
159
+ return checkCliproxyUpdateFn(backend).catch(() => buildUpdateCheckFallback(backend, getInstalledVersionFn));
160
+ }
161
+ exports.resolveCliproxyUpdateCheckPayload = resolveCliproxyUpdateCheckPayload;
162
+ async function resolveCliproxyVersionsPayload(backend, deps = {}) {
163
+ const fetchAllVersionsFn = deps.fetchAllVersionsFn ?? version_checker_1.fetchAllVersions;
164
+ const getInstalledVersionFn = deps.getInstalledVersionFn ?? binary_manager_1.getInstalledCliproxyVersion;
165
+ const result = await fetchAllVersionsFn(false, backend).catch(() => null);
166
+ if (!result) {
167
+ return buildVersionsFallback(backend, getInstalledVersionFn);
168
+ }
169
+ return {
170
+ ...result,
171
+ currentVersion: getInstalledVersionFn(backend),
172
+ maxStableVersion: platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
173
+ faultyRange: platform_detector_1.CLIPROXY_FAULTY_RANGE,
174
+ };
175
+ }
176
+ exports.resolveCliproxyVersionsPayload = resolveCliproxyVersionsPayload;
124
177
  /**
125
178
  * Extract status code and model from error log file (lightweight parsing).
126
179
  * Reads first 4KB for model, last 2KB for status code. Async to avoid blocking event loop.
@@ -285,7 +338,7 @@ router.post('/proxy-stop', async (_req, res) => {
285
338
  router.get('/update-check', async (_req, res) => {
286
339
  try {
287
340
  const backend = getConfiguredBackend();
288
- const result = await (0, binary_manager_1.checkCliproxyUpdate)(backend);
341
+ const result = await resolveCliproxyUpdateCheckPayload(backend);
289
342
  res.json(result);
290
343
  }
291
344
  catch (error) {
@@ -806,14 +859,7 @@ router.get('/quota/:provider/:accountId', async (req, res) => {
806
859
  router.get('/versions', async (_req, res) => {
807
860
  try {
808
861
  const backend = getConfiguredBackend();
809
- const result = await (0, version_checker_1.fetchAllVersions)(false, backend);
810
- const currentVersion = (0, binary_manager_1.getInstalledCliproxyVersion)(backend);
811
- res.json({
812
- ...result,
813
- currentVersion,
814
- maxStableVersion: platform_detector_1.CLIPROXY_MAX_STABLE_VERSION,
815
- faultyRange: platform_detector_1.CLIPROXY_FAULTY_RANGE,
816
- });
862
+ res.json(await resolveCliproxyVersionsPayload(backend));
817
863
  }
818
864
  catch (error) {
819
865
  console.error(`[cliproxy-stats] ${error.message}`);
@@ -1 +1 @@
1
- {"version":3,"file":"cliproxy-stats-routes.js","sourceRoot":"","sources":["../../../src/web-server/routes/cliproxy-stats-routes.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAoD;AACpD,uCAAyB;AACzB,2CAA6B;AAC7B,8EAG4C;AAC5C,gEAMsC;AACtC,gEAAiE;AACjE,4EAAqE;AACrE,8EAAuE;AACvE,sFAA8E;AAC9E,0EAAmE;AACnE,8EAAqF;AASrF,kEAAgE;AAChE,sEAIyC;AACzC,oEAAoG;AACpG,oEAAuE;AACvE,kEAAiG;AACjG,2EAI+C;AAC/C,wEAI0C;AAC1C,8EAA+E;AAC/E,qEAA2E;AAC3E,4EAI4C;AAC5C,uGAAiG;AACjG,mEAAmF;AAEnF,MAAM,MAAM,GAAG,IAAA,gBAAM,GAAE,CAAC;AAExB,MAAM,0BAA0B,GAAG,KAAM,CAAC;AAC1C,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAO1C,MAAM,eAAe,GAAG,IAAI,GAAG,EAA+B,CAAC;AAE/D,MAAM,CAAC,GAAG,CAAC,CAAC,GAAY,EAAE,GAAa,EAAE,IAAI,EAAE,EAAE;IAC/C,IACE,IAAA,oDAAkC,EAChC,GAAG,EACH,GAAG,EACH,y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OAAO;QACT,CAAC;QAED,wCAAwC;QACxC,MAAM,IAAA,2BAAS,GAAE,CAAC;QAElB,yCAAyC;QACzC,MAAM,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,UAAU,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;QAE7C,cAAc;QACd,MAAM,WAAW,GAAG,MAAM,IAAA,uCAAqB,GAAE,CAAC;QAElD,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,cAAc,EAAE,CAAC;YACtD,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,uBAAuB,EAAE,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,oBAAqB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
1
+ {"version":3,"file":"cliproxy-stats-routes.js","sourceRoot":"","sources":["../../../src/web-server/routes/cliproxy-stats-routes.ts"],"names":[],"mappings":";AAAA;;GAEG;;;;;;;;;;;;;;;;;;;;;;;;;;AAEH,qCAAoD;AACpD,uCAAyB;AACzB,2CAA6B;AAC7B,8EAG4C;AAC5C,gEAMsC;AACtC,gEAAiE;AACjE,4EAAqE;AACrE,8EAAuE;AACvE,sFAA8E;AAC9E,0EAAmE;AACnE,8EAAqF;AASrF,kEAAgE;AAChE,sEAIyC;AACzC,oEAAoG;AACpG,oEAAu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WAAW,GAAG,MAAM,IAAA,uCAAqB,GAAE,CAAC;QAElD,IAAI,WAAW,CAAC,OAAO,IAAI,WAAW,CAAC,cAAc,EAAE,CAAC;YACtD,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,WAAW,CAAC,IAAI,EAAE,CAAC,CAAC;QACtD,CAAC;aAAM,CAAC;YACN,GAAG,CAAC,IAAI,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,WAAW,CAAC,KAAK,IAAI,uBAAuB,EAAE,CAAC,CAAC;QACpF,CAAC;IACH,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,CAAC,KAAK,CAAC,oBAAqB,KAAe,CAAC,OAAO,EAAE,CAAC,CAAC;QAC9D,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,EAAE,KAAK,EAAE,uBAAuB,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC,CAAC,CAAC;AAEH,kBAAe,MAAM,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaitranntt/ccs",
3
- "version": "7.69.1-dev.3",
3
+ "version": "7.69.1-dev.5",
4
4
  "description": "Claude Code Switch - Instant profile switching between Claude, GLM, Kimi, and more",
5
5
  "keywords": [
6
6
  "cli",
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as C,h as ve}from"./react-vendor-CNOkPC89.js";import{u as Ce,a as $,b as L,e as ke,f as ee,g as we}from"./tanstack-CrmUhA7Z.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-6Yg65ZZH.js";import{a as P,Y as z,ag as de,ah as ue,ai as xe,aj as me,ak as he,L as S,I as V,x as _,aC as Se,d as b,B as A,C as R,b as O,e as Ge,f as Me,g as Re,n as Oe,j as I,k as q,_ as Q}from"./index-DNmWbKbN.js";import{A as ze,a as $e,b as Le,c as Fe,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-BA39vaYL.js";import{t as k}from"./notifications-B2HqRBj7.js";import{b0 as W,b1 as E,b2 as pe,aG as ge,_ as fe,b3 as Ee,b4 as Ue,m as Y,as as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-KVCk4_U8.js";import{C as re}from"./checkbox-DHF-UBrH.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(a){return Array.from(a).sort((i,t)=>i.localeCompare(t))}function We(a){const i=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const p=n.context_group||"default",m=i.get(p)??{group:p,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),i.set(p,m)}const t=Array.from(i.values()).sort((n,p)=>n.group.localeCompare(p.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const p=n.context_group||"default",m=i.get(p),y=Math.max((m?.sharedCount??1)-1,0),u=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:u}}),s=o.filter(n=>n.context_mode==="shared").length,x=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,c=o.filter(n=>n.context_inferred).length,h=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-x,0),deeperSharedCount:x,isolatedCount:o.length-s,legacyContextCount:c,legacyContinuityCount:h,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Ye(){return Ce({queryKey:["accounts"],queryFn:()=>z.accounts.list(),select:a=>{const i=a.accounts.filter(x=>x.type!=="cliproxy"),t=We(i),o=a.accounts.length-i.length,s=t.accounts.some(x=>x.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function Je(){const a=$(),{t:i}=P();return L({mutationFn:t=>z.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(i("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function et(){const a=$(),{t:i}=P();return L({mutationFn:()=>z.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(i("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function tt(){const a=$(),{t:i}=P();return L({mutationFn:t=>z.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(i("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function be(){const a=$(),{t:i}=P();return L({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:x})=>z.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:x}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=o.context_mode==="shared"?o.continuity_mode==="deeper"?`shared (${(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";k.success(i("toasts.contextUpdated",{name:o.name,summary:s}))},onError:t=>{k.error(t.message)}})}function st(){const a=$(),{t:i}=P();return L({mutationFn:async t=>{const o=t.filter(c=>c.context_inferred||c.continuity_inferred),x=(await Promise.allSettled(o.map(c=>{const h=c.context_mode==="shared";return z.accounts.updateContext(c.name,{context_mode:h?"shared":"isolated",context_group:h?c.context_group||"default":void 0,continuity_mode:h?c.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(c=>c.status==="rejected").length;return{updatedCount:o.length-x,failedCount:x}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(`Confirmed ${t} legacy account${t>1?"s":""}, but ${o} update${o>1?"s":""} failed. Refreshed account state.`);return}if(o>0){k.error(`Failed to confirm ${o} legacy account${o>1?"s":""}. Refreshed account state.`);return}if(t>0){k.success(i("toasts.legacyConfirmSuccess",{count:t}));return}k.info(i("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:i,plainCcsLane:t,onClose:o}){const{t:s}=P(),x=be(),[c,h]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,p]=C.useState(a.context_group||"default"),[m,y]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),u=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),l=C.useMemo(()=>i.find(g=>g.group===u),[i,u]),N=u.length>0&&u.length<=oe&&at.test(u),r=c==="isolated"||N,d=c==="shared"?Math.max((l?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===u?1:0),0):0,f=c==="shared"?Math.max((l?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===u?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,G=`ccs auth default ${a.name}`,T=`ccs auth backup ${a.name}`,w=(g,K,M,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=M.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+M.length)%M.length;H(M[Ne])},F=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",D=()=>{r&&x.mutate({name:a.name,context_mode:c,context_group:c==="shared"?u:void 0,continuity_mode:c==="shared"?m:void 0},{onSuccess:()=>{o()}})},B=g=>{g||o()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:s("editAccountContext.title")}),e.jsx(he,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="isolated",tabIndex:c==="isolated"?0:-1,onClick:()=>h("isolated"),onKeyDown:g=>w(g,c,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="shared",tabIndex:c==="shared"?0:-1,onClick:()=>h("shared"),onKeyDown:g=>w(g,c,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(c==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>p(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:F||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:T}),e.jsx(_,{value:T,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(_,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${c==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[c==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[c==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:u})})," ",d>0?s("editAccountContext.sameGroupPeerCount",{count:d}):s("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?s("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${c==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:o,disabled:x.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:D,disabled:!r||x.isPending,children:x.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:i,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),x=Je(),c=tt(),h=et(),n=be(),[p,m]=C.useState(null),[y,u]=C.useState(null),l=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===i&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const d=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const f=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const d=r.original.name===i,f=x.isPending||c.isPending||n.isPending,v=r.original.type==="cliproxy",j=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>u(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>x.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),s(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(r.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:l,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(r=>e.jsx(te,{children:r.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},r.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(r=>e.jsx(te,{children:r.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},r.id))})]})}),i&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:o,onClose:()=>u(null)}),e.jsx(ze,{open:!!p,onOpenChange:r=>!r&&m(null),children:e.jsxs($e,{children:[e.jsxs(Le,{children:[e.jsx(Fe,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:s("accountsTable.deleteDialogDesc",{name:p??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:s("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{p&&(c.mutate(p),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:i})=>{const{t}=P();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Re,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(i)})]})]})};function ie({totalAccounts:a,primaryAccountName:i,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:x,sharedPeerAccountCount:c,deeperReadyAccountCount:h,sharedPeerGroups:n,deeperReadyGroups:p,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:u}){const{t:l}=P(),N=u?u.kind==="native"?l("continuityOverview.lane.native"):u.kind==="account-default"?l("continuityOverview.lane.accountDefault",{name:u.account_name||""}):u.kind==="account-inherited"?l("continuityOverview.lane.accountInherited",{name:u.account_name||""}):u.kind==="profile-default"?l("continuityOverview.lane.profileDefault",{name:u.profile_name||"default"}):u.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":p.length===0?"shared-standard":t>0||x>0||h<c||p.length<n.length?"partial":"ready",d=p[0]||n[0]||"default",f=p.length>0&&(t>0||o>0||n.length>p.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!i&&u?.account_name===i,T=a>0&&!!u&&(!i||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(R,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(O,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:l(`continuityReadiness.messages.${r}.title`,{group:d})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:l(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:l(`continuityReadiness.messages.${r}.description`,{group:d,count:x})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:l("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:l("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&p.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.partialBadge",{group:d})})]})]})}),(T||w)&&e.jsx(R,{className:"border-dashed",children:e.jsxs(O,{className:"p-5 space-y-4",children:[T&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),i?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${i}`}),e.jsx(_,{value:`ccs auth default ${i}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:l("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:l("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:l("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:l("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:l("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:l("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:l("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const le=64;function rt({open:a,onClose:i}){const{t}=P(),[o,s]=C.useState(""),[x,c]=C.useState(!1),[h,n]=C.useState(""),[p,m]=C.useState(!1),[y,u]=C.useState(!1),l=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),N=h.trim().toLowerCase().replace(/\s+/g,"-"),r=N.length===0||N.length<=le&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=o&&l?[`ccs auth create ${o}`,x?N.length>0?`--context-group ${N}`:"--share-context":"",x&&p?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!l||x&&!r||(await navigator.clipboard.writeText(d),u(!0),setTimeout(()=>u(!1),2e3))},v=()=>{s(""),c(!1),n(""),m(!1),u(!1),i()};return e.jsx(de,{open:a,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!l&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:x,onCheckedChange:j=>c(j===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),x&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:h,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:p,onCheckedChange:j=>m(j===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),h.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:le})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!l||x&&!r,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!l||x&&!r,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:a}=P(),i=ve(),{data:t,isLoading:o}=Ye(),s=st(),[x,c]=C.useState(!1),h=t?.accounts||[],n=t?.cliproxyCount||0,p=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,u=t?.sharedStandardCount||0,l=t?.deeperSharedCount||0,N=t?.isolatedCount||0,r=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],T=t?.groupSummaries||[],w=t?.plainCcsLane||null,F=h.filter(H=>H.context_inferred||H.continuity_inferred),D=F.length,B=D>0,g=()=>i("/cliproxy?provider=claude"),K=()=>i("/cliproxy?provider=claude&action=auth"),M=()=>s.mutate(F);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx(Oe,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[p>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:p})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(R,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(Q,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(O,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(_,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(_,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:u,deeperSharedCount:l,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(R,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(Q,{children:a("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(O,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(R,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(Q,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(O,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}),e.jsx(ie,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:u,deeperSharedCount:l,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(R,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(O,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]}),e.jsx(rt,{open:x,onClose:()=>c(!1)})]})}export{bt as AccountsPage};
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as l}from"./react-vendor-CNOkPC89.js";import{a as L,bv as B,be as y,bg as w,n as O,B as $,L as A,aF as U,I as V,d as M}from"./index-DNmWbKbN.js";import{R as D,w as k,x as K,ab as _,at as q,as as G,aG as J}from"./icons-KVCk4_U8.js";import"./tanstack-CrmUhA7Z.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const F={selected:[],unattended:!1};async function C(t,d){try{const a=await t.json();return typeof a.error=="string"&&a.error.trim().length>0?a.error:d}catch{return d}}function Y(){const[t,d]=l.useState(F),[a,v]=l.useState(null),[h,j]=l.useState(!0),[b,c]=l.useState(!1),[N,u]=l.useState(null),[S,m]=l.useState(null),f=l.useCallback(r=>{m(r),window.setTimeout(()=>m(null),1500)},[]),p=l.useCallback(async()=>{try{j(!0),u(null);const r=await fetch("/api/channels");if(!r.ok)throw new Error(await C(r,"Failed to load Official Channels settings"));const i=await r.json();return d(i.config??F),v(i.status??null),!0}catch(r){return u(r instanceof Error?r.message:"Unknown error"),!1}finally{j(!1)}},[]),T=l.useCallback(async(r,i="Settings saved")=>{try{c(!0),u(null);const n=await fetch("/api/channels",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(r)});if(!n.ok)throw new Error(await C(n,"Failed to save Official Channels settings"));const s=await n.json();return d(o=>s.config??{...o,...r}),f(i),!0}catch(n){return u(n instanceof Error?n.message:"Unknown error"),!1}finally{c(!1)}},[f]),E=l.useCallback(async(r,i)=>{try{c(!0),u(null);const n=await fetch(`/api/channels/${r}/token`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({token:i})});if(!n.ok)throw new Error(await C(n,`Failed to save ${r} token`));return await p()?(f(`${r} token saved`),!0):!1}catch(n){return u(n instanceof Error?n.message:"Unknown error"),!1}finally{c(!1)}},[p,f]),P=l.useCallback(async r=>{try{c(!0),u(null);const i=await fetch(`/api/channels/${r}/token`,{method:"DELETE"});if(!i.ok)throw new Error(await C(i,`Failed to clear ${r} token`));return await p()?(f(`${r} token cleared`),!0):!1}catch(i){return u(i instanceof Error?i.message:"Unknown error"),!1}finally{c(!1)}},[p,f]);return{config:t,status:a,loading:h,saving:b,error:N,success:S,fetchConfig:p,updateConfig:T,saveToken:E,clearToken:P}}const z={telegram:"",discord:"",imessage:""};function H(t){return t==="ready"?"border-green-200 bg-green-50 text-green-900 dark:border-green-900/60 dark:bg-green-950/40 dark:text-green-100":t==="limited"?"border-amber-200 bg-amber-50 text-amber-900 dark:border-amber-900/60 dark:bg-amber-950/40 dark:text-amber-100":"border-blue-200 bg-blue-50 text-blue-900 dark:border-blue-900/60 dark:bg-blue-950/40 dark:text-blue-100"}function Q(t){return t==="ready"?"default":t==="not_selected"?"secondary":t==="unavailable"?"destructive":"outline"}function W(t){return t==="ready"?"default":t==="partial"?"outline":t==="blocked"?"destructive":"secondary"}function X(t,d){return t.length===0?"None selected":t.map(a=>d?.find(v=>v.id===a)?.displayName??a).join(", ")}function de(){const{t}=L(),{config:d,status:a,loading:v,saving:h,error:j,success:b,fetchConfig:c,updateConfig:N,saveToken:u,clearToken:S}=Y(),{fetchRawConfig:m}=B(),[f,p]=l.useState(z),T=X(d.selected,a?.channels);l.useEffect(()=>{c(),m()},[c,m]);const E=async()=>{await Promise.all([c(),m()])},P=async(s,o)=>{const x=o?[...new Set([...d.selected,s])]:d.selected.filter(R=>R!==s);await N({selected:x},o?`${s} selected for auto-enable`:`${s} removed from auto-enable`)&&await Promise.all([c(),m()])},r=(s,o)=>{p(x=>({...x,[s]:o}))},i=async s=>{await u(s,f[s])&&(p(x=>({...x,[s]:""})),await m())},n=async s=>{await S(s)&&(p(x=>({...x,[s]:""})),await m())};return v?e.jsx("div",{className:"flex flex-1 items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(D,{className:"h-5 w-5 animate-spin"}),e.jsx("span",{children:t("settings.loading")})]})}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${j||b?"translate-y-0 opacity-100":"pointer-events-none -translate-y-2 opacity-0"}`,children:[j&&e.jsxs(y,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx(w,{children:j})]}),b&&e.jsxs("div",{className:"flex items-center gap-2 rounded-md border border-green-200 bg-green-50 px-3 py-2 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(K,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:b})]})]}),e.jsx(O,{className:"flex-1",children:e.jsxs("div",{className:"space-y-6 p-5",children:[e.jsxs("div",{className:"flex items-start gap-3",children:[e.jsx(_,{className:"h-5 w-5 text-primary"}),e.jsxs("div",{className:"space-y-1",children:[e.jsx("p",{className:"font-medium",children:t("settingsPage.channelsSection.title")}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Configure official Claude channels here, then run ",e.jsx("code",{children:"ccs"})," normally on a supported native Claude session."]}),e.jsxs("p",{className:"text-sm text-muted-foreground",children:["CCS stores only channel selection in ",e.jsx("code",{children:"config.yaml"}),". Claude keeps the machine-level channel state under ",e.jsx("code",{children:"~/.claude/channels/"}),"."]})]})]}),a&&e.jsxs("div",{className:`rounded-xl border p-4 ${H(a.summary.state)}`,children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx($,{variant:a.summary.state==="ready"?"default":"outline",children:a.summary.title}),e.jsx("span",{className:"text-sm font-medium",children:T})]}),e.jsx("p",{className:"text-sm",children:a.summary.message}),e.jsx("p",{className:"text-sm opacity-90",children:a.summary.nextStep})]}),e.jsxs("div",{className:"min-w-[220px] rounded-lg border border-current/10 bg-background/60 p-3 text-sm text-foreground",children:[e.jsx("p",{className:"font-medium",children:"Machine checks"}),e.jsxs("div",{className:"mt-2 space-y-1 text-muted-foreground",children:[e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Bun"}),e.jsx("span",{children:a.bunInstalled?"Installed":"Missing"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Claude Code"}),e.jsx("span",{children:a.claudeVersion.current?`v${a.claudeVersion.current}`:"Unknown"})]}),e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsx("span",{children:"Claude auth"}),e.jsx("span",{children:a.auth.authMethod??"Unknown"})]})]})]})]}),a.summary.blockers.length>0&&e.jsx("div",{className:"mt-3 space-y-1 text-sm",children:a.summary.blockers.map(s=>e.jsx("p",{children:s},s))})]}),a&&e.jsxs("div",{className:"rounded-lg border bg-muted/20 p-4",children:[e.jsx("p",{className:"font-medium",children:"Fastest path"}),e.jsxs("div",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:"1. Turn on the channels you want below."}),e.jsx("p",{children:"2. Save Telegram or Discord bot tokens here if that channel needs one."}),e.jsxs("p",{children:["3. Run ",e.jsx("code",{children:"ccs"})," or a native Claude account profile. CCS adds"," ",e.jsx("code",{children:"--channels"})," for you on supported runs."]}),e.jsx("p",{children:a.supportMessage})]}),e.jsxs("details",{className:"mt-3 rounded-lg border bg-background p-4",children:[e.jsx("summary",{className:"cursor-pointer text-sm font-medium",children:"Advanced notes and scope"}),e.jsxs("div",{className:"mt-3 space-y-2 text-sm text-muted-foreground",children:[e.jsx("p",{children:a.accountStatusCaveat}),e.jsx("p",{children:a.stateScopeMessage})]})]})]}),a&&e.jsxs("div",{className:"rounded-lg border bg-background p-4",children:[e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsxs("p",{className:"font-medium",children:["If you run ",e.jsx("code",{children:"ccs"})," now"]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:a.launchPreview.detail})]}),e.jsx($,{variant:W(a.launchPreview.state),children:a.launchPreview.title})]}),e.jsxs("div",{className:"mt-3 space-y-2",children:[e.jsxs("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm",children:[e.jsx("span",{className:"text-muted-foreground",children:"You type:"})," ",a.launchPreview.command]}),e.jsxs("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm break-all",children:[e.jsx("span",{className:"text-muted-foreground",children:"CCS adds:"})," ",a.launchPreview.appendedArgs.length>0?a.launchPreview.appendedArgs.join(" "):"(nothing yet)"]})]}),a.launchPreview.skippedMessages.length>0&&e.jsx("div",{className:"mt-3 space-y-1 text-sm text-muted-foreground",children:a.launchPreview.skippedMessages.map(s=>e.jsx("p",{children:s},s))})]}),a?.claudeVersion.message&&a.claudeVersion.state!=="supported"&&e.jsxs(y,{children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx(w,{children:a.claudeVersion.message})]}),a?.auth.message&&a.auth.state!=="eligible"&&e.jsxs(y,{children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx(w,{children:a.auth.message})]}),a?.auth.orgRequirementMessage&&e.jsxs(y,{children:[e.jsx(k,{className:"h-4 w-4"}),e.jsx(w,{children:a.auth.orgRequirementMessage})]}),e.jsx("div",{className:"space-y-4",children:a?.channels.map(s=>{const o=d.selected.includes(s.id),x=f[s.id];return e.jsxs("div",{className:"rounded-lg border p-4 space-y-4",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4",children:[e.jsxs("div",{children:[e.jsx(A,{className:"text-base font-medium",children:s.displayName}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:s.summary}),e.jsx("p",{className:"mt-2 font-mono text-xs text-muted-foreground",children:s.pluginSpec})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx($,{variant:Q(s.setup.state),children:s.setup.label}),e.jsx(U,{checked:o,disabled:h||!!s.unavailableReason&&!o,onCheckedChange:g=>void P(s.id,g)})]})]}),e.jsxs("div",{className:"rounded-lg bg-muted/30 p-4 text-sm text-muted-foreground space-y-2",children:[e.jsx("p",{children:s.setup.detail}),e.jsx("p",{children:s.setup.nextStep})]}),s.requiresToken&&e.jsxs("div",{className:"space-y-3 rounded-lg bg-muted/30 p-4",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:!s.tokenConfigured&&s.tokenSource==="process_env"?`The current CCS process already has ${s.envKey}. Save it here only if you want persistent Claude channel state.`:s.tokenConfigured&&s.processEnvAvailable?`${s.envKey} is saved in Claude channel state, and the current CCS process env also provides it.`:`Save ${s.envKey} in Claude's official channel env file. The dashboard never reads the token value back after save.`}),s.tokenConfigured&&e.jsxs("p",{className:"text-sm text-muted-foreground",children:["Saving here writes the same ",e.jsx("code",{children:".env"})," file as"," ",e.jsxs("code",{children:["/",s.id,":configure"]}),", so you do not need to run the configure command again after a successful save."]}),e.jsx(V,{type:"password",value:x,onChange:g=>r(s.id,g.target.value),placeholder:s.tokenConfigured?`Configured. Enter a new ${s.envKey} to replace it.`:!s.tokenConfigured&&s.tokenSource==="process_env"?`Using current CCS process env. Enter a new ${s.envKey} to save it for Claude.`:`Paste ${s.envKey}`,disabled:h}),s.tokenPath&&s.tokenSource!=="process_env"&&e.jsx("div",{className:"text-xs text-muted-foreground break-all",children:s.tokenPath}),e.jsxs("div",{className:"flex flex-wrap gap-2",children:[e.jsxs(M,{onClick:()=>void i(s.id),disabled:h||!x.trim(),children:[e.jsx(q,{className:"mr-2 h-4 w-4"}),"Save Token"]}),e.jsxs(M,{variant:"outline",onClick:()=>void n(s.id),disabled:h||!s.tokenConfigured,children:[e.jsx(G,{className:"mr-2 h-4 w-4"}),"Clear Saved Token"]})]})]}),e.jsxs("details",{className:"rounded-lg border bg-background p-4",children:[e.jsx("summary",{className:"cursor-pointer text-sm font-medium",children:"Claude-side setup commands"}),e.jsx("div",{className:"mt-3 space-y-2",children:(s.manualSetupCommands??[]).map(g=>e.jsx("div",{className:"rounded-md bg-muted px-3 py-2 font-mono text-sm break-all",children:g},g))})]})]},s.id)})}),e.jsx(y,{children:e.jsxs(w,{children:["CCS injects ",e.jsx("code",{children:"--channels"})," only for the current Claude session. Telegram, Discord, and iMessage stop receiving messages when that Claude session exits."]})}),e.jsx("div",{className:"rounded-lg border p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-4 rounded-lg bg-muted/30 p-4",children:[e.jsxs("div",{className:"flex gap-3",children:[e.jsx(J,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600"}),e.jsxs("div",{children:[e.jsx(A,{className:"text-sm font-medium",children:t("profileEditorSections.skipPermissionPrompts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["Optional advanced behavior. CCS adds ",e.jsx("code",{children:"--dangerously-skip-permissions"})," ","only when at least one selected channel is being auto-enabled and you did not already pass a permission flag yourself."]})]})]}),e.jsx(U,{checked:d.unattended,disabled:h,onCheckedChange:s=>void(async()=>{await N({unattended:s},s?"Unattended mode enabled":"Unattended mode disabled")&&await m()})()})]})}),e.jsx("div",{className:"flex justify-end",children:e.jsxs(M,{variant:"outline",onClick:()=>void E(),disabled:h,children:[e.jsx(D,{className:`mr-2 h-4 w-4 ${h?"animate-spin":""}`}),t("settings.refresh")]})})]})})]})}export{de as default};
@@ -1 +0,0 @@
1
- import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as W}from"./react-vendor-CNOkPC89.js";import{a as $,bb as Pe,B as p,d as S,n as ae,C as u,j as f,k as j,_ as b,b as h,I as G,r as ne,s as ie,t as re,v as le,w as de,x as K,Q as ke,R as Ee,U as oe,V as ce,c as pe}from"./index-DNmWbKbN.js";import{u as V,a as J,b as M}from"./tanstack-CrmUhA7Z.js";import{t as P}from"./notifications-B2HqRBj7.js";import{aa as De,a9 as Be,L as F,at as Ie,as as Te,R as Re,T as me,ah as qe,a7 as Ae}from"./icons-KVCk4_U8.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";const L=["claude-extension-bindings"];async function k(s,n){const a=await fetch(Pe(s),{headers:{"Content-Type":"application/json"},...n});if(!a.ok){const r=await a.json().catch(()=>null);throw new Error(r?.error||`Request failed (${a.status})`)}return a.status===204?void 0:await a.json()}function $e(){return V({queryKey:["claude-extension-options"],queryFn:()=>k("/claude-extension/profiles")})}function Le(s,n="vscode"){return V({queryKey:["claude-extension-setup",s,n],enabled:!!s,queryFn:()=>k(`/claude-extension/setup?profile=${encodeURIComponent(s||"")}&host=${encodeURIComponent(n)}`)})}function Oe(){return V({queryKey:L,queryFn:()=>k("/claude-extension/bindings")})}function Qe(s){return V({queryKey:["claude-extension-binding-status",s],enabled:!!s,queryFn:()=>k(`/claude-extension/bindings/${encodeURIComponent(s||"")}/verify`)})}function Ue(){const s=J();return M({mutationFn:n=>k("/claude-extension/bindings",{method:"POST",body:JSON.stringify(n)}),onSuccess:()=>{s.invalidateQueries({queryKey:L}),P.success("Binding created")},onError:n=>P.error(n.message)})}function Fe(){const s=J(),{t:n}=$();return M({mutationFn:({id:a,binding:r})=>k(`/claude-extension/bindings/${encodeURIComponent(a)}`,{method:"PUT",body:JSON.stringify(r)}),onSuccess:(a,r)=>{s.invalidateQueries({queryKey:L}),s.invalidateQueries({queryKey:["claude-extension-binding-status",r.id]}),P.success(n("claudeExtensionPage.bindingSaved"))},onError:a=>P.error(a.message)})}function Ke(){const s=J(),{t:n}=$();return M({mutationFn:a=>k(`/claude-extension/bindings/${encodeURIComponent(a)}`,{method:"DELETE"}),onSuccess:()=>{s.invalidateQueries({queryKey:L}),P.success(n("claudeExtensionPage.bindingDeleted"))},onError:a=>P.error(a.message)})}function fe(s,n){const a=J();return M({mutationFn:({id:r,target:C})=>k(`/claude-extension/bindings/${encodeURIComponent(r)}/${s}`,{method:"POST",body:JSON.stringify({target:C})}),onSuccess:r=>{a.invalidateQueries({queryKey:L}),a.setQueryData(["claude-extension-binding-status",r.bindingId],r),P.success(n)},onError:r=>P.error(r.message)})}function Ve(){const{t:s}=$();return fe("apply",s("claudeExtensionPage.bindingApplied"))}function Je(){const{t:s}=$();return fe("reset",s("claudeExtensionPage.managedValuesRemoved"))}const Me=[];function ue(s){return{name:"",profile:s,host:"vscode",ideSettingsPath:"",notes:""}}function R(s){return{name:s.name,profile:s.profile,host:s.host,ideSettingsPath:s.ideSettingsPath||"",notes:s.notes||""}}function _e(s){return{name:s.name.trim(),profile:s.profile.trim(),host:s.host,ideSettingsPath:s.ideSettingsPath.trim()||void 0,notes:s.notes.trim()||void 0}}function he(s){return s?.state==="applied"}function ze({state:s}){const n=s==="applied"?"border-emerald-500/30 bg-emerald-500/10 text-emerald-700 dark:text-emerald-300":s==="drifted"?"border-amber-500/30 bg-amber-500/10 text-amber-700 dark:text-amber-300":s==="missing"?"border-destructive/30 bg-destructive/10 text-destructive":"border-border bg-muted text-muted-foreground";return e.jsx(p,{variant:"outline",className:n,children:s})}function He(s){return s.replace(/[\\/]/g,"$&​")}function o({label:s,value:n,mono:a=!1,copyValue:r}){const C=typeof r=="string"&&r.trim().length>0;return e.jsxs("div",{className:"grid gap-2 text-sm sm:grid-cols-[112px_minmax(0,1fr)] sm:items-start",children:[e.jsx("span",{className:"text-muted-foreground",children:s}),C?e.jsxs("div",{className:"flex min-w-0 items-start gap-2",children:[e.jsx("div",{className:"min-w-0 flex-1 rounded-md border bg-muted/25 px-3 py-2",children:e.jsx("span",{className:"block text-left font-mono text-xs leading-5 [overflow-wrap:anywhere]",children:He(n)})}),e.jsx(K,{value:r,label:`Copy ${s.toLowerCase()}`,className:"shrink-0"})]}):e.jsx("span",{className:pe("text-left sm:text-right",a&&"font-mono text-xs leading-5 [overflow-wrap:anywhere]"),children:n})]})}function xe({title:s,description:n,value:a}){return e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsx(f,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(j,{className:"text-base",children:s}),e.jsx(b,{className:"mt-1",children:n})]}),e.jsx(K,{value:a,label:`Copy ${s}`})]})}),e.jsx(h,{children:e.jsx("pre",{className:"max-h-[360px] overflow-auto rounded-lg border bg-muted/30 p-4 text-xs leading-6",children:a})})]})}function ge({title:s,description:n,status:a,applyLabel:r,resetLabel:C,onApply:O,onReset:x,disabled:v,busy:E}){return e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsx(f,{className:"pb-3",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(j,{className:"text-base",children:s}),e.jsx(b,{className:"mt-1",children:n})]}),a?e.jsx(ze,{state:a.state}):null]})}),e.jsxs(h,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(o,{label:"Path",value:a?.path||"Save a binding first",mono:!0,copyValue:a?.path}),e.jsx(o,{label:"File",value:a?a.exists?"Present":"Not created yet":"Unavailable"})]}),e.jsx("div",{className:"rounded-lg border bg-muted/25 p-3 text-sm text-muted-foreground",children:a?.message||"Verify the binding after saving to inspect the current file state."}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(S,{size:"sm",className:"flex-1",onClick:O,disabled:v||E,children:[E?e.jsx(F,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):null,r]}),e.jsx(S,{size:"sm",variant:"outline",className:"flex-1",onClick:x,disabled:v||E,children:C})]})]})]})}function We({binding:s,isSelected:n,onSelect:a}){return e.jsx("button",{onClick:a,className:pe("w-full rounded-lg border px-3 py-3 text-left transition-colors",n?"border-primary/40 bg-primary/10":"border-border/60 bg-card hover:bg-muted/40"),children:e.jsxs("div",{className:"flex items-start justify-between gap-2",children:[e.jsxs("div",{className:"min-w-0",children:[e.jsx("div",{className:"truncate text-sm font-medium",children:s.name}),e.jsxs("div",{className:"mt-1 text-xs text-muted-foreground",children:[s.profile," · ",s.host]})]}),e.jsx(p,{variant:"outline",className:"shrink-0",children:s.usesDefaultIdeSettingsPath?"Default path":"Custom path"})]})})}function is(){const{t:s}=$(),n=$e(),a=Oe(),r=Ue(),C=Fe(),O=Ke(),x=Ve(),v=Je(),E=n.data?.profiles??[],Y=n.data?.hosts??[],w=a.data?.bindings??Me,je=E[0]?.name??"default",[be,B]=W.useState(!1),[Q,I]=W.useState(null),[X,D]=W.useState(()=>ue("default")),c=be||w.length===0,N=!c&&w.length>0?w.find(t=>t.id===Q)??(Q?null:w[0]):null,g=N?.id??null,l=c||!N||Q?X:R(N),Z=Le(l.profile,l.host),q=Qe(c?void 0:g||void 0),d=Y.find(t=>t.id===l.host),_=E.find(t=>t.name===l.profile),z=n.error||a.error||Z.error||q.error,ve=`${w.length} saved`,ee=r.isPending||C.isPending,Ne=x.isPending&&x.variables?.target==="shared"||v.isPending&&v.variables?.target==="shared",ye=x.isPending&&x.variables?.target==="ide"||v.isPending&&v.variables?.target==="ide",se=l.name.trim().length>0&&l.profile.trim().length>0,i=Z.data,m=q.data,te=Math.max((i?.env.length??0)-6,0),Se=i?.env.slice(0,6)??[];function H(){B(!0),I(null),D(ue(je))}async function Ce(){if(!se)return;const t=_e(l);if(!c&&g){const U=await C.mutateAsync({id:g,binding:t});B(!1),I(U.binding.id),D(R(U.binding));return}const y=await r.mutateAsync(t);B(!1),I(y.binding.id),D(R(y.binding))}async function we(){if(!g||!N||!window.confirm(`Delete binding "${N.name}"?`))return;await O.mutateAsync(g);const t=w.filter(y=>y.id!==g);t.length>0?(I(t[0].id),B(!1),D(R(t[0]))):H()}function A(t,y){if(!c&&N&&!Q){I(N.id),D({...R(N),[t]:y}),B(!1);return}D(U=>({...U,[t]:y}))}function T(t,y){if(g){if(y==="apply"){x.mutate({id:g,target:t});return}v.mutate({id:g,target:t})}}return e.jsxs("div",{className:"flex h-full min-h-0 overflow-hidden",children:[e.jsxs("div",{className:"flex w-[348px] shrink-0 flex-col border-r bg-muted/30 xl:w-[372px]",children:[e.jsx("div",{className:"border-b bg-background p-4",children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"rounded-lg border bg-muted/40 p-2",children:e.jsx(De,{className:"h-5 w-5 text-primary"})}),e.jsxs("div",{children:[e.jsx("h1",{className:"font-semibold",children:s("claudeExtensionPage.title")}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Saved IDE bindings for CCS profiles"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(p,{variant:"secondary",children:ve}),d?e.jsx(p,{variant:"outline",children:d.label}):null]})]}),e.jsxs(S,{size:"sm",onClick:H,className:"gap-1.5",children:[e.jsx(Be,{className:"h-3.5 w-3.5"}),"New"]})]})}),e.jsx(ae,{className:"flex-1",children:e.jsxs("div",{className:"space-y-4 p-5",children:[e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:c?"Create binding":"Binding editor"}),e.jsx(b,{children:"Save a profile + IDE path once, then apply or reset it from the dashboard."})]}),e.jsxs(h,{className:"space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"Binding name"}),e.jsx(G,{value:l.name,onChange:t=>A("name",t.target.value),placeholder:"VS Code · work profile"})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"CCS profile"}),e.jsxs(ne,{value:l.profile,onValueChange:t=>A("profile",t),children:[e.jsx(ie,{children:e.jsx(re,{placeholder:"Select a profile"})}),e.jsx(le,{children:E.map(t=>e.jsxs(de,{value:t.name,children:[t.label," (",t.profileType,")"]},t.name))})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:_?.description||"Choose which CCS profile the IDE should inherit."})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:s("settingsPage.thinkingSection.ideHost")}),e.jsxs(ne,{value:l.host,onValueChange:t=>A("host",t),children:[e.jsx(ie,{children:e.jsx(re,{placeholder:"Select a host"})}),e.jsx(le,{children:Y.map(t=>e.jsx(de,{value:t.id,children:t.label},t.id))})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:s("settingsPage.thinkingSection.ideSettingsPath")}),e.jsx(G,{value:l.ideSettingsPath,onChange:t=>A("ideSettingsPath",t.target.value),placeholder:d?.defaultSettingsPath||"Leave blank for the default user settings path"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Leave blank to use the default user settings path for"," ",d?.label||"this IDE","."]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"text-sm font-medium",children:"Notes"}),e.jsx(G,{value:l.notes,onChange:t=>A("notes",t.target.value),placeholder:"Optional reminder for this machine or workspace"})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(S,{className:"flex-1 gap-1.5",onClick:()=>void Ce(),disabled:!se||ee,children:[ee?e.jsx(F,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(Ie,{className:"h-3.5 w-3.5"}),c?"Create":"Save"]}),e.jsx(S,{variant:"outline",onClick:H,children:"Reset form"})]}),c?null:e.jsxs(S,{variant:"outline",className:"w-full gap-1.5 text-destructive hover:text-destructive",onClick:()=>void we(),disabled:O.isPending,children:[e.jsx(Te,{className:"h-3.5 w-3.5"}),"Delete binding"]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"px-1 text-xs font-medium uppercase tracking-wide text-muted-foreground",children:"Saved bindings"}),e.jsx("div",{className:"space-y-2",children:w.length>0?w.map(t=>e.jsx(We,{binding:t,isSelected:t.id===g&&!c,onSelect:()=>{B(!1),I(t.id),D(R(t))}},t.id)):e.jsx(u,{className:"border-dashed border-border/60 bg-card/60",children:e.jsx(h,{className:"pt-6 text-sm text-muted-foreground",children:"No saved bindings yet. Create one to manage apply, reset, and drift checks from the dashboard."})})})]})]})})]}),e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx(ae,{className:"h-full",children:e.jsxs("div",{className:"w-full space-y-6 p-6 xl:p-7 2xl:p-8",children:[e.jsxs("div",{className:"flex flex-col gap-3 lg:flex-row lg:items-end lg:justify-between",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[_?e.jsx(p,{variant:"outline",children:_.label}):null,d?e.jsx(p,{variant:"outline",children:d.label}):null,c?e.jsx(p,{variant:"secondary",children:s("settingsPage.thinkingSection.draft")}):null,m?.sharedSettings&&he(m.sharedSettings)&&he(m.ideSettings)?e.jsx(p,{className:"bg-emerald-600 hover:bg-emerald-600",children:s("settingsPage.thinkingSection.inSync")}):null]}),e.jsxs("div",{className:"max-w-5xl",children:[e.jsx("h2",{className:"text-2xl font-semibold tracking-tight",children:N?.name||"Claude extension binding"}),e.jsx("p",{className:"mt-1 text-sm text-muted-foreground",children:"Manage the shared Claude settings file and the IDE-local settings file as two scoped targets."})]})]}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(S,{variant:"outline",onClick:()=>void q.refetch(),disabled:c||q.isFetching,children:[q.isFetching?e.jsx(F,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):e.jsx(Re,{className:"mr-1.5 h-3.5 w-3.5"}),"Verify"]}),i?e.jsx(K,{value:i.sharedSettings.command,label:"Copy persist command"}):null]})]}),z?e.jsx(u,{className:"border-destructive/40 bg-destructive/5",children:e.jsxs(h,{className:"flex items-start gap-3 pt-6 text-sm text-destructive",children:[e.jsx(me,{className:"mt-0.5 h-4 w-4 shrink-0"}),e.jsx("div",{children:z.message})]})}):null,z?null:e.jsxs(ke,{defaultValue:"overview",className:"flex flex-col gap-6",children:[e.jsxs(Ee,{className:"w-full justify-start",children:[e.jsx(oe,{value:"overview",children:"Overview"})," ",e.jsx(oe,{value:"advanced",children:s("settingsPage.thinkingSection.advanced")})]}),e.jsxs(ce,{value:"overview",className:"mt-0 space-y-6",children:[e.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[e.jsx(ge,{title:"Shared Claude settings",description:"Writes the managed env block inside ~/.claude/settings.json so CLI and IDE behavior stay aligned.",status:m?.sharedSettings,applyLabel:"Apply shared",resetLabel:"Reset shared",onApply:()=>T("shared","apply"),onReset:()=>T("shared","reset"),disabled:c,busy:Ne}),e.jsx(ge,{title:`${d?.label||"IDE"} settings.json`,description:"Writes only the Anthropic extension keys so unrelated editor preferences stay untouched.",status:m?.ideSettings,applyLabel:"Apply IDE",resetLabel:"Reset IDE",onApply:()=>T("ide","apply"),onReset:()=>T("ide","reset"),disabled:c,busy:ye})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-[minmax(0,1.15fr)_minmax(320px,0.85fr)]",children:[e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:s("settingsPage.thinkingSection.resolvedBinding")}),e.jsx(b,{children:"The binding uses the same profile resolution as `ccs persist` and `ccs env`."})]}),e.jsxs(h,{className:"space-y-3",children:[e.jsx(o,{label:"Profile",value:i?.profile.label||l.profile||"Not selected"}),e.jsx(o,{label:"Profile type",value:i?.profile.profileType||"Unknown"}),e.jsx(o,{label:"IDE host",value:d?.label||"Not selected"}),e.jsx(o,{label:"IDE path mode",value:l.ideSettingsPath.trim()?"Custom path":"Default user path"}),e.jsx(o,{label:"Effective IDE path",value:m?.ideSettings.path||l.ideSettingsPath.trim()||d?.defaultSettingsPath||"Unavailable",mono:!0,copyValue:m?.ideSettings.path||l.ideSettingsPath.trim()||d?.defaultSettingsPath}),e.jsx(o,{label:"Persist command",value:i?.sharedSettings.command||"Save a valid binding first",mono:!0}),l.notes.trim()?e.jsx(o,{label:"Notes",value:l.notes.trim()}):null]})]}),e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:s("settingsPage.thinkingSection.managedPayload")}),e.jsx(b,{children:"Keep the main view short. The full JSON stays in the Advanced tab."})]}),e.jsxs(h,{className:"space-y-4",children:[e.jsxs("div",{className:"flex flex-wrap gap-2",children:[Se.map(t=>e.jsx(p,{variant:"secondary",className:"font-mono text-[10px]",children:t.name},t.name)),te>0?e.jsxs(p,{variant:"outline",children:["+",te," more"]}):null]}),e.jsx("div",{className:"rounded-lg border bg-muted/25 p-4 text-sm",children:i?.env.length?e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"font-medium",children:["CCS will inject ",i.env.length," environment values."]}),e.jsx("div",{className:"text-muted-foreground",children:"The IDE-local target receives the extension schema. The shared target receives the same env block through Claude settings."})]}):e.jsx("div",{className:"text-muted-foreground",children:"This profile resolves to native Claude defaults, so apply/reset mainly clears existing CCS-managed overrides."})}),c?e.jsx("div",{className:"rounded-lg border border-dashed bg-muted/15 p-4 text-sm text-muted-foreground",children:"Save this draft to unlock apply, reset, and verify actions."}):e.jsxs("div",{className:"flex gap-2",children:[e.jsxs(S,{className:"flex-1",onClick:()=>T("all","apply"),disabled:x.isPending,children:[x.isPending&&x.variables?.target==="all"?e.jsx(F,{className:"mr-1.5 h-3.5 w-3.5 animate-spin"}):null,"Apply both targets"]}),e.jsx(S,{variant:"outline",className:"flex-1",onClick:()=>T("all","reset"),disabled:v.isPending,children:"Reset both targets"})]})]})]})]}),i&&(i.warnings.length>0||i.notes.length>0)?e.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:s("settingsPage.thinkingSection.warnings")}),e.jsx(b,{children:"Operational details that can break the binding even when JSON is correct."})]}),e.jsx(h,{className:"space-y-3",children:i.warnings.length>0?i.warnings.map(t=>e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border border-amber-400/40 bg-amber-50/60 p-3 text-sm dark:bg-amber-950/10",children:[e.jsx(me,{className:"mt-0.5 h-4 w-4 shrink-0 text-amber-600"}),e.jsx("span",{children:t})]},t)):e.jsx("div",{className:"rounded-lg border bg-muted/20 p-3 text-sm text-muted-foreground",children:"No runtime warnings for this binding."})})]}),e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:s("settingsPage.thinkingSection.notes")}),e.jsx(b,{children:"Short context from CCS about account continuity and host-specific behavior."})]}),e.jsx(h,{className:"space-y-3",children:i.notes.length>0?i.notes.map(t=>e.jsxs("div",{className:"flex items-start gap-3 rounded-lg border bg-muted/30 p-3 text-sm",children:[e.jsx(qe,{className:"mt-0.5 h-4 w-4 shrink-0 text-muted-foreground"}),e.jsx("span",{children:t})]},t)):e.jsx("div",{className:"rounded-lg border bg-muted/20 p-3 text-sm text-muted-foreground",children:"No extra notes for this binding."})})]})]}):null]}),e.jsx(ce,{value:"advanced",className:"mt-0 space-y-6",children:i?e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[e.jsx(xe,{title:"Shared Claude settings JSON",description:"Managed env block for ~/.claude/settings.json.",value:i.sharedSettings.json}),e.jsx(xe,{title:`${d?.label||"IDE"} settings JSON`,description:`Anthropic extension snippet for ${d?.settingsTargetLabel||"settings.json"}.`,value:i.ideSettings.json})]}),e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsx(f,{children:e.jsxs("div",{className:"flex items-start justify-between gap-3",children:[e.jsxs("div",{children:[e.jsx(j,{className:"text-base",children:"Resolved environment payload"}),e.jsx(b,{children:"Exact environment values that the extension receives after CCS expands this profile."})]}),e.jsx(K,{value:JSON.stringify(i.env,null,2),label:"Copy environment payload"})]})}),e.jsx(h,{children:i.env.length>0?e.jsx("pre",{className:"max-h-[420px] overflow-auto rounded-lg border bg-muted/30 p-4 text-xs leading-6",children:JSON.stringify(i.env,null,2)}):e.jsx("div",{className:"rounded-lg border bg-muted/20 p-4 text-sm text-muted-foreground",children:"No env payload. This binding resolves to native Claude defaults."})})]}),e.jsxs("div",{className:"grid gap-6 xl:grid-cols-2",children:[e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:"Shared target metadata"}),e.jsx(b,{children:"Useful when debugging drift or comparing with manual edits."})]}),e.jsxs(h,{className:"space-y-3",children:[e.jsx(o,{label:"Target path",value:m?.sharedSettings.path||i.sharedSettings.path,mono:!0,copyValue:m?.sharedSettings.path||i.sharedSettings.path}),e.jsx(o,{label:"Command",value:i.sharedSettings.command,mono:!0}),e.jsx(o,{label:"Current state",value:m?.sharedSettings.state||"Not verified"})]})]}),e.jsxs(u,{className:"border-border/60 bg-card/80",children:[e.jsxs(f,{children:[e.jsx(j,{className:"text-base",children:"IDE target metadata"}),e.jsx(b,{children:"Current file path plus the extension setting key used for this host."})]}),e.jsxs(h,{className:"space-y-3",children:[e.jsx(o,{label:"Target path",value:m?.ideSettings.path||l.ideSettingsPath.trim()||d?.defaultSettingsPath||i.ideSettings.path,mono:!0,copyValue:m?.ideSettings.path||l.ideSettingsPath.trim()||d?.defaultSettingsPath||i.ideSettings.path}),e.jsx(o,{label:"Settings key",value:d?.settingsKey||"Unknown",mono:!0}),e.jsx(o,{label:"Current state",value:m?.ideSettings.state||"Not verified"})]})]})]})]}):e.jsx(u,{className:"border-border/60 bg-card/80",children:e.jsxs(h,{className:"flex min-h-[240px] items-center justify-center gap-3 text-sm text-muted-foreground",children:[e.jsx(Ae,{className:"h-5 w-5"}),"Choose a profile and IDE host to preview the generated payload."]})})})]})]})})})]})}export{is as ClaudeExtensionPage};