@kaitranntt/ccs 7.50.0-dev.8 → 7.50.0-dev.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +22 -1
- package/dist/auth/account-context.d.ts +5 -0
- package/dist/auth/account-context.d.ts.map +1 -1
- package/dist/auth/account-context.js +30 -5
- package/dist/auth/account-context.js.map +1 -1
- package/dist/auth/auth-commands.d.ts.map +1 -1
- package/dist/auth/auth-commands.js +6 -0
- package/dist/auth/auth-commands.js.map +1 -1
- package/dist/auth/commands/create-command.d.ts.map +1 -1
- package/dist/auth/commands/create-command.js +7 -4
- package/dist/auth/commands/create-command.js.map +1 -1
- package/dist/auth/commands/list-command.d.ts.map +1 -1
- package/dist/auth/commands/list-command.js +3 -1
- package/dist/auth/commands/list-command.js.map +1 -1
- package/dist/auth/commands/show-command.d.ts.map +1 -1
- package/dist/auth/commands/show-command.js +1 -0
- package/dist/auth/commands/show-command.js.map +1 -1
- package/dist/auth/commands/types.d.ts +2 -0
- package/dist/auth/commands/types.d.ts.map +1 -1
- package/dist/auth/commands/types.js +2 -0
- package/dist/auth/commands/types.js.map +1 -1
- package/dist/auth/profile-detector.d.ts.map +1 -1
- package/dist/auth/profile-detector.js +1 -0
- package/dist/auth/profile-detector.js.map +1 -1
- package/dist/auth/profile-registry.d.ts +1 -0
- package/dist/auth/profile-registry.d.ts.map +1 -1
- package/dist/auth/profile-registry.js +7 -0
- package/dist/auth/profile-registry.js.map +1 -1
- package/dist/commands/help-command.d.ts.map +1 -1
- package/dist/commands/help-command.js +6 -1
- package/dist/commands/help-command.js.map +1 -1
- package/dist/config/migration-manager.d.ts.map +1 -1
- package/dist/config/migration-manager.js +3 -0
- package/dist/config/migration-manager.js.map +1 -1
- package/dist/config/unified-config-types.d.ts +2 -0
- package/dist/config/unified-config-types.d.ts.map +1 -1
- package/dist/config/unified-config-types.js.map +1 -1
- package/dist/management/instance-manager.d.ts.map +1 -1
- package/dist/management/instance-manager.js +1 -0
- package/dist/management/instance-manager.js.map +1 -1
- package/dist/management/shared-manager.d.ts +12 -0
- package/dist/management/shared-manager.d.ts.map +1 -1
- package/dist/management/shared-manager.js +99 -0
- package/dist/management/shared-manager.js.map +1 -1
- package/dist/types/config.d.ts +2 -0
- package/dist/types/config.d.ts.map +1 -1
- package/dist/types/config.js.map +1 -1
- package/dist/ui/assets/accounts-y2u0CVK8.js +1 -0
- package/dist/ui/assets/{alert-dialog-DYqj_ln8.js → alert-dialog-CetY4Iww.js} +1 -1
- package/dist/ui/assets/{api-DUB7WunM.js → api-5q1FT1uL.js} +1 -1
- package/dist/ui/assets/{auth-section-BPGGH-pS.js → auth-section-CaQeee-F.js} +1 -1
- package/dist/ui/assets/{backups-section-taD9idsR.js → backups-section-hF88BjYJ.js} +1 -1
- package/dist/ui/assets/{checkbox-C2wWJ45q.js → checkbox-Dhm5Fzkb.js} +1 -1
- package/dist/ui/assets/cliproxy-BeYNWmY_.js +3 -0
- package/dist/ui/assets/{cliproxy-control-panel-D_JZc88E.js → cliproxy-control-panel-CJELeI80.js} +1 -1
- package/dist/ui/assets/{confirm-dialog-CQGjNqDg.js → confirm-dialog-Dn3SrwNV.js} +1 -1
- package/dist/ui/assets/{copilot-C55LbvKL.js → copilot-vwT-4_V4.js} +1 -1
- package/dist/ui/assets/{cursor-DRxLX6HL.js → cursor-CN3lIX63.js} +1 -1
- package/dist/ui/assets/{droid-DlECj4OZ.js → droid-DBP2yCY7.js} +2 -2
- package/dist/ui/assets/{globalenv-section-BZl3-nsE.js → globalenv-section-DNKAJasL.js} +1 -1
- package/dist/ui/assets/{health-KcXhO7a4.js → health-C7tNiLzc.js} +1 -1
- package/dist/ui/assets/icons-DrewC9c3.js +1 -0
- package/dist/ui/assets/index-C8-ef-r7.js +1 -0
- package/dist/ui/assets/{index-mxDT1Fbu.js → index-MGh88HoC.js} +1 -1
- package/dist/ui/assets/{index-fsXcStKP.js → index-QBUSDLTx.js} +1 -1
- package/dist/ui/assets/index-k-HuyjpO.js +47 -0
- package/dist/ui/assets/index-s-oTl3hW.css +1 -0
- package/dist/ui/assets/{index-D7S6Q5bp.js → index-uYnNU6Ut.js} +1 -1
- package/dist/ui/assets/{proxy-status-widget-BxkoV1g7.js → proxy-status-widget-CIm5vKY7.js} +1 -1
- package/dist/ui/assets/{radix-ui-DIWAxjEp.js → radix-ui-C1Gpgz6I.js} +1 -1
- package/dist/ui/assets/{separator-lXjk7_Ls.js → separator-BLVyAGAm.js} +1 -1
- package/dist/ui/assets/shared-CHH09ZNi.js +8 -0
- package/dist/ui/assets/{switch-lf-m6i0R.js → switch-CwLyB4JK.js} +1 -1
- package/dist/ui/assets/{tanstack-Hn82hibe.js → tanstack-DDJIhNJd.js} +1 -1
- package/dist/ui/assets/{updates-Dok03EVa.js → updates-VlxL3aum.js} +1 -1
- package/dist/ui/index.html +5 -5
- package/dist/web-server/routes/account-route-helpers.d.ts +3 -0
- package/dist/web-server/routes/account-route-helpers.d.ts.map +1 -1
- package/dist/web-server/routes/account-route-helpers.js.map +1 -1
- package/dist/web-server/routes/account-routes.d.ts.map +1 -1
- package/dist/web-server/routes/account-routes.js +124 -0
- package/dist/web-server/routes/account-routes.js.map +1 -1
- package/dist/web-server/routes/config-routes.d.ts.map +1 -1
- package/dist/web-server/routes/config-routes.js +14 -0
- package/dist/web-server/routes/config-routes.js.map +1 -1
- package/dist/web-server/shared-routes.d.ts.map +1 -1
- package/dist/web-server/shared-routes.js +350 -52
- package/dist/web-server/shared-routes.js.map +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/accounts-hMd2X1rs.js +0 -1
- package/dist/ui/assets/cliproxy-DQBcXCu5.js +0 -3
- package/dist/ui/assets/icons-D7XDTBCN.js +0 -1
- package/dist/ui/assets/index-BtROiILs.js +0 -47
- package/dist/ui/assets/index-C5CDmWs5.css +0 -1
- package/dist/ui/assets/index-Cl4dUJFw.js +0 -1
- package/dist/ui/assets/shared-NtPxxEp6.js +0 -1
|
@@ -1 +1 @@
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AC,OAAO,EAAE,QAAQ,CAAC,CAAC;YACrC,CAAC;QACH,CAAC;IACH,CAAC;CACF;AAED,kBAAe,aAAa,CAAC"}
|
package/dist/types/config.d.ts
CHANGED
|
@@ -87,6 +87,8 @@ export interface ProfileMetadata {
|
|
|
87
87
|
context_mode?: 'isolated' | 'shared';
|
|
88
88
|
/** Context-sharing group when context_mode='shared' */
|
|
89
89
|
context_group?: string;
|
|
90
|
+
/** Shared continuity depth when context_mode='shared' */
|
|
91
|
+
continuity_mode?: 'standard' | 'deeper';
|
|
90
92
|
}
|
|
91
93
|
export interface ProfilesRegistry {
|
|
92
94
|
profiles: Record<string, ProfileMetadata>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,mBAAmB,CAAC;AAC1D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AAE5D;;;GAGG;AACH,MAAM,WAAW,cAAc;IAC7B,CAAC,WAAW,EAAE,MAAM,GAAG,MAAM,CAAC;CAC/B;AAED;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,+BAA+B;IAC/B,QAAQ,EAAE,gBAAgB,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,qFAAqF;IACrF,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,oDAAoD;IACpD,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,2DAA2D;IAC3D,MAAM,CAAC,EAAE,UAAU,CAAC;CACrB;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,CAAC,WAAW,EAAE,MAAM,GAAG,qBAAqB,CAAC;CAC9C;AAED;;;GAGG;AACH,MAAM,WAAW,MAAM;IACrB,gDAAgD;IAChD,QAAQ,EAAE,cAAc,CAAC;IACzB,qDAAqD;IACr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,IAAI,CAAC;IAC1B,8CAA8C;IAC9C,YAAY,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;IACrC,uDAAuD;IACvD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,yDAAyD;IACzD,eAAe,CAAC,EAAE,UAAU,GAAG,QAAQ,CAAC;CACzC;AAED,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAC;CAC3C;AAED;;GAEG;AACH,wBAAgB,QAAQ,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,MAAM,CAIpD;AAED,wBAAgB,UAAU,CAAC,GAAG,EAAE,OAAO,GAAG,GAAG,IAAI,QAAQ,CAMxD"}
|
package/dist/types/config.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;
|
|
1
|
+
{"version":3,"file":"config.js","sourceRoot":"","sources":["../../src/types/config.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAuGH;;GAEG;AACH,SAAgB,QAAQ,CAAC,GAAY;IACnC,OAAO,CACL,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI,IAAI,UAAU,IAAI,GAAG,IAAI,OAAO,GAAG,CAAC,QAAQ,KAAK,QAAQ,CACjG,CAAC;AACJ,CAAC;AAJD,4BAIC;AAED,SAAgB,UAAU,CAAC,GAAY;IACrC,IAAI,OAAO,GAAG,KAAK,QAAQ,IAAI,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAC1D,IAAI,CAAC,CAAC,KAAK,IAAI,GAAG,CAAC;QAAE,OAAO,IAAI,CAAC,CAAC,kBAAkB;IACpD,IAAI,OAAO,GAAG,CAAC,GAAG,KAAK,QAAQ,IAAI,GAAG,CAAC,GAAG,KAAK,IAAI;QAAE,OAAO,KAAK,CAAC;IAClE,sCAAsC;IACtC,OAAO,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,OAAO,CAAC,KAAK,QAAQ,CAAC,CAAC;AACpE,CAAC;AAND,gCAMC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./radix-ui-C1Gpgz6I.js";import{r as j,h as ge}from"./react-vendor-CNOkPC89.js";import{u as je,a as L,b as z,d as fe,f as I,g as ye}from"./tanstack-DDJIhNJd.js";import{c as y,W as D,a5 as ne,a6 as re,a7 as oe,a8 as ce,a9 as le,L as v,q as U,r as K,s as B,t as Q,v as M,I as G,an as Ne,b as d,C as k,i as S,j as _,Y as T,B as F,a as A,K as ie,M as de,N as ue,m as be,w as Z}from"./index-k-HuyjpO.js";import{A as Ce,a as ve,b as we,c as ke,d as Se,e as _e,f as Ae,g as De}from"./alert-dialog-CetY4Iww.js";import{t as N}from"./notifications-B2HqRBj7.js";import{w as Pe,aE as Te,aF as Le,k as H,ah as ze,z as Me,m as V,aG as Fe,am as O,aH as Oe,aI as Ee,Y as xe,aJ as Ge,aK as He,U as Re,a0 as X,Z as W,T as $e}from"./icons-DrewC9c3.js";import{C as Y}from"./checkbox-Dhm5Fzkb.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";function qe({className:a,...s}){return e.jsx("div",{"data-slot":"table-container",className:"relative w-full overflow-x-auto",children:e.jsx("table",{"data-slot":"table",className:y("w-full caption-bottom text-sm",a),...s})})}function Ie({className:a,...s}){return e.jsx("thead",{"data-slot":"table-header",className:y("[&_tr]:border-b",a),...s})}function Ue({className:a,...s}){return e.jsx("tbody",{"data-slot":"table-body",className:y("[&_tr:last-child]:border-0",a),...s})}function J({className:a,...s}){return e.jsx("tr",{"data-slot":"table-row",className:y("hover:bg-muted/50 data-[state=selected]:bg-muted border-b transition-colors",a),...s})}function Ke({className:a,...s}){return e.jsx("th",{"data-slot":"table-head",className:y("text-foreground h-10 px-2 text-left align-middle font-medium whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...s})}function Be({className:a,...s}){return e.jsx("td",{"data-slot":"table-cell",className:y("p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]",a),...s})}function Qe(){return je({queryKey:["accounts"],queryFn:()=>D.accounts.list(),select:a=>{const s=a.accounts.filter(i=>i.type!=="cliproxy"),r=a.accounts.length-s.length,n=s.filter(i=>i.context_mode==="shared").length,c=s.filter(i=>i.context_mode==="shared"&&i.continuity_mode==="deeper").length,u=Math.max(n-c,0),x=s.length-n,p=s.filter(i=>i.context_inferred).length,g=s.filter(i=>i.context_mode==="shared"&&i.continuity_mode!=="deeper"&&i.continuity_inferred).length,m=s.some(i=>i.name===a.default)?a.default:null;return{accounts:s,default:m,cliproxyCount:r,legacyContextCount:p,legacyContinuityCount:g,sharedCount:n,sharedStandardCount:u,deeperSharedCount:c,isolatedCount:x}}})}function Ze(){const a=L();return z({mutationFn:s=>D.accounts.setDefault(s),onSuccess:(s,r)=>{a.invalidateQueries({queryKey:["accounts"]}),N.success(`Default account set to "${r}"`)},onError:s=>{N.error(s.message)}})}function Ve(){const a=L();return z({mutationFn:()=>D.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),N.success("Default account reset to CCS")},onError:s=>{N.error(s.message)}})}function Xe(){const a=L();return z({mutationFn:s=>D.accounts.delete(s),onSuccess:(s,r)=>{a.invalidateQueries({queryKey:["accounts"]}),N.success(`Account "${r}" deleted`)},onError:s=>{N.error(s.message)}})}function me(){const a=L();return z({mutationFn:({name:s,context_mode:r,context_group:n,continuity_mode:c})=>D.accounts.updateContext(s,{context_mode:r,context_group:n,continuity_mode:c}),onSuccess:(s,r)=>{a.invalidateQueries({queryKey:["accounts"]});const n=r.context_mode==="shared"?r.continuity_mode==="deeper"?`shared (${(r.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(r.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";N.success(`Updated "${r.name}" context to ${n}`)},onError:s=>{N.error(s.message)}})}function We(){const a=L();return z({mutationFn:async s=>{const r=s.filter(n=>n.context_inferred||n.continuity_inferred);for(const n of r){const c=n.context_mode==="shared";await D.accounts.updateContext(n.name,{context_mode:c?"shared":"isolated",context_group:c?n.context_group||"default":void 0,continuity_mode:c?n.continuity_mode==="deeper"?"deeper":"standard":void 0})}return{updatedCount:r.length}},onSuccess:({updatedCount:s})=>{if(a.invalidateQueries({queryKey:["accounts"]}),s>0){N.success(`Confirmed explicit sync mode for ${s} legacy account${s>1?"s":""}`);return}N.info("No legacy accounts need confirmation")},onError:s=>{N.error(s.message)}})}const ee=64,Ye=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function Je({account:a,onClose:s}){const r=me(),[n,c]=j.useState(a.context_mode==="shared"?"shared":"isolated"),[u,x]=j.useState(a.context_group||"default"),[p,g]=j.useState(a.continuity_mode==="deeper"?"deeper":"standard"),m=j.useMemo(()=>u.trim().toLowerCase().replace(/\s+/g,"-"),[u]),i=m.length>0&&m.length<=ee&&Ye.test(m),f=n==="isolated"||i,t=()=>{f&&r.mutate({name:a.name,context_mode:n,context_group:n==="shared"?m:void 0,continuity_mode:n==="shared"?p:void 0},{onSuccess:()=>{s()}})},o=l=>{l||s()};return e.jsx(ne,{open:!0,onOpenChange:o,children:e.jsxs(re,{className:"sm:max-w-md",children:[e.jsxs(oe,{children:[e.jsx(ce,{children:"Edit History Sync"}),e.jsxs(le,{children:['Configure how "',a.name,'" shares history and continuity with other',e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),"accounts."]})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"context-mode",children:"Sync Mode"}),e.jsxs(U,{value:n,onValueChange:l=>c(l),children:[e.jsx(K,{id:"context-mode",children:e.jsx(B,{placeholder:"Select context mode"})}),e.jsxs(Q,{children:[e.jsx(M,{value:"isolated",children:"isolated (no sync)"}),e.jsx(M,{value:"shared",children:"shared (sync enabled)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:n==="shared"?"Shared mode reuses workspace context for accounts in the same history sync group.":"Isolated mode keeps this account fully separate from other ccs auth accounts."})]}),n==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"context-group",children:"History Sync Group"}),e.jsx(G,{id:"context-group",value:u,onChange:l=>x(l.target.value),placeholder:"default",autoComplete:"off"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Normalized to lowercase (spaces become dashes). Allowed: letters, numbers, `_`, `-` (max ",ee," chars)."]}),!i&&e.jsx("p",{className:"text-xs text-destructive",children:"Enter a valid group name that starts with a letter."})]}),n==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"continuity-mode",children:"Continuity Depth"}),e.jsxs(U,{value:p,onValueChange:l=>g(l),children:[e.jsx(K,{id:"continuity-mode",children:e.jsx(B,{placeholder:"Select continuity depth"})}),e.jsxs(Q,{children:[e.jsx(M,{value:"standard",children:"standard (projects only)"}),e.jsx(M,{value:"deeper",children:"deeper continuity (advanced)"})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:p==="deeper"?"Advanced mode also syncs session-env, file-history, shell-snapshots, and todos.":"Standard mode syncs project workspace context only."})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Credentials and `.anthropic` remain isolated per account in all modes."})]}),e.jsxs(Ne,{children:[e.jsx(d,{variant:"outline",onClick:s,disabled:r.isPending,children:"Cancel"}),e.jsx(d,{onClick:t,disabled:!f||r.isPending,children:r.isPending?"Saving...":"Save"})]})]})})}function se({data:a,defaultAccount:s}){const r=Ze(),n=Xe(),c=Ve(),u=me(),[x,p]=j.useState(null),[g,m]=j.useState(null),f=fe({data:a,columns:[{accessorKey:"name",header:"Name",size:200,cell:({row:t})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:t.original.name}),t.original.name===s&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:"default"})]})},{accessorKey:"type",header:"Type",size:100,cell:({row:t})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:t.original.type||"oauth"})},{accessorKey:"created",header:"Created",size:150,cell:({row:t})=>{const o=new Date(t.original.created);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{accessorKey:"last_used",header:"Last Used",size:150,cell:({row:t})=>{if(!t.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const o=new Date(t.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{id:"context",header:"History Sync",size:170,cell:({row:t})=>{if(t.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((t.original.context_mode||"isolated")==="shared"){const l=t.original.context_group||"default";return t.original.continuity_mode==="deeper"?e.jsxs("span",{className:"text-muted-foreground",children:["shared (",l,", deeper)"]}):t.original.continuity_inferred?e.jsxs("span",{className:"text-amber-700 dark:text-amber-400",children:["shared (",l,", standard legacy)"]}):e.jsxs("span",{className:"text-muted-foreground",children:["shared (",l,", standard)"]})}return t.original.context_inferred?e.jsx("span",{className:"text-amber-700 dark:text-amber-400",children:"isolated (legacy default)"}):e.jsx("span",{className:"text-muted-foreground",children:"isolated"})}},{id:"actions",header:"Actions",size:220,cell:({row:t})=>{const o=t.original.name===s,l=r.isPending||n.isPending||u.isPending,b=t.original.type==="cliproxy",w=t.original.context_inferred||t.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!b&&e.jsxs(d,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:l,onClick:()=>m(t.original),title:"Edit sync mode, group, and continuity depth",children:[e.jsx(Te,{className:"w-3.5 h-3.5 mr-1"}),"Sync"]}),!b&&w&&e.jsxs(d,{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:l,onClick:()=>u.mutate({name:t.original.name,context_mode:t.original.context_mode==="shared"?"shared":"isolated",context_group:t.original.context_mode==="shared"?t.original.context_group||"default":void 0,continuity_mode:t.original.context_mode==="shared"?t.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:"Confirm this legacy account's current mode as explicit",children:[e.jsx(Le,{className:"w-3 h-3 mr-1"}),"Confirm"]}),e.jsxs(d,{variant:o?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:o||l,onClick:()=>r.mutate(t.original.name),children:[e.jsx(H,{className:`w-3 h-3 mr-1 ${o?"opacity-50":""}`}),o?"Active":"Set Default"]}),e.jsx(d,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:o||l,onClick:()=>p(t.original.name),title:o?"Cannot delete default account":"Delete account",children:e.jsx(ze,{className:"w-4 h-4"})})]})}}],getCoreRowModel:ye()});return a.length===0?e.jsxs("div",{className:"text-center py-8 text-muted-foreground",children:["No CCS auth accounts found. Use"," ",e.jsx("code",{className:"text-sm bg-muted px-1 rounded",children:"ccs auth create"})," to add accounts."]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(qe,{children:[e.jsx(Ie,{children:f.getHeaderGroups().map(t=>e.jsx(J,{children:t.headers.map(o=>{const l={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[o.id]||"w-auto";return e.jsx(Ke,{className:l,children:o.isPlaceholder?null:I(o.column.columnDef.header,o.getContext())},o.id)})},t.id))}),e.jsx(Ue,{children:f.getRowModel().rows.map(t=>e.jsx(J,{children:t.getVisibleCells().map(o=>e.jsx(Be,{children:I(o.column.columnDef.cell,o.getContext())},o.id))},t.id))})]})}),s&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(d,{variant:"outline",size:"sm",onClick:()=>c.mutate(),disabled:c.isPending,children:[e.jsx(Pe,{className:"w-4 h-4 mr-2"}),"Reset to CCS Default"]})})]}),g&&e.jsx(Je,{account:g,onClose:()=>m(null)}),e.jsx(Ce,{open:!!x,onOpenChange:t=>!t&&p(null),children:e.jsxs(ve,{children:[e.jsxs(we,{children:[e.jsx(ke,{children:"Delete Account"}),e.jsxs(Se,{children:['Are you sure you want to delete the account "',x,'"? This will remove the profile and all its session data. This action cannot be undone.']})]}),e.jsxs(_e,{children:[e.jsx(Ae,{children:"Cancel"}),e.jsx(De,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{x&&(n.mutate(x),p(null))},children:"Delete"})]})]})})]})}const te=64;function es({open:a,onClose:s}){const[r,n]=j.useState(""),[c,u]=j.useState(!1),[x,p]=j.useState(""),[g,m]=j.useState(!1),[i,f]=j.useState(!1),t=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(r),o=x.trim().toLowerCase().replace(/\s+/g,"-"),l=o.length===0||o.length<=te&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),b=r&&t?[`ccs auth create ${r}`,c?o.length>0?`--context-group ${o}`:"--share-context":"",c&&g?"--deeper-continuity":""].filter(Boolean).join(" "):"ccs auth create <name>",w=async()=>{!t||c&&!l||(await navigator.clipboard.writeText(b),f(!0),setTimeout(()=>f(!1),2e3))},P=()=>{n(""),u(!1),p(""),m(!1),f(!1),s()};return e.jsx(ne,{open:a,onOpenChange:h=>!h&&P(),children:e.jsxs(re,{className:"sm:max-w-md",children:[e.jsxs(oe,{children:[e.jsx(ce,{children:"Create New Account"}),e.jsx(le,{children:"Auth profiles require Claude CLI login. Run the command below in your terminal. You can edit sync mode, group, and continuity depth later from the Accounts table."})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{htmlFor:"profile-name",children:"Profile Name"}),e.jsx(G,{id:"profile-name",value:r,onChange:h=>n(h.target.value),placeholder:"e.g., work, personal, client",autoComplete:"off"}),r&&!t&&e.jsx("p",{className:"text-xs text-destructive",children:"Name must start with a letter and contain only letters, numbers, dashes, or underscores."})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Y,{id:"share-context",checked:c,onCheckedChange:h=>u(h===!0)}),e.jsx(v,{htmlFor:"share-context",className:"cursor-pointer",children:"Enable shared history sync with other ccs auth accounts"})]}),c&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(v,{htmlFor:"context-group",children:"History Sync Group (optional)"}),e.jsx(G,{id:"context-group",value:x,onChange:h=>p(h.target.value),placeholder:"default, sprint-a, client-x",autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Leave empty to use the default shared group. Spaces are normalized to dashes."}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(Y,{id:"deeper-continuity",checked:g,onCheckedChange:h=>m(h===!0)}),e.jsx(v,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:"Advanced: deeper continuity mode"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Adds sync for ",e.jsx("code",{children:"session-env"}),", ",e.jsx("code",{children:"file-history"}),","," ",e.jsx("code",{children:"shell-snapshots"}),", and ",e.jsx("code",{children:"todos"}),". Credentials stay isolated."]}),x.trim().length>0&&!l&&e.jsxs("p",{className:"text-xs text-destructive",children:["Group must start with a letter and use only letters, numbers, dashes, or underscores (max ",te," chars)."]})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(v,{children:"Command"}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Me,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:b}),e.jsx(d,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:w,disabled:!t||c&&!l,children:i?e.jsx(H,{className:"w-4 h-4 text-green-500"}):e.jsx(V,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:"After running the command:"}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:"Complete the Claude login in your browser"}),e.jsx("li",{children:"Return here and refresh to see the new account"})]}),e.jsx("p",{className:"pt-1",children:"Prefer pooled Claude OAuth routing instead? Use CLIProxy Claude pool from the Accounts page action button."})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(d,{variant:"ghost",onClick:P,children:"Close"}),e.jsx(d,{onClick:w,disabled:!t||c&&!l,children:i?e.jsxs(e.Fragment,{children:[e.jsx(H,{className:"w-4 h-4 mr-2"}),"Copied!"]}):e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"w-4 h-4 mr-2"}),"Copy Command"]})})]})]})]})})}function E({title:a,count:s,icon:r,tone:n}){const c={isolated:{border:"border-blue-300/60 bg-blue-50/40 dark:border-blue-900/40 dark:bg-blue-900/10",icon:"text-blue-700 dark:text-blue-400",count:"text-blue-700 dark:text-blue-400"},shared:{border:"border-emerald-300/60 bg-emerald-50/40 dark:border-emerald-900/40 dark:bg-emerald-900/10",icon:"text-emerald-700 dark:text-emerald-400",count:"text-emerald-700 dark:text-emerald-400"},deeper:{border:"border-indigo-300/60 bg-indigo-50/40 dark:border-indigo-900/40 dark:bg-indigo-900/10",icon:"text-indigo-700 dark:text-indigo-400",count:"text-indigo-700 dark:text-indigo-400"}};return e.jsxs("div",{className:y("rounded-md border p-2.5",c[n].border),children:[e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsx("p",{className:"text-xs font-semibold",children:a}),e.jsx(r,{className:y("h-3.5 w-3.5",c[n].icon)})]}),e.jsx("p",{className:y("mt-1 text-lg font-mono font-semibold",c[n].count),children:s})]})}function ae({isolatedCount:a,sharedStandardCount:s,deeperSharedCount:r,sharedGroups:n,legacyTargetCount:c,cliproxyCount:u}){const[x,p]=j.useState(!1),g=n.length>0?n:["default"];return e.jsxs(k,{className:"border-dashed",children:[e.jsx(S,{className:"pb-2",children:e.jsxs("div",{className:"flex items-center justify-between gap-2",children:[e.jsxs("div",{children:[e.jsx(_,{className:"text-base",children:"How History Sync Works"}),e.jsxs(T,{className:"mt-1",children:["Isolated -> Shared -> Deeper. Use ",e.jsx("code",{children:"Sync"})," per row for all changes."]})]}),e.jsx(F,{variant:"outline",children:"Learning Map"})]})}),e.jsxs(A,{className:"space-y-3",children:[u>0&&e.jsxs("div",{className:"rounded-md border border-blue-300/60 bg-blue-50/40 px-3 py-2 text-xs text-blue-800 dark:border-blue-900/40 dark:bg-blue-900/10 dark:text-blue-300",children:[u," CLIProxy Claude pool account",u>1?"s are":" is","managed in Action Center / CLIProxy page."]}),e.jsxs("div",{className:"grid gap-2 sm:grid-cols-[1fr_auto_1fr_auto_1fr] sm:items-center",children:[e.jsx(E,{title:"Isolated",count:a,icon:Fe,tone:"isolated"}),e.jsx("div",{className:"hidden sm:flex justify-center text-muted-foreground",children:e.jsx(O,{className:"h-4 w-4"})}),e.jsx(E,{title:"Shared",count:s,icon:Oe,tone:"shared"}),e.jsx("div",{className:"hidden sm:flex justify-center text-muted-foreground",children:e.jsx(O,{className:"h-4 w-4"})}),e.jsx(E,{title:"Deeper",count:r,icon:Ee,tone:"deeper"})]}),e.jsxs(ie,{open:x,onOpenChange:p,children:[e.jsx(de,{asChild:!0,children:e.jsxs(d,{variant:"ghost",className:"h-8 w-full justify-between rounded-md px-2 text-xs text-muted-foreground hover:bg-muted/40 hover:text-foreground",children:[e.jsx("span",{children:"Show details: groups, switching, and legacy policy"}),e.jsx(xe,{className:y("h-4 w-4 transition-transform",x&&"rotate-180")})]})}),e.jsxs(ue,{className:"pt-2",children:[e.jsxs("div",{className:"grid gap-2 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ge,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("p",{className:"font-semibold",children:"Mode Switch"})]}),e.jsx("p",{className:"mt-1 text-muted-foreground",children:"Sync dialog lets users move between isolated/shared and choose deeper continuity."})]}),e.jsxs("div",{className:"rounded-md border bg-muted/20 p-2.5 text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(He,{className:"h-3.5 w-3.5 text-muted-foreground"}),e.jsx("p",{className:"font-semibold",children:"History Sync Group"})]}),e.jsxs("p",{className:"mt-1 text-muted-foreground",children:["Same group means shared project context lane. Default fallback is"," ",e.jsx("code",{children:"default"}),"."]}),e.jsx("div",{className:"mt-2 flex flex-wrap gap-1.5",children:g.map(m=>e.jsx(F,{variant:"outline",className:"font-mono text-[10px]",children:m},m))})]})]}),c>0&&e.jsxs("div",{className:"mt-2 rounded-md border border-amber-500/50 bg-amber-500/10 px-3 py-2 text-xs text-amber-800 dark:text-amber-300",children:[c," legacy account",c>1?"s still need":" still needs"," explicit confirmation."]})]})]})]})]})}function xs(){const a=ge(),{data:s,isLoading:r}=Qe(),n=We(),[c,u]=j.useState(!1),[x,p]=j.useState(!1),g=s?.accounts||[],m=s?.cliproxyCount||0,i=s?.legacyContextCount||0,f=s?.legacyContinuityCount||0,t=s?.sharedCount||0,o=s?.sharedStandardCount||0,l=s?.deeperSharedCount||0,b=s?.isolatedCount||0,w=Array.from(new Set(g.filter(C=>C.context_mode==="shared").map(C=>C.context_group||"default"))).sort((C,pe)=>C.localeCompare(pe)),P=g.filter(C=>C.context_inferred||C.continuity_inferred),h=P.length,he=h>0,R=()=>a("/cliproxy?provider=claude"),$=()=>a("/cliproxy?provider=claude&action=auth"),q=()=>n.mutate(P);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"h-[calc(100vh-100px)] hidden 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(Re,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"Accounts"})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Manage",e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),"accounts and pool onboarding from one panel."]})]}),e.jsx(be,{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:"Primary Actions"}),e.jsxs(d,{size:"sm",className:"w-full justify-start",onClick:()=>u(!0),children:[e.jsx(X,{className:"w-4 h-4 mr-2"}),"Create Account"]}),e.jsxs(d,{size:"sm",className:"w-full justify-start",onClick:$,children:[e.jsx(W,{className:"w-4 h-4 mr-2"}),"Authenticate Claude in Pool"]}),e.jsxs(d,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:R,children:["Open Claude Pool Settings",e.jsx(O,{className:"w-4 h-4 ml-auto"})]})]}),he?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:"Migration Follow-up"}),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($e,{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:[i>0&&e.jsxs("p",{className:"text-amber-800 dark:text-amber-300",children:[i," account",i>1?"s still need":" still needs"," first-time mode confirmation."]}),f>0&&e.jsxs("p",{className:"text-amber-800 dark:text-amber-300",children:[f," shared account",f>1?"s remain":" remains"," on standard legacy continuity depth."]})]})]}),e.jsx(d,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:q,disabled:n.isPending||h===0,children:n.isPending?"Confirming Legacy Policies...":`Confirm Legacy Policies (${h})`})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:"No legacy follow-up pending."}),e.jsx(ie,{open:x,onOpenChange:p,children:e.jsxs(k,{children:[e.jsx(S,{className:"pb-2",children:e.jsx(de,{asChild:!0,children:e.jsxs(d,{variant:"ghost",className:"h-auto w-full justify-between px-0 py-0",children:[e.jsxs("div",{className:"text-left",children:[e.jsx(_,{className:"text-sm",children:"Continuity Guide"}),e.jsx(T,{className:"mt-1",children:"Expand only when needed."})]}),e.jsx(xe,{className:y("h-4 w-4 transition-transform",x&&"rotate-180")})]})})}),e.jsx(ue,{children:e.jsxs(A,{className:"space-y-3 text-xs text-muted-foreground",children:[e.jsxs("div",{className:"rounded-md border p-2.5",children:[e.jsx("p",{className:"font-semibold text-foreground",children:"Shared Standard"}),e.jsx("p",{className:"mt-1",children:"Project workspace sync only. Best default for most teams."})]}),e.jsxs("div",{className:"rounded-md border p-2.5",children:[e.jsx("p",{className:"font-semibold text-foreground",children:"Shared Deeper"}),e.jsxs("p",{className:"mt-1",children:["Adds ",e.jsx("code",{children:"session-env"}),", ",e.jsx("code",{children:"file-history"}),","," ",e.jsx("code",{children:"shell-snapshots"}),", ",e.jsx("code",{children:"todos"}),"."]})]}),e.jsxs("div",{className:"rounded-md border p-2.5",children:[e.jsx("p",{className:"font-semibold text-foreground",children:"Isolated"}),e.jsx("p",{className:"mt-1",children:"No link. Best for strict separation."})]})]})})]})}),e.jsxs(k,{children:[e.jsxs(S,{className:"pb-2",children:[e.jsx(_,{className:"text-sm",children:"Quick Commands"}),e.jsx(T,{children:"Copy and run in terminal."})]}),e.jsxs(A,{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(Z,{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(Z,{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(F,{variant:"outline",children:"ccs auth Workspace"}),e.jsx(F,{variant:"secondary",children:"History Sync Controls"})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:"Auth Accounts"}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:["This table is intentionally scoped to",e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),"accounts. Use",e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"Sync"}),"for mode/group/depth changes."]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ae,{isolatedCount:b,sharedStandardCount:o,deeperSharedCount:l,sharedGroups:w,legacyTargetCount:h,cliproxyCount:m}),e.jsxs(k,{className:"flex flex-col",children:[e.jsxs(S,{className:"pb-3",children:[e.jsx(_,{className:"text-lg",children:"Account Matrix"}),e.jsxs(T,{children:["Shared total: ",t,". Actions include Sync settings and legacy confirmation."]})]}),e.jsx(A,{children:r?e.jsx("div",{className:"text-muted-foreground",children:"Loading accounts..."}):e.jsx(se,{data:g,defaultAccount:s?.default??null})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(k,{children:[e.jsxs(S,{children:[e.jsx(_,{className:"text-lg",children:"Accounts"}),e.jsxs(T,{children:["Manage",e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),"continuity per account."]})]}),e.jsxs(A,{className:"space-y-2",children:[e.jsxs(d,{className:"w-full",onClick:()=>u(!0),children:[e.jsx(X,{className:"w-4 h-4 mr-2"}),"Create Account"]}),e.jsxs(d,{variant:"outline",className:"w-full",onClick:R,children:["Open CLIProxy Claude Pool",e.jsx(O,{className:"w-4 h-4 ml-2"})]}),e.jsxs(d,{variant:"outline",className:"w-full",onClick:$,children:["Authenticate Claude in Pool",e.jsx(W,{className:"w-4 h-4 ml-2"})]}),e.jsx(d,{variant:"outline",className:"w-full",onClick:q,disabled:n.isPending||h===0,children:n.isPending?"Confirming Legacy Policies...":`Confirm Legacy Policies (${h})`})]})]}),e.jsx(ae,{isolatedCount:b,sharedStandardCount:o,deeperSharedCount:l,sharedGroups:w,legacyTargetCount:h,cliproxyCount:m}),e.jsxs(k,{children:[e.jsx(S,{className:"pb-3",children:e.jsx(_,{className:"text-base",children:"Account Matrix"})}),e.jsx(A,{children:r?e.jsx("div",{className:"text-muted-foreground",children:"Loading accounts..."}):e.jsx(se,{data:g,defaultAccount:s?.default??null})})]})]}),e.jsx(es,{open:c,onClose:()=>u(!1)})]})}export{xs as AccountsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a4 as s,a5 as r,a6 as n,a7 as i,a8 as d,a9 as c,aa as u,ab as f}from"./radix-ui-
|
|
1
|
+
import{j as e,a4 as s,a5 as r,a6 as n,a7 as i,a8 as d,a9 as c,aa as u,ab as f}from"./radix-ui-C1Gpgz6I.js";import"./react-vendor-CNOkPC89.js";import{c as o,bl as l}from"./index-k-HuyjpO.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-DIWAxjEp.js";import{r as o}from"./react-vendor-CNOkPC89.js";import{B as k,c as _,T as Oe,o as Te,p as Ae,q as Ee,r as _e,s as Se,t as ke,v as se,b as N,I as A,m as K,L as T,w as D,x as de,y as Pe,z as Re,A as De,D as Me,S as te,E as H,F as Y,G as xe,H as Le,J as Ie,K as me,M as ue,N as he,O as Ue,Q as He,R as ae,U as ne,V as Fe,W as $e,X as W,C as Ke,i as ze,j as Je,Y as Be,a as Qe,Z as qe,_ as Ve,$ as Ye,a0 as Ge}from"./index-BtROiILs.js";import{a as We,u as Xe,b as re}from"./tanstack-Hn82hibe.js";import{C as G}from"./confirm-dialog-CQGjNqDg.js";import{t as I}from"./notifications-B2HqRBj7.js";import{L as F,R as z,ah as fe,ai as Ze,E as es,e as ss,a0 as $,I as ts,aj as pe,a1 as X,c as ge,ak as as,$ as ns,al as rs,n as je,X as is,Z as Ne,am as ls,a5 as cs,a2 as ve,an as os,r as be}from"./icons-D7XDTBCN.js";import{S as ie}from"./separator-lXjk7_Ls.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-DYqj_ln8.js";function ds({className:s,showTooltip:a=!0}){const t=e.jsxs(k,{variant:"outline",className:_("bg-accent/10 border-accent/30 text-accent","dark:bg-accent/20 dark:border-accent/40 dark:text-accent-foreground",s),children:[e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"mr-1 h-3 w-3"}),"OpenRouter"]});return a?e.jsxs(Oe,{children:[e.jsx(Te,{asChild:!0,children:t}),e.jsx(Ae,{children:e.jsx("p",{children:"Access 349+ models via OpenRouter"})})]}):t}function le(s){return[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/^API_KEY$/,/^AUTH_TOKEN$/,/_SECRET$/,/^SECRET$/].some(t=>t.test(s))}function we(s){return s?.env?(s.env.ANTHROPIC_BASE_URL||"").toLowerCase().includes("openrouter.ai"):!1}function xs(s){return{opus:s.ANTHROPIC_DEFAULT_OPUS_MODEL||void 0,sonnet:s.ANTHROPIC_DEFAULT_SONNET_MODEL||void 0,haiku:s.ANTHROPIC_DEFAULT_HAIKU_MODEL||void 0}}function ms(s,a){const t={...s};return a.opus?t.ANTHROPIC_DEFAULT_OPUS_MODEL=a.opus:delete t.ANTHROPIC_DEFAULT_OPUS_MODEL,a.sonnet?t.ANTHROPIC_DEFAULT_SONNET_MODEL=a.sonnet:delete t.ANTHROPIC_DEFAULT_SONNET_MODEL,a.haiku?t.ANTHROPIC_DEFAULT_HAIKU_MODEL=a.haiku:delete t.ANTHROPIC_DEFAULT_HAIKU_MODEL,t}function us({profileName:s,target:a,data:t,settings:d,isLoading:x,isSaving:m,isTargetSaving:f,hasChanges:l,isRawJsonValid:i,onTargetChange:u,onRefresh:g,onDelete:O,onSave:b}){const v=m||f,j=x||v;return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),t?.path&&e.jsx(k,{variant:"outline",className:"text-xs",children:t.path.replace(/^.*\//,"")}),we(d)&&e.jsx(ds,{className:"ml-1"})]}),t&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last modified: ",new Date(t.mtime).toLocaleString()]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Default target:"}),e.jsxs(Ee,{value:a,onValueChange:w=>{j||u(w)},disabled:j,children:[e.jsx(_e,{className:"h-7 w-[170px] text-xs",disabled:j,children:e.jsx(Se,{})}),e.jsxs(ke,{children:[e.jsx(se,{value:"claude",children:"Claude Code"}),e.jsx(se,{value:"droid",children:"Factory Droid"})]})]}),f&&e.jsx(F,{className:"w-3.5 h-3.5 animate-spin text-muted-foreground"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"ghost",size:"sm",onClick:g,disabled:j,children:e.jsx(z,{className:`w-4 h-4 ${x?"animate-spin":""}`})}),O&&e.jsx(N,{variant:"ghost",size:"sm",onClick:O,disabled:v,children:e.jsx(fe,{className:"w-4 h-4 text-destructive"})}),e.jsx(N,{size:"sm",onClick:b,disabled:v||!l||!i,children:m?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Ce({label:s,...a}){const[t,d]=o.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[s&&e.jsx("label",{className:"text-sm font-medium",children:s}),e.jsxs("div",{className:"relative",children:[e.jsx(A,{type:t?"text":"password",className:"pr-10 font-mono",...a}),e.jsx(N,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:()=>d(!t),tabIndex:-1,children:t?e.jsx(es,{className:"w-4 h-4"}):e.jsx(ss,{className:"w-4 h-4"})})]})]})}function hs({currentSettings:s,newEnvKey:a,newEnvValue:t,onNewEnvKeyChange:d,onNewEnvValueChange:x,onEnvValueChange:m,onAddEnvVar:f}){return e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"flex-1",children:e.jsx("div",{className:"p-4 space-y-4",children:s?.env&&Object.keys(s.env).length>0?e.jsx(e.Fragment,{children:Object.entries(s.env).map(([l,i])=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(T,{className:"text-xs font-medium flex items-center gap-2 text-muted-foreground",children:[l,le(l)&&e.jsx(k,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"sensitive"})]}),le(l)?e.jsx(Ce,{value:i,onChange:u=>m(l,u.target.value),className:"font-mono text-sm h-8"}):e.jsx(A,{value:i,onChange:u=>m(l,u.target.value),className:"font-mono text-sm h-8"})]},l))}):e.jsxs("div",{className:"py-8 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed text-sm",children:[e.jsx("p",{children:"No environment variables configured."}),e.jsx("p",{className:"text-xs mt-1 opacity-70",children:"Add variables using the input below or edit the JSON directly."})]})})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(T,{className:"text-xs font-medium text-muted-foreground",children:"Add Environment Variable"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(A,{placeholder:"VARIABLE_NAME",value:a,onChange:l=>d(l.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:l=>l.key==="Enter"&&a.trim()&&f()}),e.jsx(A,{placeholder:"value",value:t,onChange:l=>x(l.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:l=>l.key==="Enter"&&a.trim()&&f()}),e.jsx(N,{variant:"outline",size:"sm",className:"h-8",onClick:f,disabled:!a.trim(),children:e.jsx($,{className:"w-4 h-4"})})]})]})]})}function fs({profileName:s,target:a,data:t}){const d=a==="droid";return e.jsx(K,{className:"h-full",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2 mb-3",children:[e.jsx(ts,{className:"w-4 h-4"}),"Profile Information"]}),e.jsx("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Profile Name"}),e.jsx("span",{className:"font-mono",children:t.profile})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"File Path"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:t.path}),e.jsx(D,{value:t.path,size:"icon",className:"h-5 w-5"})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Last Modified"}),e.jsx("span",{className:"text-xs",children:new Date(t.mtime).toLocaleString()})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Default Target"}),e.jsx("span",{className:"font-mono",children:a})]})]})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"Run with profile"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s,' "prompt"']}),e.jsx(D,{value:`ccs ${s} "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:d?"Droid alias (explicit)":"Run on Droid"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsx("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:d?`ccsd ${s} "prompt"`:`ccs ${s} --target droid "prompt"`}),e.jsx(D,{value:d?`ccsd ${s} "prompt"`:`ccs ${s} --target droid "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:d?"Override to Claude":"Override to Claude (explicit)"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s,' --target claude "prompt"']}),e.jsx(D,{value:`ccs ${s} --target claude "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"Set as default"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs default ",s]}),e.jsx(D,{value:`ccs default ${s}`,size:"icon",className:"h-6 w-6"})]})]})]})]})]})})}function ps({value:s,onChange:a,placeholder:t="Search models...",className:d}){const[x,m]=o.useState(""),[f,l]=o.useState(null),{models:i,isLoading:u,isError:g,isFetching:O}=de(),b=Pe(),v=o.useMemo(()=>Re(i,x,{category:f??void 0}),[i,x,f]),j=o.useMemo(()=>De(i,2),[i]),w=!x.trim()&&!f,S=o.useMemo(()=>{const r={anthropic:[],openai:[],google:[],meta:[],mistral:[],opensource:[],other:[]};v.forEach(h=>{r[h.category].push(h)});for(const h of Object.keys(r))r[h]=Me(r[h]);return r},[v]),E=o.useCallback(()=>{b()},[b]),C=i.find(r=>r.id===s);return u&&i.length===0?e.jsxs("div",{className:_("space-y-2",d),children:[e.jsx(te,{className:"h-10 w-full"}),e.jsx(te,{className:"h-32 w-full"})]}):e.jsxs("div",{className:_("space-y-2 w-full min-w-0 overflow-hidden",d),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(pe,{className:"text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"}),e.jsx(A,{value:x,onChange:r=>m(r.target.value),placeholder:t,className:"pl-9"})]}),e.jsx(N,{variant:"outline",size:"icon",onClick:E,disabled:O,title:"Refresh models",children:O?e.jsx(F,{className:"h-4 w-4 animate-spin"}):e.jsx(z,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsxs(k,{variant:f===null?"default":"outline",className:"cursor-pointer",onClick:()=>l(null),children:["All (",i.length,")"]}),Object.keys(H).map(r=>{const h=S[r].length;return h===0?null:e.jsxs(k,{variant:f===r?"default":"outline",className:"cursor-pointer",onClick:()=>l(r),children:[H[r]," (",h,")"]},r)})]}),C&&e.jsxs("div",{className:"bg-muted rounded-md p-2 text-sm",children:[e.jsx("span",{className:"font-medium",children:C.name}),e.jsxs("span",{className:"text-muted-foreground ml-2",children:[Y(C.pricing)," |"," ",xe(C.context_length)]})]}),e.jsx(K,{className:"h-72 w-full rounded-md border",children:g?e.jsxs("div",{className:"text-destructive p-4 text-center",children:["Failed to load models."," ",e.jsx(N,{variant:"link",onClick:E,children:"Retry"})]}):v.length===0?e.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:['No models found matching "',x,'"']}):e.jsxs("div",{className:"space-y-6 p-3",children:[w&&j.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 flex items-center gap-1.5 py-1.5 text-xs font-semibold border-b pb-2",children:[e.jsx(X,{className:"h-3 w-3 text-accent"}),e.jsx("span",{children:"Newest Models"})]}),e.jsx("div",{className:"space-y-1",children:j.map(r=>e.jsx(ce,{model:r,isSelected:r.id===s,onClick:()=>a(r.id),showAge:!0},r.id))})]}),Object.keys(H).map(r=>{const h=S[r];return h.length===0?null:e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 py-1.5 text-xs font-semibold border-b pb-2",children:H[r]}),e.jsx("div",{className:"space-y-1",children:h.map(n=>e.jsx(ce,{model:n,isSelected:n.id===s,onClick:()=>a(n.id)},n.id))})]},r)})]})})]})}function ce({model:s,isSelected:a,onClick:t,showAge:d=!1}){return e.jsxs("button",{type:"button",onClick:t,className:_("group flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",a&&"bg-accent text-accent-foreground"),children:[e.jsx("span",{className:"flex-1 min-w-0 truncate font-medium",children:s.name}),e.jsxs("span",{className:_("flex shrink-0 items-center gap-1 text-xs whitespace-nowrap",a?"text-accent-foreground/80":"text-muted-foreground group-hover:text-accent-foreground/80"),children:[d&&s.created&&e.jsx(k,{variant:"outline",className:_("text-[10px] px-1",a?"border-accent-foreground/30 text-accent-foreground/80":"text-accent border-accent/30 group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30"),children:Le(s.created)}),s.isFree?e.jsx(k,{variant:"secondary",className:_("text-[10px] px-1",a?"bg-accent-foreground/20 text-accent-foreground":"group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground"),children:"Free"}):s.isExacto?e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"outline",className:_("text-[10px] px-1 border-emerald-500/50 text-emerald-600",a?"border-accent-foreground/30 text-accent-foreground/80":"group-hover:border-accent-foreground/30 group-hover:text-accent-foreground/80"),children:"Exacto"}),e.jsx("span",{className:"tabular-nums",children:Y(s.pricing)})]}):e.jsx("span",{className:"tabular-nums",children:Y(s.pricing)}),e.jsx("span",{className:"tabular-nums",children:xe(s.context_length)})]})]})}function gs({selectedModel:s,value:a,onChange:t,className:d}){const{models:x}=de(),m=o.useMemo(()=>s?Ie(s,x):{},[s,x]),f=()=>{t(m)},l=(u,g)=>{t({...a,[u]:g||void 0})},i=s&&Object.keys(m).length>0;return e.jsxs(me,{className:_("group",d),children:[e.jsxs(ue,{className:"flex items-center gap-2 text-sm font-medium hover:underline",children:[e.jsx(ge,{className:"h-4 w-4 transition-transform group-data-[state=open]:rotate-90"}),"Model Tier Mapping",e.jsx("span",{className:"text-muted-foreground font-normal",children:"(Advanced)"})]}),e.jsxs(he,{className:"space-y-3 pt-3",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Configure different models for Claude Code's opus/sonnet/haiku tiers."}),i&&e.jsxs(N,{type:"button",variant:"outline",size:"sm",onClick:f,children:[e.jsx(as,{className:"mr-1 h-4 w-4"}),"Auto-suggest based on ",s?.split("/")[0]]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-opus",className:"text-right",children:"Opus"}),e.jsx(A,{id:"tier-opus",value:a.opus??"",onChange:u=>l("opus",u.target.value),placeholder:"e.g., anthropic/claude-opus-4"})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-sonnet",className:"text-right",children:"Sonnet"}),e.jsx(A,{id:"tier-sonnet",value:a.sonnet??"",onChange:u=>l("sonnet",u.target.value),placeholder:"e.g., anthropic/claude-sonnet-4"})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-haiku",className:"text-right",children:"Haiku"}),e.jsx(A,{id:"tier-haiku",value:a.haiku??"",onChange:u=>l("haiku",u.target.value),placeholder:"e.g., anthropic/claude-3.5-haiku"})]})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"These set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."})]})]})}function js({profileName:s,target:a,data:t,currentSettings:d,newEnvKey:x,newEnvValue:m,onNewEnvKeyChange:f,onNewEnvValueChange:l,onEnvValueChange:i,onAddEnvVar:u,onEnvBulkChange:g}){const O=we(d),b=d?.env,v=o.useMemo(()=>xs(b??{}),[b]),j=b??{},w=n=>{if(g){const P={...j,ANTHROPIC_MODEL:n,ANTHROPIC_DEFAULT_OPUS_MODEL:n,ANTHROPIC_DEFAULT_SONNET_MODEL:n,ANTHROPIC_DEFAULT_HAIKU_MODEL:n};g(P)}else i("ANTHROPIC_MODEL",n),i("ANTHROPIC_DEFAULT_OPUS_MODEL",n),i("ANTHROPIC_DEFAULT_SONNET_MODEL",n),i("ANTHROPIC_DEFAULT_HAIKU_MODEL",n);I.success("Applied model to all tiers",{duration:2e3})},S=n=>{if(g){const P=ms(j,n);g(P)}else n.opus!==void 0&&i("ANTHROPIC_DEFAULT_OPUS_MODEL",n.opus||""),n.sonnet!==void 0&&i("ANTHROPIC_DEFAULT_SONNET_MODEL",n.sonnet||""),n.haiku!==void 0&&i("ANTHROPIC_DEFAULT_HAIKU_MODEL",n.haiku||"")},[E,C]=o.useState(!1),r=new Set(["ANTHROPIC_AUTH_TOKEN"]),h=Object.entries(j).filter(([n])=>!r.has(n));return e.jsx("div",{className:"h-full w-full min-w-0 flex flex-col",children:e.jsxs(Ue,{defaultValue:"env",className:"h-full w-full min-w-0 flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(He,{className:"w-full",children:[e.jsx(ae,{value:"env",className:"flex-1",children:O?"Configuration":"Environment Variables"}),e.jsx(ae,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:[e.jsx(ne,{value:"env",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden min-w-0",children:O?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs("div",{className:"h-full overflow-y-auto overflow-x-hidden p-4 space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{className:"text-sm font-medium",children:"Model Selection"}),e.jsx(ps,{value:j.ANTHROPIC_MODEL,onChange:w,placeholder:"Search OpenRouter models..."})]}),e.jsx(gs,{selectedModel:j.ANTHROPIC_MODEL,value:v,onChange:S}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"API Key"}),e.jsx(Ce,{value:j.ANTHROPIC_AUTH_TOKEN||"",onChange:n=>i("ANTHROPIC_AUTH_TOKEN",n.target.value),placeholder:"sk-or-v1-...",className:"font-mono text-sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",e.jsx("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"openrouter.ai/keys"})]})]}),h.length>0&&e.jsxs(me,{open:E,onOpenChange:C,children:[e.jsxs(ue,{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors group",children:[e.jsx(ge,{className:_("h-4 w-4 transition-transform",E&&"rotate-90")}),e.jsx(ns,{className:"h-4 w-4"}),e.jsx("span",{children:"Additional Variables"}),e.jsxs("span",{className:"text-xs font-normal opacity-70",children:["(",h.length,")"]})]}),e.jsx(he,{className:"pt-4",children:e.jsx("div",{className:"space-y-3 border rounded-lg p-3 bg-muted/30",children:h.map(([n,P])=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:n}),e.jsx(A,{value:P,onChange:M=>i(n,M.target.value),className:"font-mono text-xs h-8"})]},n))})})]})]})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(T,{className:"text-xs font-medium text-muted-foreground",children:"Add Environment Variable"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(A,{placeholder:"VARIABLE_NAME",value:x,onChange:n=>f(n.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:n=>n.key==="Enter"&&x.trim()&&u()}),e.jsx(A,{placeholder:"value",value:m,onChange:n=>l(n.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:n=>n.key==="Enter"&&x.trim()&&u()}),e.jsx(N,{variant:"outline",size:"sm",className:"h-8",onClick:u,disabled:!x.trim(),children:e.jsx($,{className:"w-4 h-4"})})]})]})]}):e.jsx(hs,{currentSettings:d,newEnvKey:x,newEnvValue:m,onNewEnvKeyChange:f,onNewEnvValueChange:l,onEnvValueChange:i,onAddEnvVar:u})}),e.jsx(ne,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(fs,{profileName:s,target:a,data:t})})]})]})})}function Ns({profileName:s,profileTarget:a,onDelete:t,onHasChangesUpdate:d}){const[x,m]=o.useState({}),[f,l]=o.useState(!1),[i,u]=o.useState(null),[g,O]=o.useState(""),[b,v]=o.useState(""),j=We(),{data:w,isLoading:S,isError:E,refetch:C}=Xe({queryKey:["settings",s],queryFn:async()=>{const c=await fetch(`/api/settings/${s}/raw`);if(!c.ok)throw new Error(`Failed to load settings: ${c.status}`);return c.json()}}),r=w?.settings,h=o.useMemo(()=>{if(i!==null)try{return JSON.parse(i)}catch{}if(r)return{...r,env:{...r.env,...x}}},[r,x,i]),n=o.useMemo(()=>i!==null?i:r?JSON.stringify(r,null,2):"",[i,r]),P=o.useCallback(c=>{u(c)},[]),M=(c,y)=>{const R={...h?.env||{},[c]:y};m(L=>({...L,[c]:y})),u(JSON.stringify({...h,env:R},null,2))},J=c=>{const y={...h?.env||{},...c};m(R=>({...R,...c})),u(JSON.stringify({...h,env:y},null,2))},p=()=>{if(!g.trim())return;const c=g.trim(),y=b,R={...h?.env||{},[c]:y};m(L=>({...L,[c]:y})),u(JSON.stringify({...h,env:R},null,2)),O(""),v("")},Z=o.useMemo(()=>{try{return JSON.parse(n),!0}catch{return!1}},[n]),B=o.useMemo(()=>i!==null?i!==JSON.stringify(r,null,2):Object.keys(x).length>0,[i,x,r]),ye=o.useMemo(()=>{const c=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"],y=h?.env||{};return c.filter(R=>!y[R]?.trim())},[h]);o.useEffect(()=>{d?.(B)},[B,d]);const U=re({mutationFn:async()=>{let c;try{c=JSON.parse(n)}catch{c={...w?.settings,env:{...w?.settings?.env,...x}}}const y=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:c,expectedMtime:w?.mtime})});if(y.status===409)throw new Error("CONFLICT");if(!y.ok)throw new Error("Failed to save");return y.json()},onSuccess:()=>{j.invalidateQueries({queryKey:["settings",s]}),j.invalidateQueries({queryKey:["profiles"]}),m({}),u(null),I.success("Settings saved")},onError:c=>{c.message==="CONFLICT"?l(!0):I.error(c.message)}}),Q=re({mutationFn:async c=>(await $e.profiles.update(s,{target:c}),c),onSuccess:()=>{j.invalidateQueries({queryKey:["profiles"]}),I.success("Default target updated")},onError:(c,y)=>{const R=y==="droid"?"Factory Droid":"Claude Code",L=c.message.trim()?`: ${c.message}`:"";I.error(`Failed to update default target to ${R}${L}`)}}),q=a||"claude",V=U.isPending||Q.isPending,ee=async c=>{l(!1),c?(await C(),U.mutate()):(m({}),u(null))};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(us,{profileName:s,target:q,data:w,settings:h,isLoading:S,isSaving:U.isPending,isTargetSaving:Q.isPending,hasChanges:B,isRawJsonValid:Z,onTargetChange:c=>{V||c!==q&&Q.mutate(c)},onRefresh:()=>{V||C()},onDelete:t,onSave:()=>{V||U.mutate()}}),S?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(F,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):E?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Failed to load settings."}),e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>C(),children:[e.jsx(z,{className:"w-4 h-4 mr-1"}),"Retry"]})]})}):e.jsxs("div",{className:"flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex flex-col overflow-hidden bg-muted/5 min-w-0",children:e.jsx(js,{profileName:s,target:q,data:w,currentSettings:h,newEnvKey:g,newEnvValue:b,onNewEnvKeyChange:O,onNewEnvValueChange:v,onEnvValueChange:M,onEnvBulkChange:J,onAddEnvVar:p})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(rs,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Raw Configuration (JSON)"})]}),e.jsx(Fe,{rawJsonContent:n,isRawJsonValid:Z,rawJsonEdits:i,settings:r,onChange:P,missingRequiredFields:ye})]})]}),e.jsx(G,{open:f,title:"File Modified Externally",description:"Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>ee(!0),onCancel:()=>ee(!1)})]},s)}const oe="ccs:openrouter-banner-dismissed";function vs({onCreateClick:s}){const[a,t]=o.useState(!0),{modelCount:d,isLoading:x}=W();o.useEffect(()=>{const f=localStorage.getItem(oe)==="true";t(f)},[]);const m=()=>{localStorage.setItem(oe,"true"),t(!0)};return a?null:e.jsx("div",{className:"bg-gradient-to-r from-accent to-accent/90 text-white px-4 py-3 relative shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 max-w-screen-xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"p-1.5 bg-white/20 rounded-md shrink-0",children:e.jsx(X,{className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm",children:"NEW: OpenRouter Integration"}),e.jsxs("p",{className:"text-xs text-white/80 truncate",children:["Browse ",x?"300+":`${d}+`," models from OpenAI, Anthropic, Google, Meta and more."]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s&&e.jsx(N,{size:"sm",variant:"secondary",onClick:s,className:"bg-white text-accent hover:bg-white/90 h-8",children:"Try it now"}),e.jsxs("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-white/80 hover:text-white hidden sm:flex items-center gap-1",children:["Learn more",e.jsx(je,{className:"w-3 h-3"})]}),e.jsxs(N,{size:"icon",variant:"ghost",onClick:m,className:"h-7 w-7 text-white/70 hover:text-white hover:bg-white/20",children:[e.jsx(is,{className:"w-4 h-4"}),e.jsx("span",{className:"sr-only",children:"Dismiss"})]})]})]})})}function bs({onOpenRouterClick:s,onCustomClick:a}){const{modelCount:t,isLoading:d}=W();return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20 p-8",children:e.jsxs("div",{className:"max-w-lg w-full space-y-6",children:[e.jsxs(Ke,{className:"border-accent/30 dark:border-accent/40 bg-gradient-to-br from-accent/5 to-background dark:from-accent/10",children:[e.jsxs(ze,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10 dark:bg-accent/20",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"w-6 h-6"})}),e.jsx(k,{variant:"secondary",className:"bg-accent/10 text-accent dark:bg-accent/20 dark:text-accent-foreground",children:"Recommended"})]}),e.jsx(Je,{className:"text-xl",children:"Start with OpenRouter"}),e.jsxs(Be,{className:"text-base",children:["Access ",d?"300+":`${t}+`," models from OpenAI, Anthropic, Google, Meta and more - all through one API."]})]}),e.jsxs(Qe,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Ne,{className:"w-4 h-4 text-accent"}),e.jsx("span",{children:"One API, all providers"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(X,{className:"w-4 h-4 text-accent"}),e.jsx("span",{children:"Model tier mapping"})]})]}),e.jsxs(N,{onClick:s,className:"w-full bg-accent hover:bg-accent/90 text-white",size:"lg",children:["Create OpenRouter Profile",e.jsx(ls,{className:"w-4 h-4 ml-2"})]}),e.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["Get your API key at"," ",e.jsxs("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline inline-flex items-center gap-1",children:["openrouter.ai/keys",e.jsx(je,{className:"w-3 h-3"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(ie,{className:"flex-1"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx(ie,{className:"flex-1"})]}),e.jsx(N,{variant:"outline",onClick:a,className:"w-full",children:"Create Custom API Profile"})]})})}function ws({onCreateClick:s}){const{modelCount:a,isLoading:t}=W();return e.jsx("div",{className:"p-3 border-t bg-gradient-to-r from-accent/5 to-accent/10 dark:from-accent/10 dark:to-accent/15",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 bg-accent/10 dark:bg-accent/20 rounded shrink-0",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"",className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-accent dark:text-accent-foreground",children:"OpenRouter"}),e.jsxs("p",{className:"text-[10px] text-muted-foreground truncate",children:[t?"300+":`${a}+`," models available"]})]}),e.jsxs(N,{size:"sm",variant:"ghost",onClick:s,className:"h-7 px-2 text-accent hover:text-accent hover:bg-accent/10 dark:hover:bg-accent/20",children:[e.jsx(Ne,{className:"w-3 h-3 mr-1"}),e.jsx("span",{className:"text-xs",children:"Add"})]})]})})}function Ls(){const{data:s,isLoading:a,isError:t,refetch:d}=qe(),x=Ve(),[m,f]=o.useState(null),[l,i]=o.useState(""),[u,g]=o.useState(!1),[O,b]=o.useState("normal"),[v,j]=o.useState(null),[w,S]=o.useState(!1),[E,C]=o.useState(null);Ye();const r=o.useMemo(()=>s?.profiles||[],[s?.profiles]),h=o.useMemo(()=>r.filter(p=>p.name.toLowerCase().includes(l.toLowerCase())),[r,l]),n=m?r.find(p=>p.name===m):null,P=p=>{x.mutate(p,{onSuccess:()=>{m===p&&f(null),j(null)}})},M=p=>{g(!1),w&&m!==null?C(p):f(p)},J=p=>{w&&m!==p?C(p):f(p)};return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex flex-col",children:[e.jsx(vs,{onCreateClick:()=>g(!0)}),e.jsxs("div",{className:"flex-1 flex min-h-0",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(cs,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"API Profiles"})]}),e.jsxs(N,{size:"sm",onClick:()=>{g(!0)},children:[e.jsx($,{className:"w-4 h-4 mr-1"}),"New"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(pe,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(A,{placeholder:"Search profiles...",className:"pl-8 h-9",value:l,onChange:p=>i(p.target.value)})]})]}),e.jsx(K,{className:"flex-1",children:a?e.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading profiles..."}):t?e.jsx("div",{className:"p-4 text-center",children:e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(ve,{className:"w-12 h-12 mx-auto text-destructive/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Failed to load profiles"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Unable to fetch API profiles. Please try again."})]}),e.jsxs(N,{size:"sm",variant:"outline",onClick:()=>d(),children:[e.jsx(z,{className:"w-4 h-4 mr-1"}),"Retry"]})]})}):h.length===0?e.jsx("div",{className:"p-4 text-center",children:r.length===0?e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(os,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"No API profiles yet"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Create your first profile to connect to custom API endpoints"})]}),e.jsxs(N,{size:"sm",variant:"outline",onClick:()=>{g(!0)},children:[e.jsx($,{className:"w-4 h-4 mr-1"}),"Create Profile"]})]}):e.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:['No profiles match "',l,'"']})}):e.jsx("div",{className:"p-2 space-y-1",children:h.map(p=>e.jsx(Cs,{profile:p,isSelected:m===p.name,onSelect:()=>J(p.name),onDelete:()=>j(p.name)},p.name))})}),r.length>0&&e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[r.length," profile",r.length!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(be,{className:"w-3 h-3 text-green-600"}),r.filter(p=>p.configured).length," configured"]})]})}),e.jsx(ws,{onCreateClick:()=>{b("openrouter"),g(!0)}})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:n?e.jsx(Ns,{profileName:n.name,profileTarget:n.target,onDelete:()=>j(n.name),onHasChangesUpdate:S},n.name):e.jsx(bs,{onOpenRouterClick:()=>{b("openrouter"),g(!0)},onCustomClick:()=>{b("normal"),g(!0)}})})]}),e.jsx(Ge,{open:u,onOpenChange:g,onSuccess:M,initialMode:O}),e.jsx(G,{open:!!v,title:"Delete Profile",description:`Are you sure you want to delete "${v}"? This will remove the settings file and cannot be undone.`,confirmText:"Delete",variant:"destructive",onConfirm:()=>v&&P(v),onCancel:()=>j(null)}),e.jsx(G,{open:!!E,title:"Unsaved Changes",description:`You have unsaved changes in "${m}". Discard and switch to "${E}"?`,confirmText:"Discard & Switch",variant:"destructive",onConfirm:()=>{S(!1),f(E),C(null)},onCancel:()=>C(null)})]})}function Cs({profile:s,isSelected:a,onSelect:t,onDelete:d}){return e.jsxs("div",{className:_("group flex items-center gap-2 px-3 py-2.5 rounded-md cursor-pointer transition-colors",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:t,children:[s.configured?e.jsx(be,{className:"w-4 h-4 text-green-600 shrink-0"}):e.jsx(ve,{className:"w-4 h-4 text-yellow-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(k,{variant:"outline",className:"text-[10px] h-4 px-1.5 uppercase",children:s.target||"claude"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("div",{className:"text-xs text-muted-foreground truncate flex-1",children:s.settingsPath}),e.jsx(D,{value:s.settingsPath,size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity"})]})]}),e.jsx(N,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:x=>{x.stopPropagation(),d()},children:e.jsx(fe,{className:"w-3.5 h-3.5 text-destructive"})})]})}export{Ls as ApiPage};
|
|
1
|
+
import{j as e}from"./radix-ui-C1Gpgz6I.js";import{r as o}from"./react-vendor-CNOkPC89.js";import{B as k,c as _,T as Oe,o as Te,p as Ae,q as Ee,r as _e,s as Se,t as ke,v as se,b as N,I as A,m as K,L as T,w as D,x as de,y as Pe,z as Re,A as De,D as Me,S as te,E as H,F as Y,G as xe,H as Le,J as Ie,K as me,M as ue,N as he,O as Ue,Q as He,R as ae,U as ne,V as Fe,W as $e,X as W,C as Ke,i as ze,j as Je,Y as Be,a as Qe,Z as qe,_ as Ve,$ as Ye,a0 as Ge}from"./index-k-HuyjpO.js";import{a as We,u as Xe,b as re}from"./tanstack-DDJIhNJd.js";import{C as G}from"./confirm-dialog-Dn3SrwNV.js";import{t as I}from"./notifications-B2HqRBj7.js";import{L as F,R as z,ah as fe,ai as Ze,E as es,e as ss,a0 as $,I as ts,aj as pe,a1 as X,c as ge,ak as as,$ as ns,al as rs,n as je,X as is,Z as Ne,am as ls,a5 as cs,a2 as ve,an as os,r as be}from"./icons-DrewC9c3.js";import{S as ie}from"./separator-BLVyAGAm.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";import"./alert-dialog-CetY4Iww.js";function ds({className:s,showTooltip:a=!0}){const t=e.jsxs(k,{variant:"outline",className:_("bg-accent/10 border-accent/30 text-accent","dark:bg-accent/20 dark:border-accent/40 dark:text-accent-foreground",s),children:[e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"mr-1 h-3 w-3"}),"OpenRouter"]});return a?e.jsxs(Oe,{children:[e.jsx(Te,{asChild:!0,children:t}),e.jsx(Ae,{children:e.jsx("p",{children:"Access 349+ models via OpenRouter"})})]}):t}function le(s){return[/^ANTHROPIC_AUTH_TOKEN$/,/_API_KEY$/,/_AUTH_TOKEN$/,/^API_KEY$/,/^AUTH_TOKEN$/,/_SECRET$/,/^SECRET$/].some(t=>t.test(s))}function we(s){return s?.env?(s.env.ANTHROPIC_BASE_URL||"").toLowerCase().includes("openrouter.ai"):!1}function xs(s){return{opus:s.ANTHROPIC_DEFAULT_OPUS_MODEL||void 0,sonnet:s.ANTHROPIC_DEFAULT_SONNET_MODEL||void 0,haiku:s.ANTHROPIC_DEFAULT_HAIKU_MODEL||void 0}}function ms(s,a){const t={...s};return a.opus?t.ANTHROPIC_DEFAULT_OPUS_MODEL=a.opus:delete t.ANTHROPIC_DEFAULT_OPUS_MODEL,a.sonnet?t.ANTHROPIC_DEFAULT_SONNET_MODEL=a.sonnet:delete t.ANTHROPIC_DEFAULT_SONNET_MODEL,a.haiku?t.ANTHROPIC_DEFAULT_HAIKU_MODEL=a.haiku:delete t.ANTHROPIC_DEFAULT_HAIKU_MODEL,t}function us({profileName:s,target:a,data:t,settings:d,isLoading:x,isSaving:m,isTargetSaving:f,hasChanges:l,isRawJsonValid:i,onTargetChange:u,onRefresh:g,onDelete:O,onSave:b}){const v=m||f,j=x||v;return e.jsxs("div",{className:"px-6 py-4 border-b bg-background flex items-center justify-between shrink-0",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-lg font-semibold",children:s}),t?.path&&e.jsx(k,{variant:"outline",className:"text-xs",children:t.path.replace(/^.*\//,"")}),we(d)&&e.jsx(ds,{className:"ml-1"})]}),t&&e.jsxs("p",{className:"text-xs text-muted-foreground mt-0.5",children:["Last modified: ",new Date(t.mtime).toLocaleString()]}),e.jsxs("div",{className:"mt-2 flex items-center gap-2",children:[e.jsx("span",{className:"text-xs text-muted-foreground",children:"Default target:"}),e.jsxs(Ee,{value:a,onValueChange:w=>{j||u(w)},disabled:j,children:[e.jsx(_e,{className:"h-7 w-[170px] text-xs",disabled:j,children:e.jsx(Se,{})}),e.jsxs(ke,{children:[e.jsx(se,{value:"claude",children:"Claude Code"}),e.jsx(se,{value:"droid",children:"Factory Droid"})]})]}),f&&e.jsx(F,{className:"w-3.5 h-3.5 animate-spin text-muted-foreground"})]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(N,{variant:"ghost",size:"sm",onClick:g,disabled:j,children:e.jsx(z,{className:`w-4 h-4 ${x?"animate-spin":""}`})}),O&&e.jsx(N,{variant:"ghost",size:"sm",onClick:O,disabled:v,children:e.jsx(fe,{className:"w-4 h-4 text-destructive"})}),e.jsx(N,{size:"sm",onClick:b,disabled:v||!l||!i,children:m?e.jsxs(e.Fragment,{children:[e.jsx(F,{className:"w-4 h-4 mr-1 animate-spin"}),"Saving..."]}):e.jsxs(e.Fragment,{children:[e.jsx(Ze,{className:"w-4 h-4 mr-1"}),"Save"]})})]})]})}function Ce({label:s,...a}){const[t,d]=o.useState(!1);return e.jsxs("div",{className:"space-y-1",children:[s&&e.jsx("label",{className:"text-sm font-medium",children:s}),e.jsxs("div",{className:"relative",children:[e.jsx(A,{type:t?"text":"password",className:"pr-10 font-mono",...a}),e.jsx(N,{type:"button",variant:"ghost",size:"sm",className:"absolute right-0 top-0 h-full px-3",onClick:()=>d(!t),tabIndex:-1,children:t?e.jsx(es,{className:"w-4 h-4"}):e.jsx(ss,{className:"w-4 h-4"})})]})]})}function hs({currentSettings:s,newEnvKey:a,newEnvValue:t,onNewEnvKeyChange:d,onNewEnvValueChange:x,onEnvValueChange:m,onAddEnvVar:f}){return e.jsxs(e.Fragment,{children:[e.jsx(K,{className:"flex-1",children:e.jsx("div",{className:"p-4 space-y-4",children:s?.env&&Object.keys(s.env).length>0?e.jsx(e.Fragment,{children:Object.entries(s.env).map(([l,i])=>e.jsxs("div",{className:"space-y-1.5",children:[e.jsxs(T,{className:"text-xs font-medium flex items-center gap-2 text-muted-foreground",children:[l,le(l)&&e.jsx(k,{variant:"secondary",className:"text-[10px] px-1 py-0 h-4",children:"sensitive"})]}),le(l)?e.jsx(Ce,{value:i,onChange:u=>m(l,u.target.value),className:"font-mono text-sm h-8"}):e.jsx(A,{value:i,onChange:u=>m(l,u.target.value),className:"font-mono text-sm h-8"})]},l))}):e.jsxs("div",{className:"py-8 text-center text-muted-foreground bg-muted/30 rounded-lg border border-dashed text-sm",children:[e.jsx("p",{children:"No environment variables configured."}),e.jsx("p",{className:"text-xs mt-1 opacity-70",children:"Add variables using the input below or edit the JSON directly."})]})})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(T,{className:"text-xs font-medium text-muted-foreground",children:"Add Environment Variable"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(A,{placeholder:"VARIABLE_NAME",value:a,onChange:l=>d(l.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:l=>l.key==="Enter"&&a.trim()&&f()}),e.jsx(A,{placeholder:"value",value:t,onChange:l=>x(l.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:l=>l.key==="Enter"&&a.trim()&&f()}),e.jsx(N,{variant:"outline",size:"sm",className:"h-8",onClick:f,disabled:!a.trim(),children:e.jsx($,{className:"w-4 h-4"})})]})]})]})}function fs({profileName:s,target:a,data:t}){const d=a==="droid";return e.jsx(K,{className:"h-full",children:e.jsxs("div",{className:"p-4 space-y-6",children:[e.jsxs("div",{children:[e.jsxs("h3",{className:"text-sm font-medium flex items-center gap-2 mb-3",children:[e.jsx(ts,{className:"w-4 h-4"}),"Profile Information"]}),e.jsx("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:t&&e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Profile Name"}),e.jsx("span",{className:"font-mono",children:t.profile})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"File Path"}),e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("code",{className:"bg-muted px-1.5 py-0.5 rounded text-xs break-all",children:t.path}),e.jsx(D,{value:t.path,size:"icon",className:"h-5 w-5"})]})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Last Modified"}),e.jsx("span",{className:"text-xs",children:new Date(t.mtime).toLocaleString()})]}),e.jsxs("div",{className:"grid grid-cols-[100px_1fr] gap-2 text-sm items-center",children:[e.jsx("span",{className:"font-medium text-muted-foreground",children:"Default Target"}),e.jsx("span",{className:"font-mono",children:a})]})]})})]}),e.jsxs("div",{children:[e.jsx("h3",{className:"text-sm font-medium mb-3",children:"Quick Usage"}),e.jsxs("div",{className:"space-y-3 bg-card rounded-lg border p-4 shadow-sm",children:[e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"Run with profile"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s,' "prompt"']}),e.jsx(D,{value:`ccs ${s} "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:d?"Droid alias (explicit)":"Run on Droid"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsx("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:d?`ccsd ${s} "prompt"`:`ccs ${s} --target droid "prompt"`}),e.jsx(D,{value:d?`ccsd ${s} "prompt"`:`ccs ${s} --target droid "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:d?"Override to Claude":"Override to Claude (explicit)"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs ",s,' --target claude "prompt"']}),e.jsx(D,{value:`ccs ${s} --target claude "prompt"`,size:"icon",className:"h-6 w-6"})]})]}),e.jsxs("div",{children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:"Set as default"}),e.jsxs("div",{className:"mt-1 flex gap-2",children:[e.jsxs("code",{className:"flex-1 px-2 py-1.5 bg-muted rounded text-xs font-mono truncate",children:["ccs default ",s]}),e.jsx(D,{value:`ccs default ${s}`,size:"icon",className:"h-6 w-6"})]})]})]})]})]})})}function ps({value:s,onChange:a,placeholder:t="Search models...",className:d}){const[x,m]=o.useState(""),[f,l]=o.useState(null),{models:i,isLoading:u,isError:g,isFetching:O}=de(),b=Pe(),v=o.useMemo(()=>Re(i,x,{category:f??void 0}),[i,x,f]),j=o.useMemo(()=>De(i,2),[i]),w=!x.trim()&&!f,S=o.useMemo(()=>{const r={anthropic:[],openai:[],google:[],meta:[],mistral:[],opensource:[],other:[]};v.forEach(h=>{r[h.category].push(h)});for(const h of Object.keys(r))r[h]=Me(r[h]);return r},[v]),E=o.useCallback(()=>{b()},[b]),C=i.find(r=>r.id===s);return u&&i.length===0?e.jsxs("div",{className:_("space-y-2",d),children:[e.jsx(te,{className:"h-10 w-full"}),e.jsx(te,{className:"h-32 w-full"})]}):e.jsxs("div",{className:_("space-y-2 w-full min-w-0 overflow-hidden",d),children:[e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(pe,{className:"text-muted-foreground absolute left-3 top-1/2 h-4 w-4 -translate-y-1/2"}),e.jsx(A,{value:x,onChange:r=>m(r.target.value),placeholder:t,className:"pl-9"})]}),e.jsx(N,{variant:"outline",size:"icon",onClick:E,disabled:O,title:"Refresh models",children:O?e.jsx(F,{className:"h-4 w-4 animate-spin"}):e.jsx(z,{className:"h-4 w-4"})})]}),e.jsxs("div",{className:"flex flex-wrap gap-1",children:[e.jsxs(k,{variant:f===null?"default":"outline",className:"cursor-pointer",onClick:()=>l(null),children:["All (",i.length,")"]}),Object.keys(H).map(r=>{const h=S[r].length;return h===0?null:e.jsxs(k,{variant:f===r?"default":"outline",className:"cursor-pointer",onClick:()=>l(r),children:[H[r]," (",h,")"]},r)})]}),C&&e.jsxs("div",{className:"bg-muted rounded-md p-2 text-sm",children:[e.jsx("span",{className:"font-medium",children:C.name}),e.jsxs("span",{className:"text-muted-foreground ml-2",children:[Y(C.pricing)," |"," ",xe(C.context_length)]})]}),e.jsx(K,{className:"h-72 w-full rounded-md border",children:g?e.jsxs("div",{className:"text-destructive p-4 text-center",children:["Failed to load models."," ",e.jsx(N,{variant:"link",onClick:E,children:"Retry"})]}):v.length===0?e.jsxs("div",{className:"text-muted-foreground p-4 text-center",children:['No models found matching "',x,'"']}):e.jsxs("div",{className:"space-y-6 p-3",children:[w&&j.length>0&&e.jsxs("div",{children:[e.jsxs("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 flex items-center gap-1.5 py-1.5 text-xs font-semibold border-b pb-2",children:[e.jsx(X,{className:"h-3 w-3 text-accent"}),e.jsx("span",{children:"Newest Models"})]}),e.jsx("div",{className:"space-y-1",children:j.map(r=>e.jsx(ce,{model:r,isSelected:r.id===s,onClick:()=>a(r.id),showAge:!0},r.id))})]}),Object.keys(H).map(r=>{const h=S[r];return h.length===0?null:e.jsxs("div",{children:[e.jsx("div",{className:"text-muted-foreground bg-background sticky top-0 mb-2 py-1.5 text-xs font-semibold border-b pb-2",children:H[r]}),e.jsx("div",{className:"space-y-1",children:h.map(n=>e.jsx(ce,{model:n,isSelected:n.id===s,onClick:()=>a(n.id)},n.id))})]},r)})]})})]})}function ce({model:s,isSelected:a,onClick:t,showAge:d=!1}){return e.jsxs("button",{type:"button",onClick:t,className:_("group flex w-full items-center gap-2 rounded-md px-3 py-2 text-left text-sm transition-colors","hover:bg-accent hover:text-accent-foreground",a&&"bg-accent text-accent-foreground"),children:[e.jsx("span",{className:"flex-1 min-w-0 truncate font-medium",children:s.name}),e.jsxs("span",{className:_("flex shrink-0 items-center gap-1 text-xs whitespace-nowrap",a?"text-accent-foreground/80":"text-muted-foreground group-hover:text-accent-foreground/80"),children:[d&&s.created&&e.jsx(k,{variant:"outline",className:_("text-[10px] px-1",a?"border-accent-foreground/30 text-accent-foreground/80":"text-accent border-accent/30 group-hover:text-accent-foreground/80 group-hover:border-accent-foreground/30"),children:Le(s.created)}),s.isFree?e.jsx(k,{variant:"secondary",className:_("text-[10px] px-1",a?"bg-accent-foreground/20 text-accent-foreground":"group-hover:bg-accent-foreground/20 group-hover:text-accent-foreground"),children:"Free"}):s.isExacto?e.jsxs(e.Fragment,{children:[e.jsx(k,{variant:"outline",className:_("text-[10px] px-1 border-emerald-500/50 text-emerald-600",a?"border-accent-foreground/30 text-accent-foreground/80":"group-hover:border-accent-foreground/30 group-hover:text-accent-foreground/80"),children:"Exacto"}),e.jsx("span",{className:"tabular-nums",children:Y(s.pricing)})]}):e.jsx("span",{className:"tabular-nums",children:Y(s.pricing)}),e.jsx("span",{className:"tabular-nums",children:xe(s.context_length)})]})]})}function gs({selectedModel:s,value:a,onChange:t,className:d}){const{models:x}=de(),m=o.useMemo(()=>s?Ie(s,x):{},[s,x]),f=()=>{t(m)},l=(u,g)=>{t({...a,[u]:g||void 0})},i=s&&Object.keys(m).length>0;return e.jsxs(me,{className:_("group",d),children:[e.jsxs(ue,{className:"flex items-center gap-2 text-sm font-medium hover:underline",children:[e.jsx(ge,{className:"h-4 w-4 transition-transform group-data-[state=open]:rotate-90"}),"Model Tier Mapping",e.jsx("span",{className:"text-muted-foreground font-normal",children:"(Advanced)"})]}),e.jsxs(he,{className:"space-y-3 pt-3",children:[e.jsx("p",{className:"text-muted-foreground text-sm",children:"Configure different models for Claude Code's opus/sonnet/haiku tiers."}),i&&e.jsxs(N,{type:"button",variant:"outline",size:"sm",onClick:f,children:[e.jsx(as,{className:"mr-1 h-4 w-4"}),"Auto-suggest based on ",s?.split("/")[0]]}),e.jsxs("div",{className:"grid gap-3",children:[e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-opus",className:"text-right",children:"Opus"}),e.jsx(A,{id:"tier-opus",value:a.opus??"",onChange:u=>l("opus",u.target.value),placeholder:"e.g., anthropic/claude-opus-4"})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-sonnet",className:"text-right",children:"Sonnet"}),e.jsx(A,{id:"tier-sonnet",value:a.sonnet??"",onChange:u=>l("sonnet",u.target.value),placeholder:"e.g., anthropic/claude-sonnet-4"})]}),e.jsxs("div",{className:"grid grid-cols-[80px_1fr] items-center gap-2",children:[e.jsx(T,{htmlFor:"tier-haiku",className:"text-right",children:"Haiku"}),e.jsx(A,{id:"tier-haiku",value:a.haiku??"",onChange:u=>l("haiku",u.target.value),placeholder:"e.g., anthropic/claude-3.5-haiku"})]})]}),e.jsx("p",{className:"text-muted-foreground text-xs",children:"These set ANTHROPIC_DEFAULT_OPUS_MODEL, ANTHROPIC_DEFAULT_SONNET_MODEL, ANTHROPIC_DEFAULT_HAIKU_MODEL."})]})]})}function js({profileName:s,target:a,data:t,currentSettings:d,newEnvKey:x,newEnvValue:m,onNewEnvKeyChange:f,onNewEnvValueChange:l,onEnvValueChange:i,onAddEnvVar:u,onEnvBulkChange:g}){const O=we(d),b=d?.env,v=o.useMemo(()=>xs(b??{}),[b]),j=b??{},w=n=>{if(g){const P={...j,ANTHROPIC_MODEL:n,ANTHROPIC_DEFAULT_OPUS_MODEL:n,ANTHROPIC_DEFAULT_SONNET_MODEL:n,ANTHROPIC_DEFAULT_HAIKU_MODEL:n};g(P)}else i("ANTHROPIC_MODEL",n),i("ANTHROPIC_DEFAULT_OPUS_MODEL",n),i("ANTHROPIC_DEFAULT_SONNET_MODEL",n),i("ANTHROPIC_DEFAULT_HAIKU_MODEL",n);I.success("Applied model to all tiers",{duration:2e3})},S=n=>{if(g){const P=ms(j,n);g(P)}else n.opus!==void 0&&i("ANTHROPIC_DEFAULT_OPUS_MODEL",n.opus||""),n.sonnet!==void 0&&i("ANTHROPIC_DEFAULT_SONNET_MODEL",n.sonnet||""),n.haiku!==void 0&&i("ANTHROPIC_DEFAULT_HAIKU_MODEL",n.haiku||"")},[E,C]=o.useState(!1),r=new Set(["ANTHROPIC_AUTH_TOKEN"]),h=Object.entries(j).filter(([n])=>!r.has(n));return e.jsx("div",{className:"h-full w-full min-w-0 flex flex-col",children:e.jsxs(Ue,{defaultValue:"env",className:"h-full w-full min-w-0 flex flex-col",children:[e.jsx("div",{className:"px-4 pt-4 shrink-0",children:e.jsxs(He,{className:"w-full",children:[e.jsx(ae,{value:"env",className:"flex-1",children:O?"Configuration":"Environment Variables"}),e.jsx(ae,{value:"info",className:"flex-1",children:"Info & Usage"})]})}),e.jsxs("div",{className:"flex-1 overflow-hidden flex flex-col min-w-0",children:[e.jsx(ne,{value:"env",className:"flex-1 mt-0 border-0 p-0 data-[state=inactive]:hidden flex flex-col overflow-hidden min-w-0",children:O?e.jsxs(e.Fragment,{children:[e.jsx("div",{className:"flex-1 overflow-hidden",children:e.jsxs("div",{className:"h-full overflow-y-auto overflow-x-hidden p-4 space-y-6",children:[e.jsxs("div",{className:"space-y-3",children:[e.jsx(T,{className:"text-sm font-medium",children:"Model Selection"}),e.jsx(ps,{value:j.ANTHROPIC_MODEL,onChange:w,placeholder:"Search OpenRouter models..."})]}),e.jsx(gs,{selectedModel:j.ANTHROPIC_MODEL,value:v,onChange:S}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{className:"text-sm font-medium",children:"API Key"}),e.jsx(Ce,{value:j.ANTHROPIC_AUTH_TOKEN||"",onChange:n=>i("ANTHROPIC_AUTH_TOKEN",n.target.value),placeholder:"sk-or-v1-...",className:"font-mono text-sm"}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:["Get your API key from"," ",e.jsx("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-primary hover:underline",children:"openrouter.ai/keys"})]})]}),h.length>0&&e.jsxs(me,{open:E,onOpenChange:C,children:[e.jsxs(ue,{className:"flex items-center gap-2 text-sm font-medium text-muted-foreground hover:text-foreground transition-colors group",children:[e.jsx(ge,{className:_("h-4 w-4 transition-transform",E&&"rotate-90")}),e.jsx(ns,{className:"h-4 w-4"}),e.jsx("span",{children:"Additional Variables"}),e.jsxs("span",{className:"text-xs font-normal opacity-70",children:["(",h.length,")"]})]}),e.jsx(he,{className:"pt-4",children:e.jsx("div",{className:"space-y-3 border rounded-lg p-3 bg-muted/30",children:h.map(([n,P])=>e.jsxs("div",{className:"space-y-1",children:[e.jsx(T,{className:"text-xs text-muted-foreground",children:n}),e.jsx(A,{value:P,onChange:M=>i(n,M.target.value),className:"font-mono text-xs h-8"})]},n))})})]})]})}),e.jsxs("div",{className:"p-4 border-t bg-background shrink-0",children:[e.jsx(T,{className:"text-xs font-medium text-muted-foreground",children:"Add Environment Variable"}),e.jsxs("div",{className:"flex gap-2 mt-2",children:[e.jsx(A,{placeholder:"VARIABLE_NAME",value:x,onChange:n=>f(n.target.value.toUpperCase()),className:"font-mono text-sm h-8 w-2/5",onKeyDown:n=>n.key==="Enter"&&x.trim()&&u()}),e.jsx(A,{placeholder:"value",value:m,onChange:n=>l(n.target.value),className:"font-mono text-sm h-8 flex-1",onKeyDown:n=>n.key==="Enter"&&x.trim()&&u()}),e.jsx(N,{variant:"outline",size:"sm",className:"h-8",onClick:u,disabled:!x.trim(),children:e.jsx($,{className:"w-4 h-4"})})]})]})]}):e.jsx(hs,{currentSettings:d,newEnvKey:x,newEnvValue:m,onNewEnvKeyChange:f,onNewEnvValueChange:l,onEnvValueChange:i,onAddEnvVar:u})}),e.jsx(ne,{value:"info",className:"h-full mt-0 border-0 p-0 data-[state=inactive]:hidden",children:e.jsx(fs,{profileName:s,target:a,data:t})})]})]})})}function Ns({profileName:s,profileTarget:a,onDelete:t,onHasChangesUpdate:d}){const[x,m]=o.useState({}),[f,l]=o.useState(!1),[i,u]=o.useState(null),[g,O]=o.useState(""),[b,v]=o.useState(""),j=We(),{data:w,isLoading:S,isError:E,refetch:C}=Xe({queryKey:["settings",s],queryFn:async()=>{const c=await fetch(`/api/settings/${s}/raw`);if(!c.ok)throw new Error(`Failed to load settings: ${c.status}`);return c.json()}}),r=w?.settings,h=o.useMemo(()=>{if(i!==null)try{return JSON.parse(i)}catch{}if(r)return{...r,env:{...r.env,...x}}},[r,x,i]),n=o.useMemo(()=>i!==null?i:r?JSON.stringify(r,null,2):"",[i,r]),P=o.useCallback(c=>{u(c)},[]),M=(c,y)=>{const R={...h?.env||{},[c]:y};m(L=>({...L,[c]:y})),u(JSON.stringify({...h,env:R},null,2))},J=c=>{const y={...h?.env||{},...c};m(R=>({...R,...c})),u(JSON.stringify({...h,env:y},null,2))},p=()=>{if(!g.trim())return;const c=g.trim(),y=b,R={...h?.env||{},[c]:y};m(L=>({...L,[c]:y})),u(JSON.stringify({...h,env:R},null,2)),O(""),v("")},Z=o.useMemo(()=>{try{return JSON.parse(n),!0}catch{return!1}},[n]),B=o.useMemo(()=>i!==null?i!==JSON.stringify(r,null,2):Object.keys(x).length>0,[i,x,r]),ye=o.useMemo(()=>{const c=["ANTHROPIC_BASE_URL","ANTHROPIC_AUTH_TOKEN"],y=h?.env||{};return c.filter(R=>!y[R]?.trim())},[h]);o.useEffect(()=>{d?.(B)},[B,d]);const U=re({mutationFn:async()=>{let c;try{c=JSON.parse(n)}catch{c={...w?.settings,env:{...w?.settings?.env,...x}}}const y=await fetch(`/api/settings/${s}`,{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify({settings:c,expectedMtime:w?.mtime})});if(y.status===409)throw new Error("CONFLICT");if(!y.ok)throw new Error("Failed to save");return y.json()},onSuccess:()=>{j.invalidateQueries({queryKey:["settings",s]}),j.invalidateQueries({queryKey:["profiles"]}),m({}),u(null),I.success("Settings saved")},onError:c=>{c.message==="CONFLICT"?l(!0):I.error(c.message)}}),Q=re({mutationFn:async c=>(await $e.profiles.update(s,{target:c}),c),onSuccess:()=>{j.invalidateQueries({queryKey:["profiles"]}),I.success("Default target updated")},onError:(c,y)=>{const R=y==="droid"?"Factory Droid":"Claude Code",L=c.message.trim()?`: ${c.message}`:"";I.error(`Failed to update default target to ${R}${L}`)}}),q=a||"claude",V=U.isPending||Q.isPending,ee=async c=>{l(!1),c?(await C(),U.mutate()):(m({}),u(null))};return e.jsxs("div",{className:"flex-1 flex flex-col overflow-hidden",children:[e.jsx(us,{profileName:s,target:q,data:w,settings:h,isLoading:S,isSaving:U.isPending,isTargetSaving:Q.isPending,hasChanges:B,isRawJsonValid:Z,onTargetChange:c=>{V||c!==q&&Q.mutate(c)},onRefresh:()=>{V||C()},onDelete:t,onSave:()=>{V||U.mutate()}}),S?e.jsxs("div",{className:"flex-1 flex items-center justify-center",children:[e.jsx(F,{className:"w-8 h-8 animate-spin text-muted-foreground"}),e.jsx("span",{className:"ml-3 text-muted-foreground",children:"Loading settings..."})]}):E?e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"text-center space-y-3",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Failed to load settings."}),e.jsxs(N,{variant:"outline",size:"sm",onClick:()=>C(),children:[e.jsx(z,{className:"w-4 h-4 mr-1"}),"Retry"]})]})}):e.jsxs("div",{className:"flex-1 grid grid-cols-[40%_60%] divide-x overflow-hidden",children:[e.jsx("div",{className:"flex flex-col overflow-hidden bg-muted/5 min-w-0",children:e.jsx(js,{profileName:s,target:q,data:w,currentSettings:h,newEnvKey:g,newEnvValue:b,onNewEnvKeyChange:O,onNewEnvValueChange:v,onEnvValueChange:M,onEnvBulkChange:J,onAddEnvVar:p})}),e.jsxs("div",{className:"flex flex-col overflow-hidden",children:[e.jsxs("div",{className:"px-6 py-2 bg-muted/30 border-b flex items-center gap-2 shrink-0 h-[45px]",children:[e.jsx(rs,{className:"w-4 h-4 text-muted-foreground"}),e.jsx("span",{className:"text-sm font-medium text-muted-foreground",children:"Raw Configuration (JSON)"})]}),e.jsx(Fe,{rawJsonContent:n,isRawJsonValid:Z,rawJsonEdits:i,settings:r,onChange:P,missingRequiredFields:ye})]})]}),e.jsx(G,{open:f,title:"File Modified Externally",description:"Overwrite with your changes or discard?",confirmText:"Overwrite",variant:"destructive",onConfirm:()=>ee(!0),onCancel:()=>ee(!1)})]},s)}const oe="ccs:openrouter-banner-dismissed";function vs({onCreateClick:s}){const[a,t]=o.useState(!0),{modelCount:d,isLoading:x}=W();o.useEffect(()=>{const f=localStorage.getItem(oe)==="true";t(f)},[]);const m=()=>{localStorage.setItem(oe,"true"),t(!0)};return a?null:e.jsx("div",{className:"bg-gradient-to-r from-accent to-accent/90 text-white px-4 py-3 relative shrink-0",children:e.jsxs("div",{className:"flex items-center justify-between gap-4 max-w-screen-xl mx-auto",children:[e.jsxs("div",{className:"flex items-center gap-3 flex-1 min-w-0",children:[e.jsx("div",{className:"p-1.5 bg-white/20 rounded-md shrink-0",children:e.jsx(X,{className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"font-medium text-sm",children:"NEW: OpenRouter Integration"}),e.jsxs("p",{className:"text-xs text-white/80 truncate",children:["Browse ",x?"300+":`${d}+`," models from OpenAI, Anthropic, Google, Meta and more."]})]})]}),e.jsxs("div",{className:"flex items-center gap-2 shrink-0",children:[s&&e.jsx(N,{size:"sm",variant:"secondary",onClick:s,className:"bg-white text-accent hover:bg-white/90 h-8",children:"Try it now"}),e.jsxs("a",{href:"https://openrouter.ai",target:"_blank",rel:"noopener noreferrer",className:"text-xs text-white/80 hover:text-white hidden sm:flex items-center gap-1",children:["Learn more",e.jsx(je,{className:"w-3 h-3"})]}),e.jsxs(N,{size:"icon",variant:"ghost",onClick:m,className:"h-7 w-7 text-white/70 hover:text-white hover:bg-white/20",children:[e.jsx(is,{className:"w-4 h-4"}),e.jsx("span",{className:"sr-only",children:"Dismiss"})]})]})]})})}function bs({onOpenRouterClick:s,onCustomClick:a}){const{modelCount:t,isLoading:d}=W();return e.jsx("div",{className:"flex-1 flex items-center justify-center bg-muted/20 p-8",children:e.jsxs("div",{className:"max-w-lg w-full space-y-6",children:[e.jsxs(Ke,{className:"border-accent/30 dark:border-accent/40 bg-gradient-to-br from-accent/5 to-background dark:from-accent/10",children:[e.jsxs(ze,{className:"pb-3",children:[e.jsxs("div",{className:"flex items-center gap-3 mb-2",children:[e.jsx("div",{className:"p-2 rounded-lg bg-accent/10 dark:bg-accent/20",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"OpenRouter",className:"w-6 h-6"})}),e.jsx(k,{variant:"secondary",className:"bg-accent/10 text-accent dark:bg-accent/20 dark:text-accent-foreground",children:"Recommended"})]}),e.jsx(Je,{className:"text-xl",children:"Start with OpenRouter"}),e.jsxs(Be,{className:"text-base",children:["Access ",d?"300+":`${t}+`," models from OpenAI, Anthropic, Google, Meta and more - all through one API."]})]}),e.jsxs(Qe,{className:"space-y-4",children:[e.jsxs("div",{className:"grid grid-cols-2 gap-3 text-sm",children:[e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(Ne,{className:"w-4 h-4 text-accent"}),e.jsx("span",{children:"One API, all providers"})]}),e.jsxs("div",{className:"flex items-center gap-2 text-muted-foreground",children:[e.jsx(X,{className:"w-4 h-4 text-accent"}),e.jsx("span",{children:"Model tier mapping"})]})]}),e.jsxs(N,{onClick:s,className:"w-full bg-accent hover:bg-accent/90 text-white",size:"lg",children:["Create OpenRouter Profile",e.jsx(ls,{className:"w-4 h-4 ml-2"})]}),e.jsxs("p",{className:"text-xs text-center text-muted-foreground",children:["Get your API key at"," ",e.jsxs("a",{href:"https://openrouter.ai/keys",target:"_blank",rel:"noopener noreferrer",className:"text-accent hover:underline inline-flex items-center gap-1",children:["openrouter.ai/keys",e.jsx(je,{className:"w-3 h-3"})]})]})]})]}),e.jsxs("div",{className:"flex items-center gap-4",children:[e.jsx(ie,{className:"flex-1"}),e.jsx("span",{className:"text-xs text-muted-foreground",children:"or"}),e.jsx(ie,{className:"flex-1"})]}),e.jsx(N,{variant:"outline",onClick:a,className:"w-full",children:"Create Custom API Profile"})]})})}function ws({onCreateClick:s}){const{modelCount:a,isLoading:t}=W();return e.jsx("div",{className:"p-3 border-t bg-gradient-to-r from-accent/5 to-accent/10 dark:from-accent/10 dark:to-accent/15",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"p-1.5 bg-accent/10 dark:bg-accent/20 rounded shrink-0",children:e.jsx("img",{src:"/icons/openrouter.svg",alt:"",className:"w-4 h-4"})}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsx("p",{className:"text-xs font-medium text-accent dark:text-accent-foreground",children:"OpenRouter"}),e.jsxs("p",{className:"text-[10px] text-muted-foreground truncate",children:[t?"300+":`${a}+`," models available"]})]}),e.jsxs(N,{size:"sm",variant:"ghost",onClick:s,className:"h-7 px-2 text-accent hover:text-accent hover:bg-accent/10 dark:hover:bg-accent/20",children:[e.jsx(Ne,{className:"w-3 h-3 mr-1"}),e.jsx("span",{className:"text-xs",children:"Add"})]})]})})}function Ls(){const{data:s,isLoading:a,isError:t,refetch:d}=qe(),x=Ve(),[m,f]=o.useState(null),[l,i]=o.useState(""),[u,g]=o.useState(!1),[O,b]=o.useState("normal"),[v,j]=o.useState(null),[w,S]=o.useState(!1),[E,C]=o.useState(null);Ye();const r=o.useMemo(()=>s?.profiles||[],[s?.profiles]),h=o.useMemo(()=>r.filter(p=>p.name.toLowerCase().includes(l.toLowerCase())),[r,l]),n=m?r.find(p=>p.name===m):null,P=p=>{x.mutate(p,{onSuccess:()=>{m===p&&f(null),j(null)}})},M=p=>{g(!1),w&&m!==null?C(p):f(p)},J=p=>{w&&m!==p?C(p):f(p)};return e.jsxs("div",{className:"h-[calc(100vh-100px)] flex flex-col",children:[e.jsx(vs,{onCreateClick:()=>g(!0)}),e.jsxs("div",{className:"flex-1 flex min-h-0",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/30",children:[e.jsxs("div",{className:"p-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center justify-between mb-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(cs,{className:"w-5 h-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:"API Profiles"})]}),e.jsxs(N,{size:"sm",onClick:()=>{g(!0)},children:[e.jsx($,{className:"w-4 h-4 mr-1"}),"New"]})]}),e.jsxs("div",{className:"relative",children:[e.jsx(pe,{className:"absolute left-2.5 top-2.5 h-4 w-4 text-muted-foreground"}),e.jsx(A,{placeholder:"Search profiles...",className:"pl-8 h-9",value:l,onChange:p=>i(p.target.value)})]})]}),e.jsx(K,{className:"flex-1",children:a?e.jsx("div",{className:"p-4 text-sm text-muted-foreground",children:"Loading profiles..."}):t?e.jsx("div",{className:"p-4 text-center",children:e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(ve,{className:"w-12 h-12 mx-auto text-destructive/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"Failed to load profiles"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Unable to fetch API profiles. Please try again."})]}),e.jsxs(N,{size:"sm",variant:"outline",onClick:()=>d(),children:[e.jsx(z,{className:"w-4 h-4 mr-1"}),"Retry"]})]})}):h.length===0?e.jsx("div",{className:"p-4 text-center",children:r.length===0?e.jsxs("div",{className:"space-y-3 py-8",children:[e.jsx(os,{className:"w-12 h-12 mx-auto text-muted-foreground/50"}),e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-medium",children:"No API profiles yet"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Create your first profile to connect to custom API endpoints"})]}),e.jsxs(N,{size:"sm",variant:"outline",onClick:()=>{g(!0)},children:[e.jsx($,{className:"w-4 h-4 mr-1"}),"Create Profile"]})]}):e.jsxs("p",{className:"text-sm text-muted-foreground py-4",children:['No profiles match "',l,'"']})}):e.jsx("div",{className:"p-2 space-y-1",children:h.map(p=>e.jsx(Cs,{profile:p,isSelected:m===p.name,onSelect:()=>J(p.name),onDelete:()=>j(p.name)},p.name))})}),r.length>0&&e.jsx("div",{className:"p-3 border-t bg-background text-xs text-muted-foreground",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("span",{children:[r.length," profile",r.length!==1?"s":""]}),e.jsxs("span",{className:"flex items-center gap-1",children:[e.jsx(be,{className:"w-3 h-3 text-green-600"}),r.filter(p=>p.configured).length," configured"]})]})}),e.jsx(ws,{onCreateClick:()=>{b("openrouter"),g(!0)}})]}),e.jsx("div",{className:"flex-1 flex flex-col min-w-0",children:n?e.jsx(Ns,{profileName:n.name,profileTarget:n.target,onDelete:()=>j(n.name),onHasChangesUpdate:S},n.name):e.jsx(bs,{onOpenRouterClick:()=>{b("openrouter"),g(!0)},onCustomClick:()=>{b("normal"),g(!0)}})})]}),e.jsx(Ge,{open:u,onOpenChange:g,onSuccess:M,initialMode:O}),e.jsx(G,{open:!!v,title:"Delete Profile",description:`Are you sure you want to delete "${v}"? This will remove the settings file and cannot be undone.`,confirmText:"Delete",variant:"destructive",onConfirm:()=>v&&P(v),onCancel:()=>j(null)}),e.jsx(G,{open:!!E,title:"Unsaved Changes",description:`You have unsaved changes in "${m}". Discard and switch to "${E}"?`,confirmText:"Discard & Switch",variant:"destructive",onConfirm:()=>{S(!1),f(E),C(null)},onCancel:()=>C(null)})]})}function Cs({profile:s,isSelected:a,onSelect:t,onDelete:d}){return e.jsxs("div",{className:_("group flex items-center gap-2 px-3 py-2.5 rounded-md cursor-pointer transition-colors",a?"bg-primary/10 border border-primary/20":"hover:bg-muted border border-transparent"),onClick:t,children:[s.configured?e.jsx(be,{className:"w-4 h-4 text-green-600 shrink-0"}):e.jsx(ve,{className:"w-4 h-4 text-yellow-600 shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0",children:[e.jsxs("div",{className:"flex items-center gap-2 min-w-0",children:[e.jsx("div",{className:"font-medium text-sm truncate",children:s.name}),e.jsx(k,{variant:"outline",className:"text-[10px] h-4 px-1.5 uppercase",children:s.target||"claude"})]}),e.jsxs("div",{className:"flex items-center gap-1.5 min-w-0",children:[e.jsx("div",{className:"text-xs text-muted-foreground truncate flex-1",children:s.settingsPath}),e.jsx(D,{value:s.settingsPath,size:"icon",className:"h-5 w-5 opacity-0 group-hover:opacity-100 transition-opacity"})]})]}),e.jsx(N,{variant:"ghost",size:"icon",className:"h-7 w-7 opacity-0 group-hover:opacity-100 transition-opacity",onClick:x=>{x.stopPropagation(),d()},children:e.jsx(fe,{className:"w-3.5 h-3.5 text-destructive"})})]})}export{Ls as ApiPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-
|
|
1
|
+
import{j as e}from"./radix-ui-C1Gpgz6I.js";import{r as t}from"./react-vendor-CNOkPC89.js";import{bd as Q,b4 as V,b6 as W,m as X,I as S,b as i}from"./index-k-HuyjpO.js";import{R as A,a2 as Y,r as Z,l as _,E,e as K,k as T,m as P,az as ee,a1 as se,w as ae,ai as te}from"./icons-DrewC9c3.js";import"./tanstack-DDJIhNJd.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";function he(){const{fetchRawConfig:o}=Q(),[a,I]=t.useState(null),[g,v]=t.useState(!0),[n,c]=t.useState(!1),[x,r]=t.useState(null),[p,f]=t.useState(null),[y,R]=t.useState(!1),[w,z]=t.useState(!1),[m,j]=t.useState(null),[d,N]=t.useState(null),[L,C]=t.useState(!1),[U,b]=t.useState(!1),u=t.useCallback(async()=>{try{v(!0),r(null);const s=await fetch("/api/settings/auth/tokens/raw");if(!s.ok)throw new Error("Failed to fetch auth tokens");const l=await s.json();I(l)}catch(s){r(s instanceof Error?s.message:"Unknown error")}finally{v(!1)}},[]);t.useEffect(()=>{u(),o()},[u,o]),t.useEffect(()=>{if(p){const s=setTimeout(()=>f(null),3e3);return()=>clearTimeout(s)}},[p]),t.useEffect(()=>{if(x){const s=setTimeout(()=>r(null),5e3);return()=>clearTimeout(s)}},[x]);const F=async()=>{const s=m!==null&&m!==a?.apiKey.value,l=d!==null&&d!==a?.managementSecret.value;if(!(!s&&!l))try{c(!0),r(null);const h={};s&&(h.apiKey=m),l&&(h.managementSecret=d);const k=await fetch("/api/settings/auth/tokens",{method:"PUT",headers:{"Content-Type":"application/json"},body:JSON.stringify(h)});if(!k.ok){const H=await k.json();throw new Error(H.error||"Failed to save tokens")}f("Tokens updated. Restart CLIProxy to apply."),j(null),N(null),await u(),await o()}catch(h){r(h instanceof Error?h.message:"Unknown error")}finally{c(!1)}},O=async()=>{try{c(!0),r(null);const s=await fetch("/api/settings/auth/tokens/regenerate-secret",{method:"POST"});if(!s.ok){const l=await s.json();throw new Error(l.error||"Failed to regenerate secret")}f("New management secret generated. Restart CLIProxy to apply."),await u(),await o()}catch(s){r(s instanceof Error?s.message:"Unknown error")}finally{c(!1)}},D=async()=>{try{c(!0),r(null);const s=await fetch("/api/settings/auth/tokens/reset",{method:"POST"});if(!s.ok){const l=await s.json();throw new Error(l.error||"Failed to reset tokens")}f("Tokens reset to defaults. Restart CLIProxy to apply."),j(null),N(null),await u(),await o()}catch(s){r(s instanceof Error?s.message:"Unknown error")}finally{c(!1)}},$=async()=>{a&&(await navigator.clipboard.writeText(a.apiKey.value),C(!0),setTimeout(()=>C(!1),2e3))},M=async()=>{a&&(await navigator.clipboard.writeText(a.managementSecret.value),b(!0),setTimeout(()=>b(!1),2e3))},q=async()=>{g||n||(r(null),f(null),await Promise.all([u(),o()]))};if(g||!a)return e.jsx("div",{className:"flex-1 flex items-center justify-center",children:e.jsxs("div",{className:"flex items-center gap-3 text-muted-foreground",children:[e.jsx(A,{className:"w-5 h-5 animate-spin"}),e.jsx("span",{children:"Loading..."})]})});const B=m??a.apiKey.value,G=d??a.managementSecret.value,J=m!==null&&m!==a.apiKey.value||d!==null&&d!==a.managementSecret.value;return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${x||p?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[x&&e.jsxs(V,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(Y,{className:"h-4 w-4"}),e.jsx(W,{children:x})]}),p&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(Z,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:p})]})]}),e.jsx(X,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-6",children:[e.jsx("p",{className:"text-sm text-muted-foreground",children:"Configure CLIProxy authentication tokens. Changes require CLIProxy restart."}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(_,{className:"w-4 h-4 text-primary"}),e.jsx("h3",{className:"text-base font-medium",children:"API Key"}),a.apiKey.isCustom&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",children:"Custom"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Used by Claude Code to authenticate with CLIProxy"}),e.jsx("div",{className:"flex gap-2",children:e.jsxs("div",{className:"relative flex-1",children:[e.jsx(S,{type:y?"text":"password",value:B,onChange:s=>j(s.target.value),placeholder:"API key",disabled:n,className:"pr-20 font-mono text-sm"}),e.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:[e.jsx(i,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>R(!y),children:y?e.jsx(E,{className:"w-4 h-4"}):e.jsx(K,{className:"w-4 h-4"})}),e.jsx(i,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:$,disabled:!a.apiKey.value,children:L?e.jsx(T,{className:"w-4 h-4 text-green-600"}):e.jsx(P,{className:"w-4 h-4"})})]})]})})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(ee,{className:"w-4 h-4 text-primary"}),e.jsx("h3",{className:"text-base font-medium",children:"Management Secret"}),a.managementSecret.isCustom&&e.jsx("span",{className:"text-xs px-2 py-0.5 rounded bg-amber-100 text-amber-700 dark:bg-amber-900/50 dark:text-amber-300",children:"Custom"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:"Used by CCS dashboard to access CLIProxy management APIs"}),e.jsxs("div",{className:"flex gap-2",children:[e.jsxs("div",{className:"relative flex-1",children:[e.jsx(S,{type:w?"text":"password",value:G,onChange:s=>N(s.target.value),placeholder:"Management secret",disabled:n,className:"pr-20 font-mono text-sm"}),e.jsxs("div",{className:"absolute right-2 top-1/2 -translate-y-1/2 flex gap-1",children:[e.jsx(i,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:()=>z(!w),children:w?e.jsx(E,{className:"w-4 h-4"}):e.jsx(K,{className:"w-4 h-4"})}),e.jsx(i,{variant:"ghost",size:"sm",className:"h-7 w-7 p-0",onClick:M,disabled:!a.managementSecret.value,children:U?e.jsx(T,{className:"w-4 h-4 text-green-600"}):e.jsx(P,{className:"w-4 h-4"})})]})]}),e.jsx(i,{variant:"outline",size:"sm",onClick:O,disabled:n,title:"Generate new secure secret",children:e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"pt-4 border-t",children:[e.jsxs(i,{variant:"outline",size:"sm",onClick:D,disabled:n||!a.apiKey.isCustom&&!a.managementSecret.isCustom,className:"gap-2",children:[e.jsx(ae,{className:"w-4 h-4"}),"Reset to Defaults"]}),e.jsx("p",{className:"text-xs text-muted-foreground mt-2",children:"Resets both API key and management secret to their default values."})]})]})}),e.jsxs("div",{className:"p-4 border-t bg-background flex gap-2",children:[e.jsxs(i,{variant:"outline",size:"sm",onClick:q,disabled:g||n,className:"flex-1",children:[e.jsx(A,{className:`w-4 h-4 mr-2 ${g?"animate-spin":""}`}),"Refresh"]}),e.jsxs(i,{variant:"default",size:"sm",onClick:F,disabled:!J||n,className:"flex-1",children:[e.jsx(te,{className:`w-4 h-4 mr-2 ${n?"animate-pulse":""}`}),n?"Saving...":"Save"]})]})]})}export{he as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./radix-ui-
|
|
1
|
+
import{j as e}from"./radix-ui-C1Gpgz6I.js";import{r as t}from"./react-vendor-CNOkPC89.js";import{bd as R,m as w,S as a,C as f,b4 as S,b6 as E,B as D,b as y}from"./index-k-HuyjpO.js";import{A as B,a as T,b as O,c as _,d as F,e as U,f as I,g as L}from"./alert-dialog-CetY4Iww.js";import{a2 as z,r as P,a6 as k,q as $,w as M,R as Y}from"./icons-DrewC9c3.js";import"./tanstack-DDJIhNJd.js";import"./notifications-B2HqRBj7.js";import"./utils-CzKF5WmX.js";import"./form-utils-Cn_Uld6y.js";import"./code-highlight-BRUf_pqB.js";const q=3e3,H=5e3;function te(){const{fetchRawConfig:x}=R(),c=t.useRef(null),m=t.useRef(null),[j,v]=t.useState([]),[h,g]=t.useState(!0),[d,N]=t.useState(null),[n,l]=t.useState(null),[i,b]=t.useState(null),[u,p]=t.useState(null),o=t.useCallback(async()=>{c.current?.abort(),c.current=new AbortController;try{g(!0),l(null);const s=await fetch("/api/persist/backups",{signal:c.current.signal});if(!s.ok)throw new Error("Failed to fetch backups");const r=await s.json();v(r.backups||[])}catch(s){if(s instanceof Error&&s.name==="AbortError")return;l(s instanceof Error?s.message:"Unknown error")}finally{g(!1)}},[]),C=t.useCallback(async s=>{m.current?.abort(),m.current=new AbortController;try{N(s),l(null);const r=await fetch("/api/persist/restore",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({timestamp:s}),signal:m.current.signal});if(!r.ok){const A=await r.json();throw new Error(A.error||"Failed to restore backup")}b("Backup restored successfully"),await o(),await x()}catch(r){if(r instanceof Error&&r.name==="AbortError")return;l(r instanceof Error?r.message:"Unknown error")}finally{N(null)}},[o,x]);return t.useEffect(()=>{o()},[o]),t.useEffect(()=>()=>{c.current?.abort(),m.current?.abort()},[]),t.useEffect(()=>{if(i){const s=setTimeout(()=>b(null),q);return()=>clearTimeout(s)}},[i]),t.useEffect(()=>{if(n){const s=setTimeout(()=>l(null),H);return()=>clearTimeout(s)}},[n]),h?e.jsxs(e.Fragment,{children:[e.jsx(w,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(a,{className:"h-6 w-40"}),e.jsx(a,{className:"h-4 w-full"})]}),[1,2,3].map(s=>e.jsx(f,{className:"p-4",children:e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"space-y-2 flex-1",children:[e.jsx(a,{className:"h-4 w-32"}),e.jsx(a,{className:"h-3 w-48"})]}),e.jsx(a,{className:"h-8 w-20"})]})},s))]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsx(a,{className:"h-9 w-full"})})]}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:`absolute left-5 right-5 top-20 z-10 transition-all duration-200 ease-out ${n||i?"opacity-100 translate-y-0":"opacity-0 -translate-y-2 pointer-events-none"}`,children:[n&&e.jsxs(S,{variant:"destructive",className:"py-2 shadow-lg",children:[e.jsx(z,{className:"h-4 w-4"}),e.jsx(E,{children:n})]}),i&&e.jsxs("div",{className:"flex items-center gap-2 px-3 py-2 rounded-md border border-green-200 bg-green-50 text-green-700 shadow-lg dark:border-green-900/50 dark:bg-green-900/90 dark:text-green-300",children:[e.jsx(P,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"text-sm font-medium",children:i})]})]}),e.jsx(w,{className:"flex-1",children:e.jsxs("div",{className:"p-5 space-y-4",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 mb-2",children:[e.jsx(k,{className:"w-5 h-5 text-primary"}),e.jsx("h2",{className:"text-lg font-semibold",children:"Settings Backups"})]}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"Restore previous versions of your settings.json file. Backups are created automatically when settings are modified."})]}),j.length===0?e.jsx(f,{className:"p-8",children:e.jsxs("div",{className:"text-center",children:[e.jsx(k,{className:"w-12 h-12 mx-auto mb-3 opacity-30 text-muted-foreground"}),e.jsx("p",{className:"text-sm text-muted-foreground",children:"No backups available"}),e.jsx("p",{className:"text-xs text-muted-foreground mt-1",children:"Backups will appear here when you modify settings"})]})}):e.jsx("div",{className:"space-y-2",children:j.map((s,r)=>e.jsx(f,{className:"p-4 hover:bg-muted/50 transition-colors",children:e.jsxs("div",{className:"flex items-center justify-between gap-4",children:[e.jsxs("div",{className:"flex items-start gap-3 flex-1 min-w-0",children:[e.jsx($,{className:"w-4 h-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"min-w-0 flex-1",children:[e.jsxs("div",{className:"flex items-center gap-2 mb-1",children:[e.jsx("p",{className:"text-sm font-medium font-mono",children:s.timestamp}),r===0&&e.jsx(D,{variant:"secondary",className:"text-xs",children:"Latest"})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s.date})]})]}),e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>p(s.timestamp),disabled:d!==null,className:"gap-2 shrink-0",children:[e.jsx(M,{className:`w-4 h-4 ${d===s.timestamp?"animate-spin":""}`}),d===s.timestamp?"Restoring...":"Restore"]})]})},s.timestamp))})]})}),e.jsx("div",{className:"p-4 border-t bg-background",children:e.jsxs(y,{variant:"outline",size:"sm",onClick:()=>{o(),x()},disabled:h||d!==null,className:"w-full",children:[e.jsx(Y,{className:`w-4 h-4 mr-2 ${h?"animate-spin":""}`}),"Refresh"]})}),e.jsx(B,{open:!!u,onOpenChange:()=>p(null),children:e.jsxs(T,{children:[e.jsxs(O,{children:[e.jsx(_,{children:"Restore Backup?"}),e.jsxs(F,{children:["This will replace your current settings with backup from"," ",e.jsx("code",{className:"font-mono bg-muted px-1.5 py-0.5 rounded text-foreground",children:u}),". This action cannot be undone."]})]}),e.jsxs(U,{children:[e.jsx(I,{children:"Cancel"}),e.jsx(L,{onClick:()=>{u&&C(u),p(null)},children:"Restore"})]})]})})]})}export{te as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r,a0 as i,a1 as t}from"./radix-ui-
|
|
1
|
+
import{j as r,a0 as i,a1 as t}from"./radix-ui-C1Gpgz6I.js";import"./react-vendor-CNOkPC89.js";import{c as s}from"./index-k-HuyjpO.js";import{k as o}from"./icons-DrewC9c3.js";function b({className:e,...a}){return r.jsx(i,{"data-slot":"checkbox",className:s("peer border-input dark:bg-input/30 data-[state=checked]:bg-primary data-[state=checked]:text-primary-foreground dark:data-[state=checked]:bg-primary data-[state=checked]:border-primary focus-visible:border-ring focus-visible:ring-ring/50 aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive size-4 shrink-0 rounded-[4px] border shadow-xs transition-shadow outline-none focus-visible:ring-[3px] disabled:cursor-not-allowed disabled:opacity-50",e),...a,children:r.jsx(t,{"data-slot":"checkbox-indicator",className:"grid place-content-center text-current transition-none",children:r.jsx(o,{className:"size-3.5"})})})}export{b as C};
|