@kaitranntt/ccs 7.74.0-dev.8 → 7.74.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/dist/bin/ccsxp-runtime.d.ts +4 -0
- package/dist/bin/ccsxp-runtime.d.ts.map +1 -1
- package/dist/bin/ccsxp-runtime.js +49 -3
- package/dist/bin/ccsxp-runtime.js.map +1 -1
- package/dist/commands/command-catalog.d.ts.map +1 -1
- package/dist/commands/command-catalog.js +4 -1
- package/dist/commands/command-catalog.js.map +1 -1
- package/dist/ui/assets/{accounts-BHXLCVr2.js → accounts-DCJVsC1R.js} +1 -1
- package/dist/ui/assets/{alert-dialog-_HsPBPYt.js → alert-dialog-BZtIoyBc.js} +1 -1
- package/dist/ui/assets/{api-DJfWWXFl.js → api-DNXD8EA9.js} +1 -1
- package/dist/ui/assets/{auth-section-BAacZ7AC.js → auth-section-2-a8KRNY.js} +1 -1
- package/dist/ui/assets/{backups-section-BZRNv86z.js → backups-section-CezuWNFi.js} +1 -1
- package/dist/ui/assets/{channels-DP9aCTUd.js → channels-DaijLXYu.js} +1 -1
- package/dist/ui/assets/{checkbox-DcZz3WGM.js → checkbox-D6sWns2x.js} +1 -1
- package/dist/ui/assets/{claude-extension-CENyhVUo.js → claude-extension-BFbvT7N_.js} +1 -1
- package/dist/ui/assets/{cliproxy-Bxpop7Hy.js → cliproxy-4Z6gEF3R.js} +1 -1
- package/dist/ui/assets/{cliproxy-ai-providers-CRDA8-Ut.js → cliproxy-ai-providers-BZ0mTP-l.js} +1 -1
- package/dist/ui/assets/{cliproxy-control-panel-mve89_rF.js → cliproxy-control-panel-CFFjKRRQ.js} +1 -1
- package/dist/ui/assets/codex-D9ivkuYH.js +27 -0
- package/dist/ui/assets/{confirm-dialog-CA_kx7yS.js → confirm-dialog-CpZGygf5.js} +1 -1
- package/dist/ui/assets/{copilot-DS2c7d1T.js → copilot-DMmn_rxB.js} +1 -1
- package/dist/ui/assets/{cursor-Bbta1Z_q.js → cursor-D_Q86_Ei.js} +1 -1
- package/dist/ui/assets/{droid-bFC5rthA.js → droid-BAf_vL2l.js} +1 -1
- package/dist/ui/assets/{globalenv-section-CZNxpuZE.js → globalenv-section-B8jXcXvb.js} +1 -1
- package/dist/ui/assets/{health-DTrCPTsQ.js → health-BO8TUGV-.js} +1 -1
- package/dist/ui/assets/{index-CEuKLsUj.js → index-8bXW-BpK.js} +3 -3
- package/dist/ui/assets/{index-hh65jn6S.js → index-BsAeVEGk.js} +1 -1
- package/dist/ui/assets/{index-DjptczWk.js → index-CC4Wj5Im.js} +1 -1
- package/dist/ui/assets/{index-DkB98h6I.js → index-DcX4r1mv.js} +1 -1
- package/dist/ui/assets/{index-BzK9qB9a.js → index-DwhLYuc2.js} +1 -1
- package/dist/ui/assets/{index-CEtMdB2w.js → index-mHMlp8Vb.js} +1 -1
- package/dist/ui/assets/{index-B4dFnnun.js → index-vlkxIfEe.js} +1 -1
- package/dist/ui/assets/{logs-CskpzGaG.js → logs-Be6Ybx9a.js} +1 -1
- package/dist/ui/assets/{masked-input-Ck9tgCY7.js → masked-input-DXnXVYlE.js} +1 -1
- package/dist/ui/assets/{proxy-status-widget-CjDFDoLb.js → proxy-status-widget-BnvVPoy1.js} +1 -1
- package/dist/ui/assets/{raw-json-settings-editor-panel-DtHR8TT6.js → raw-json-settings-editor-panel-Bzz3efQU.js} +1 -1
- package/dist/ui/assets/{searchable-select-DmX9VGp5.js → searchable-select-DZale_hJ.js} +1 -1
- package/dist/ui/assets/{separator-CF37MlTs.js → separator-BkmmPPJc.js} +1 -1
- package/dist/ui/assets/{shared-CQDIfxlI.js → shared-ruYPWqHA.js} +1 -1
- package/dist/ui/assets/{table-Ce_lz0Ia.js → table-DdulTUSB.js} +1 -1
- package/dist/ui/assets/updates-COyrJbQd.js +1 -0
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/codex-DxHcxVjR.js +0 -27
- package/dist/ui/assets/updates-BRRjuRCH.js +0 -1
|
@@ -3,6 +3,10 @@ declare const path: any;
|
|
|
3
3
|
declare const stripTargetFlag: any;
|
|
4
4
|
declare const expandPath: any;
|
|
5
5
|
declare const fail: any;
|
|
6
|
+
declare const CCSXP_CLIPROXY_OVERRIDE = "model_provider=\"cliproxy\"";
|
|
7
|
+
declare const DISALLOWED_CCSXP_CONFIG_KEY_REGEX: RegExp;
|
|
8
|
+
declare function isDisallowedCcsxpConfigOverride(value: unknown): boolean;
|
|
9
|
+
declare function findDisallowedCcsxpFlags(args: string[]): unknown[];
|
|
6
10
|
declare function resolveCcsxpCodexHome(): any;
|
|
7
11
|
declare const forwardedArgs: any;
|
|
8
12
|
//# sourceMappingURL=ccsxp-runtime.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ccsxp-runtime.d.ts","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE,KAAgB,CAAC;AACzB,QAAA,MAAM,IAAI,KAAkB,CAAC;AAC7B,QAAA,MAAQ,eAAe,KAA0C,CAAC;AAClE,QAAA,MAAQ,UAAU,KAAgC,CAAC;AACnD,QAAA,MAAQ,IAAI,KAA2B,CAAC;
|
|
1
|
+
{"version":3,"file":"ccsxp-runtime.d.ts","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":"AAAA,QAAA,MAAM,EAAE,KAAgB,CAAC;AACzB,QAAA,MAAM,IAAI,KAAkB,CAAC;AAC7B,QAAA,MAAQ,eAAe,KAA0C,CAAC;AAClE,QAAA,MAAQ,UAAU,KAAgC,CAAC;AACnD,QAAA,MAAQ,IAAI,KAA2B,CAAC;AAGxC,QAAA,MAAM,uBAAuB,gCAA8B,CAAC;AAC5D,QAAA,MAAM,iCAAiC,QAC6B,CAAC;AAErE,iBAAS,+BAA+B,CAAC,KAAK,EAAE,OAAO,WAEtD;AAED,iBAAS,wBAAwB,CAAC,IAAI,EAAE,MAAM,EAAE,aA0C/C;AAED,iBAAS,qBAAqB,QAO7B;AAOD,QAAA,MAAM,aAAa,KAcf,CAAC"}
|
|
@@ -6,6 +6,47 @@ const { stripTargetFlag } = require('../targets/target-resolver');
|
|
|
6
6
|
const { expandPath } = require('../utils/helpers');
|
|
7
7
|
const { fail } = require('../utils/ui');
|
|
8
8
|
process.env.CCS_INTERNAL_ENTRY_TARGET = 'codex';
|
|
9
|
+
const CCSXP_CLIPROXY_OVERRIDE = 'model_provider="cliproxy"';
|
|
10
|
+
const DISALLOWED_CCSXP_CONFIG_KEY_REGEX = /^(model_provider|local_provider|profile)\s*=|^model_providers\./i;
|
|
11
|
+
function isDisallowedCcsxpConfigOverride(value) {
|
|
12
|
+
return typeof value === 'string' && DISALLOWED_CCSXP_CONFIG_KEY_REGEX.test(value.trim());
|
|
13
|
+
}
|
|
14
|
+
function findDisallowedCcsxpFlags(args) {
|
|
15
|
+
const disallowed = new Set();
|
|
16
|
+
for (let index = 0; index < args.length; index += 1) {
|
|
17
|
+
const arg = args[index];
|
|
18
|
+
if (arg === '--') {
|
|
19
|
+
break;
|
|
20
|
+
}
|
|
21
|
+
if (arg === '-p' || arg === '--profile' || arg.startsWith('--profile=')) {
|
|
22
|
+
disallowed.add('--profile/-p');
|
|
23
|
+
continue;
|
|
24
|
+
}
|
|
25
|
+
if (arg === '--oss') {
|
|
26
|
+
disallowed.add('--oss');
|
|
27
|
+
continue;
|
|
28
|
+
}
|
|
29
|
+
if (arg === '--local-provider' || arg.startsWith('--local-provider=')) {
|
|
30
|
+
disallowed.add('--local-provider');
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
if (arg === '-c' || arg === '--config') {
|
|
34
|
+
const value = args[index + 1];
|
|
35
|
+
if (isDisallowedCcsxpConfigOverride(value)) {
|
|
36
|
+
disallowed.add('--config/-c provider override');
|
|
37
|
+
}
|
|
38
|
+
index += 1;
|
|
39
|
+
continue;
|
|
40
|
+
}
|
|
41
|
+
if (arg.startsWith('--config=')) {
|
|
42
|
+
const value = arg.slice('--config='.length);
|
|
43
|
+
if (isDisallowedCcsxpConfigOverride(value)) {
|
|
44
|
+
disallowed.add('--config/-c provider override');
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
return [...disallowed];
|
|
49
|
+
}
|
|
9
50
|
function resolveCcsxpCodexHome() {
|
|
10
51
|
const configuredHome = process.env.CCSXP_CODEX_HOME?.trim();
|
|
11
52
|
if (configuredHome) {
|
|
@@ -14,10 +55,15 @@ function resolveCcsxpCodexHome() {
|
|
|
14
55
|
return path.join(os.homedir(), '.codex');
|
|
15
56
|
}
|
|
16
57
|
process.env.CODEX_HOME = resolveCcsxpCodexHome();
|
|
17
|
-
// ccsxp is
|
|
18
|
-
//
|
|
58
|
+
// ccsxp is the Codex + cliproxy shortcut. Keep the native Codex history root,
|
|
59
|
+
// strip conflicting target overrides, and prepend the native cliproxy provider
|
|
60
|
+
// override so the runtime stays as close to plain Codex as possible.
|
|
19
61
|
const forwardedArgs = (() => {
|
|
20
62
|
try {
|
|
63
|
+
const disallowedFlags = findDisallowedCcsxpFlags(process.argv.slice(2));
|
|
64
|
+
if (disallowedFlags.length > 0) {
|
|
65
|
+
throw new Error(`ccsxp does not allow ${disallowedFlags.join(', ')} because the native cliproxy shortcut owns provider selection. Remove native Codex provider-selection flags and retry.`);
|
|
66
|
+
}
|
|
21
67
|
return stripTargetFlag(process.argv.slice(2));
|
|
22
68
|
}
|
|
23
69
|
catch (error) {
|
|
@@ -26,6 +72,6 @@ const forwardedArgs = (() => {
|
|
|
26
72
|
process.exit(1);
|
|
27
73
|
}
|
|
28
74
|
})();
|
|
29
|
-
process.argv.splice(2, process.argv.length - 2, '
|
|
75
|
+
process.argv.splice(2, process.argv.length - 2, '--config', CCSXP_CLIPROXY_OVERRIDE, ...forwardedArgs);
|
|
30
76
|
require('../ccs');
|
|
31
77
|
//# sourceMappingURL=ccsxp-runtime.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ccsxp-runtime.js","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAClE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACnD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAExC,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,OAAO,CAAC;
|
|
1
|
+
{"version":3,"file":"ccsxp-runtime.js","sourceRoot":"","sources":["../../src/bin/ccsxp-runtime.ts"],"names":[],"mappings":";AAAA,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;AACzB,MAAM,IAAI,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;AAC7B,MAAM,EAAE,eAAe,EAAE,GAAG,OAAO,CAAC,4BAA4B,CAAC,CAAC;AAClE,MAAM,EAAE,UAAU,EAAE,GAAG,OAAO,CAAC,kBAAkB,CAAC,CAAC;AACnD,MAAM,EAAE,IAAI,EAAE,GAAG,OAAO,CAAC,aAAa,CAAC,CAAC;AAExC,OAAO,CAAC,GAAG,CAAC,yBAAyB,GAAG,OAAO,CAAC;AAChD,MAAM,uBAAuB,GAAG,2BAA2B,CAAC;AAC5D,MAAM,iCAAiC,GACrC,kEAAkE,CAAC;AAErE,SAAS,+BAA+B,CAAC,KAAc;IACrD,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,iCAAiC,CAAC,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE,CAAC,CAAC;AAC3F,CAAC;AAED,SAAS,wBAAwB,CAAC,IAAc;IAC9C,MAAM,UAAU,GAAG,IAAI,GAAG,EAAE,C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AEL,OAAO,CAAC,IAAI,CAAC,MAAM,CACjB,CAAC,EACD,OAAO,CAAC,IAAI,CAAC,MAAM,GAAG,CAAC,EACvB,UAAU,EACV,uBAAuB,EACvB,GAAG,aAAa,CACjB,CAAC;AAEF,OAAO,CAAC,QAAQ,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GACrB,UAAU,GACV,WAAW,GACX,MAAM,GACN,SAAS,GACT,YAAY,GACZ,SAAS,CAAC;AAEd,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,EAAE,OAAO,GAAG,QAAQ,GAAG,SAAS,GAAG,YAAY,CAAC;IACrD,UAAU,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAChC,OAAO,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC7B;AAED,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,gBAAgB,EAAE,SAAS,cAAc,EAO5C,CAAC;AAEX,eAAO,MAAM,oBAAoB,EAAE,SAAS,gBAAgB,EAqJlD,CAAC;AAEX,eAAO,MAAM,0BAA0B,EAAE,SAAS,aAAa,EAoB9D,CAAC;AAEF,eAAO,MAAM,qBAAqB,EAAE,SAAS,aAAa,EAWhD,CAAC;AAEX,eAAO,MAAM,8BAA8B,EAAE,SAAS,aAAa,
|
|
1
|
+
{"version":3,"file":"command-catalog.d.ts","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":"AAGA,MAAM,MAAM,aAAa,GACrB,UAAU,G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AAM,wBAAwB,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,CAAC,CAchF,CAAC;AAEF,eAAO,MAAM,6BAA6B,2EAOhC,CAAC;AACX,eAAO,MAAM,8BAA8B,8FAA4C,CAAC;AAExF,wBAAgB,qBAAqB,IAAI,SAAS,gBAAgB,EAAE,CAEnE;AAED,wBAAgB,uBAAuB,IAAI,MAAM,EAAE,CAIlD;AAED,wBAAgB,0BAA0B,IAAI,MAAM,EAAE,CAOrD;AAED,wBAAgB,aAAa,CAAC,MAAM,EAAE,SAAS,MAAM,EAAE,GAAG,MAAM,EAAE,CAEjE"}
|
|
@@ -194,7 +194,10 @@ exports.ROOT_PROFILE_EXAMPLES = [
|
|
|
194
194
|
exports.ROOT_COMPATIBLE_ALIAS_EXAMPLES = [
|
|
195
195
|
{ name: '--target claude|droid|codex', summary: 'Route a profile to the target runtime' },
|
|
196
196
|
{ name: 'ccs-droid / ccsd', summary: 'Explicit Droid runtime aliases' },
|
|
197
|
-
{
|
|
197
|
+
{
|
|
198
|
+
name: 'ccs-codex / ccsx / ccsxp',
|
|
199
|
+
summary: 'Codex runtime aliases plus the cliproxy shortcut',
|
|
200
|
+
},
|
|
198
201
|
];
|
|
199
202
|
exports.ROOT_COMMAND_FLAGS = [
|
|
200
203
|
'--help',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"command-catalog.js","sourceRoot":"","sources":["../../src/commands/command-catalog.ts"],"names":[],"mappings":";;;AAAA,oDAA2D;AAC3D,6EAA0E;AA4B7D,QAAA,gBAAgB,GAA8B;IACzD,EAAE,IAAI,EAAE,UAAU,EAAE,OAAO,EAAE,uDAAuD,EAAE;IACtF,EAAE,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,gDAAgD,EAAE;IAChF,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,EAAE,qDAAqD,EAAE;IAChF,EAAE,IAAI,EAAE,SAAS,EAAE,OAAO,EAAE,wD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endor-CNOkPC89.js";import{u as Ce,a as $,b as F,e as ke,f as ee,g as we}from"./tanstack-CrmUhA7Z.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-Ce_lz0Ia.js";import{a as P,Y as z,ah as de,ai as ue,aj as xe,ak as me,al as he,L as S,I as V,x as _,aD as Se,d as b,B as A,C as O,b as R,e as Ge,f as Me,g as Oe,n as Re,j as I,k as q,_ as Q}from"./index-CEuKLsUj.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-_HsPBPYt.js";import{t as k}from"./notifications-B2HqRBj7.js";import{b1 as W,b2 as E,b3 as pe,aH as ge,_ as fe,b4 as Ee,b5 as Ue,m as Y,at as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-DyorC3Xk.js";import{C as re}from"./checkbox-DcZz3WGM.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function We(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const p=n.context_group||"default",m=c.get(p)??{group:p,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),c.set(p,m)}const t=Array.from(c.values()).sort((n,p)=>n.group.localeCompare(p.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const p=n.context_group||"default",m=c.get(p),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),s=o.filter(n=>n.context_mode==="shared").length,u=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,l=o.filter(n=>n.context_inferred).length,h=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-u,0),deeperSharedCount:u,isolatedCount:o.length-s,legacyContextCount:l,legacyContinuityCount:h,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Ye(){return Ce({queryKey:["accounts"],queryFn:()=>z.accounts.list(),select:a=>{const c=a.accounts.filter(u=>u.type!=="cliproxy"),t=We(c),o=a.accounts.length-c.length,s=t.accounts.some(u=>u.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function Je(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function et(){const a=$(),{t:c}=P();return F({mutationFn:()=>z.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function tt(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function be(){const a=$(),{t:c}=P();return F({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:u})=>z.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:u}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),u=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:u}))},onError:t=>{k.error(t.message)}})}function st(){const a=$(),{t:c}=P();return F({mutationFn:async t=>{const o=t.filter(l=>l.context_inferred||l.continuity_inferred),u=(await Promise.allSettled(o.map(l=>{const h=l.context_mode==="shared";return z.accounts.updateContext(l.name,{context_mode:h?"shared":"isolated",context_group:h?l.context_group||"default":void 0,continuity_mode:h?l.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(l=>l.status==="rejected").length;return{updatedCount:o.length-u,failedCount:u}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),u=be(),[l,h]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,p]=C.useState(a.context_group||"default"),[m,y]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(g=>g.group===x),[c,x]),N=x.length>0&&x.length<=oe&&at.test(x),r=l==="isolated"||N,d=l==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=l==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,G=`ccs auth default ${a.name}`,T=`ccs auth backup ${a.name}`,w=(g,K,M,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=M.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+M.length)%M.length;H(M[Ne])},L=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",D=()=>{r&&u.mutate({name:a.name,context_mode:l,context_group:l==="shared"?x:void 0,continuity_mode:l==="shared"?m:void 0},{onSuccess:()=>{o()}})},B=g=>{g||o()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:s("editAccountContext.title")}),e.jsx(he,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="isolated",tabIndex:l==="isolated"?0:-1,onClick:()=>h("isolated"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="shared",tabIndex:l==="shared"?0:-1,onClick:()=>h("shared"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(l==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>p(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:T}),e.jsx(_,{value:T,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(_,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${l==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[l==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[l==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:x})})," ",d>0?s("editAccountContext.sameGroupPeerCount",{count:d}):s("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?s("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${l==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:o,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:D,disabled:!r||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),u=Je(),l=tt(),h=et(),n=be(),[p,m]=C.useState(null),[y,x]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const d=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const f=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const d=r.original.name===c,f=u.isPending||l.isPending||n.isPending,v=r.original.type==="cliproxy",j=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>u.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),s(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(r.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:i,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(r=>e.jsx(te,{children:r.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},r.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(r=>e.jsx(te,{children:r.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:o,onClose:()=>x(null)}),e.jsx(ze,{open:!!p,onOpenChange:r=>!r&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:s("accountsTable.deleteDialogDesc",{name:p??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:s("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{p&&(l.mutate(p),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function le({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:l,deeperReadyAccountCount:h,sharedPeerGroups:n,deeperReadyGroups:p,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:i}=P(),N=x?x.kind==="native"?i("continuityOverview.lane.native"):x.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":p.length===0?"shared-standard":t>0||u>0||h<l||p.length<n.length?"partial":"ready",d=p[0]||n[0]||"default",f=p.length>0&&(t>0||o>0||n.length>p.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&x?.account_name===c,T=a>0&&!!x&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:d})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:d,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&p.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:d})})]})]})}),(T||w)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[T&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(_,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ie=64;function rt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[u,l]=C.useState(!1),[h,n]=C.useState(""),[p,m]=C.useState(!1),[y,x]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),N=h.trim().toLowerCase().replace(/\s+/g,"-"),r=N.length===0||N.length<=ie&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=o&&i?[`ccs auth create ${o}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&p?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!i||u&&!r||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),l(!1),n(""),m(!1),x(!1),c()};return e.jsx(de,{open:a,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:u,onCheckedChange:j=>l(j===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:h,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:p,onCheckedChange:j=>m(j===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),h.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ie})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!i||u&&!r,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!i||u&&!r,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:a}=P(),c=ve(),{data:t,isLoading:o}=Ye(),s=st(),[u,l]=C.useState(!1),h=t?.accounts||[],n=t?.cliproxyCount||0,p=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,N=t?.isolatedCount||0,r=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],T=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=h.filter(H=>H.context_inferred||H.continuity_inferred),D=L.length,B=D>0,g=()=>c("/cliproxy?provider=claude"),K=()=>c("/cliproxy?provider=claude&action=auth"),M=()=>s.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx(Re,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[p>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:p})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(Q,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(_,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(_,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(Q,{children:a("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(Q,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}),e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]}),e.jsx(rt,{open:u,onClose:()=>l(!1)})]})}export{bt as AccountsPage};
|
|
1
|
+
import{j as e}from"./radix-ui-Zb8sVEtn.js";import{r as C,h as ve}from"./react-vendor-CNOkPC89.js";import{u as Ce,a as $,b as F,e as ke,f as ee,g as we}from"./tanstack-CrmUhA7Z.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-DdulTUSB.js";import{a as P,Y as z,ah as de,ai as ue,aj as xe,ak as me,al as he,L as S,I as V,x as _,aD as Se,d as b,B as A,C as O,b as R,e as Ge,f as Me,g as Oe,n as Re,j as I,k as q,_ as Q}from"./index-8bXW-BpK.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-BZtIoyBc.js";import{t as k}from"./notifications-B2HqRBj7.js";import{b1 as W,b2 as E,b3 as pe,aH as ge,_ as fe,b4 as Ee,b5 as Ue,m as Y,at as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-DyorC3Xk.js";import{C as re}from"./checkbox-D6sWns2x.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(a){return Array.from(a).sort((c,t)=>c.localeCompare(t))}function We(a){const c=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const p=n.context_group||"default",m=c.get(p)??{group:p,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),c.set(p,m)}const t=Array.from(c.values()).sort((n,p)=>n.group.localeCompare(p.group)),o=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const p=n.context_group||"default",m=c.get(p),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),s=o.filter(n=>n.context_mode==="shared").length,u=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,l=o.filter(n=>n.context_inferred).length,h=o.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:o,sharedCount:s,sharedStandardCount:Math.max(s-u,0),deeperSharedCount:u,isolatedCount:o.length-s,legacyContextCount:l,legacyContinuityCount:h,sharedAloneCount:o.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:o.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:o.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Ye(){return Ce({queryKey:["accounts"],queryFn:()=>z.accounts.list(),select:a=>{const c=a.accounts.filter(u=>u.type!=="cliproxy"),t=We(c),o=a.accounts.length-c.length,s=t.accounts.some(u=>u.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:o,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:a.plain_ccs_lane??null}}})}function Je(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.setDefault(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountSet",{name:o}))},onError:t=>{k.error(t.message)}})}function et(){const a=$(),{t:c}=P();return F({mutationFn:()=>z.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.defaultAccountReset"))},onError:t=>{k.error(t.message)}})}function tt(){const a=$(),{t:c}=P();return F({mutationFn:t=>z.accounts.delete(t),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(c("toasts.accountDeleted",{name:o}))},onError:t=>{k.error(t.message)}})}function be(){const a=$(),{t:c}=P();return F({mutationFn:({name:t,context_mode:o,context_group:s,continuity_mode:u})=>z.accounts.updateContext(t,{context_mode:o,context_group:s,continuity_mode:u}),onSuccess:(t,o)=>{a.invalidateQueries({queryKey:["accounts"]});const s=(o.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-"),u=o.context_mode==="shared"?o.continuity_mode==="deeper"?`${c("accountsPage.sharedDeeper")} (${s})`:`${c("accountsPage.sharedStandard")} (${s})`:c("accountsPage.isolated");k.success(c("toasts.contextUpdated",{name:o.name,summary:u}))},onError:t=>{k.error(t.message)}})}function st(){const a=$(),{t:c}=P();return F({mutationFn:async t=>{const o=t.filter(l=>l.context_inferred||l.continuity_inferred),u=(await Promise.allSettled(o.map(l=>{const h=l.context_mode==="shared";return z.accounts.updateContext(l.name,{context_mode:h?"shared":"isolated",context_group:h?l.context_group||"default":void 0,continuity_mode:h?l.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(l=>l.status==="rejected").length;return{updatedCount:o.length-u,failedCount:u}},onSuccess:({updatedCount:t,failedCount:o})=>{if(a.invalidateQueries({queryKey:["accounts"]}),o>0&&t>0){k.error(c("toasts.legacyConfirmPartial",{updated:t,failed:o}));return}if(o>0){k.error(c("toasts.legacyConfirmAllFailed",{failed:o}));return}if(t>0){k.success(c("toasts.legacyConfirmSuccess",{count:t}));return}k.info(c("toasts.noLegacyAccounts"))},onError:t=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(t.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:c,plainCcsLane:t,onClose:o}){const{t:s}=P(),u=be(),[l,h]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,p]=C.useState(a.context_group||"default"),[m,y]=C.useState(a.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),i=C.useMemo(()=>c.find(g=>g.group===x),[c,x]),N=x.length>0&&x.length<=oe&&at.test(x),r=l==="isolated"||N,d=l==="shared"?Math.max((i?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=l==="shared"?Math.max((i?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,G=`ccs auth default ${a.name}`,T=`ccs auth backup ${a.name}`,w=(g,K,M,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=M.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+M.length)%M.length;H(M[Ne])},L=t?t.kind==="native"?s("continuityOverview.lane.native"):t.kind==="account-default"?s("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?s("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?s("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",D=()=>{r&&u.mutate({name:a.name,context_mode:l,context_group:l==="shared"?x:void 0,continuity_mode:l==="shared"?m:void 0},{onSuccess:()=>{o()}})},B=g=>{g||o()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:s("editAccountContext.title")}),e.jsx(he,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="isolated",tabIndex:l==="isolated"?0:-1,onClick:()=>h("isolated"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":l==="shared",tabIndex:l==="shared"?0:-1,onClick:()=>h("shared"),onKeyDown:g=>w(g,l,["isolated","shared"],h),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${l==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(l==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>p(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),l==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:s("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:s("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:a.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:T}),e.jsx(_,{value:T,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:G}),e.jsx(_,{value:G,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${l==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[l==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[l==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group:x})})," ",d>0?s("editAccountContext.sameGroupPeerCount",{count:d}):s("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?s("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${l==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:o,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:D,disabled:!r||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:c,groupSummaries:t,plainCcsLane:o}){const{t:s}=P(),u=Je(),l=tt(),h=et(),n=be(),[p,m]=C.useState(null),[y,x]=C.useState(null),i=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:r})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:r.original.name}),r.original.name===c&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:s("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:s("accountsTable.type"),size:100,cell:({row:r})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:r.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:r})=>{const d=new Date(r.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:r})=>{if(!r.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(r.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:r})=>{if(r.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((r.original.context_mode||"isolated")==="shared"){const f=r.original.context_group||"default",v=r.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(A,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:s(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:r.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:r.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return r.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(A,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:s("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(A,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:s("accountsTable.badges.isolated")})})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:r})=>{const d=r.original.name===c,f=u.isPending||l.isPending||n.isPending,v=r.original.type==="cliproxy",j=r.original.context_inferred||r.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(r.original),title:s("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:r.original.name,context_mode:r.original.context_mode==="shared"?"shared":"isolated",context_group:r.original.context_mode==="shared"?r.original.context_group||"default":void 0,continuity_mode:r.original.context_mode==="shared"?r.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>u.mutate(r.original.name),children:[e.jsx(Y,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),s(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(r.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:i,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(r=>e.jsx(te,{children:r.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},r.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(r=>e.jsx(te,{children:r.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},r.id))})]})}),c&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>h.mutate(),disabled:h.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:o,onClose:()=>x(null)}),e.jsx(ze,{open:!!p,onOpenChange:r=>!r&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:s("accountsTable.deleteDialogDesc",{name:p??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:s("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{p&&(l.mutate(p),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:c})=>{const{t}=P();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Oe,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(c)})]})]})};function le({totalAccounts:a,primaryAccountName:c,isolatedCount:t,sharedStandardCount:o,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:l,deeperReadyAccountCount:h,sharedPeerGroups:n,deeperReadyGroups:p,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:i}=P(),N=x?x.kind==="native"?i("continuityOverview.lane.native"):x.kind==="account-default"?i("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?i("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?i("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",r=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":p.length===0?"shared-standard":t>0||u>0||h<l||p.length<n.length?"partial":"ready",d=p[0]||n[0]||"default",f=p.length>0&&(t>0||o>0||n.length>p.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(J,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[r],G=!!c&&x?.account_name===c,T=a>0&&!!x&&(!c||!G),w=a>1&&r!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:i(`continuityReadiness.messages.${r}.title`,{group:d})}),e.jsx(A,{variant:r==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:i(`continuityReadiness.state.${r}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:i(`continuityReadiness.messages.${r}.description`,{group:d,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(A,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:i("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(A,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:i("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&p.length===0&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(A,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:i("continuityOverview.partialBadge",{group:d})})]})]})}),(T||w)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[T&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:i("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(_,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(_,{value:"ccs auth backup default",size:"icon"})]}),c?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${c}`}),e.jsx(_,{value:`ccs auth default ${c}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:i("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:i("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:i("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:i("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:i("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:i("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:i("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:i("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:o})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:i("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const ie=64;function rt({open:a,onClose:c}){const{t}=P(),[o,s]=C.useState(""),[u,l]=C.useState(!1),[h,n]=C.useState(""),[p,m]=C.useState(!1),[y,x]=C.useState(!1),i=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(o),N=h.trim().toLowerCase().replace(/\s+/g,"-"),r=N.length===0||N.length<=ie&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=o&&i?[`ccs auth create ${o}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&p?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!i||u&&!r||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),l(!1),n(""),m(!1),x(!1),c()};return e.jsx(de,{open:a,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:o,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),o&&!i&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:u,onCheckedChange:j=>l(j===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:h,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:p,onCheckedChange:j=>m(j===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),h.trim().length>0&&!r&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ie})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!i||u&&!r,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!i||u&&!r,children:y?e.jsxs(e.Fragment,{children:[e.jsx(Y,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:a}=P(),c=ve(),{data:t,isLoading:o}=Ye(),s=st(),[u,l]=C.useState(!1),h=t?.accounts||[],n=t?.cliproxyCount||0,p=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,i=t?.deeperSharedCount||0,N=t?.isolatedCount||0,r=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],G=t?.sharedGroups||[],T=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=h.filter(H=>H.context_inferred||H.continuity_inferred),D=L.length,B=D>0,g=()=>c("/cliproxy?provider=claude"),K=()=>c("/cliproxy?provider=claude&action=auth"),M=()=>s.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Ve,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:a("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.manageSuffix")]})]}),e.jsx(Re,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[p>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:p})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(Q,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(_,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(_,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(A,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(A,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(Q,{children:a("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(Q,{children:[a("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>l(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:M,disabled:s.isPending||D===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:D})})]})]}),e.jsx(le,{totalAccounts:h.length,primaryAccountName:h.length===1?h[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:i,sharedAloneCount:r,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:G,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:D,cliproxyCount:n,plainCcsLane:w}),e.jsxs(O,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:o?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:h,defaultAccount:t?.default??null,groupSummaries:T,plainCcsLane:w})})]})]}),e.jsx(rt,{open:u,onClose:()=>l(!1)})]})}export{bt as AccountsPage};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-Zb8sVEtn.js";import"./react-vendor-CNOkPC89.js";import{c as o,bR as l}from"./index-
|
|
1
|
+
import{j as e,a3 as s,a4 as r,a5 as n,a6 as i,a7 as d,a8 as c,a9 as u,aa as f}from"./radix-ui-Zb8sVEtn.js";import"./react-vendor-CNOkPC89.js";import{c as o,bR as l}from"./index-8bXW-BpK.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};
|