@kaitranntt/ccs 7.67.0-dev.6 → 7.67.0-dev.7
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/cliproxy/model-catalog.d.ts.map +1 -1
- package/dist/cliproxy/model-catalog.js +19 -4
- package/dist/cliproxy/model-catalog.js.map +1 -1
- package/dist/shared/agy-gemini-pro-compatibility.d.ts +15 -0
- package/dist/shared/agy-gemini-pro-compatibility.d.ts.map +1 -0
- package/dist/shared/agy-gemini-pro-compatibility.js +18 -0
- package/dist/shared/agy-gemini-pro-compatibility.js.map +1 -0
- package/dist/ui/assets/{accounts-BOBt8qmH.js → accounts-CD6xqLf4.js} +1 -1
- package/dist/ui/assets/{alert-dialog-BE0w14Bi.js → alert-dialog-Cq0uMwyf.js} +1 -1
- package/dist/ui/assets/{api-jOigwnfw.js → api-DYb7nMX1.js} +1 -1
- package/dist/ui/assets/{auth-section-CibYATlA.js → auth-section-B8ptHr9t.js} +1 -1
- package/dist/ui/assets/{backups-section-Blko2Tf6.js → backups-section-m6vX118k.js} +1 -1
- package/dist/ui/assets/{channels-D-k3Syy5.js → channels-CXmV9gwU.js} +1 -1
- package/dist/ui/assets/{checkbox-By2DQCzK.js → checkbox-dGCgZTKA.js} +1 -1
- package/dist/ui/assets/{claude-extension-Bil-P_9G.js → claude-extension-TiOTnDTd.js} +1 -1
- package/dist/ui/assets/cliproxy-EF7iEy5S.js +3 -0
- package/dist/ui/assets/{cliproxy-ai-providers-4w79eRiv.js → cliproxy-ai-providers-BK0savIX.js} +1 -1
- package/dist/ui/assets/{cliproxy-control-panel-C1k_wf7z.js → cliproxy-control-panel-DAoeSaoD.js} +1 -1
- package/dist/ui/assets/{codex-DNoq1VkC.js → codex-B1reJvsl.js} +1 -1
- package/dist/ui/assets/{confirm-dialog-US_UaPyf.js → confirm-dialog-C-kGSty5.js} +1 -1
- package/dist/ui/assets/{copilot-BMkQ_QRT.js → copilot-CA9P3Gsd.js} +1 -1
- package/dist/ui/assets/{cursor-xU7JLtxV.js → cursor-BaX25jJK.js} +1 -1
- package/dist/ui/assets/{droid-BNxUZY4V.js → droid-zythBAEB.js} +1 -1
- package/dist/ui/assets/{globalenv-section-Dw7F_urX.js → globalenv-section-Cwav5LU1.js} +1 -1
- package/dist/ui/assets/{health-Ddu-xxIx.js → health-B_CZll49.js} +1 -1
- package/dist/ui/assets/{index-fEZshZPo.js → index-BDlLr4t5.js} +2 -2
- package/dist/ui/assets/{index-8euRVukD.js → index-BsbzlZcs.js} +1 -1
- package/dist/ui/assets/{index-Ca-UH2c1.js → index-BwpceYga.js} +1 -1
- package/dist/ui/assets/{index-BHY0WRtR.js → index-COgxkmyB.js} +1 -1
- package/dist/ui/assets/{index-DKL3u-gW.js → index-ChCDerjX.js} +1 -1
- package/dist/ui/assets/{index-DXd6_mKB.js → index-D6eRghE-.js} +1 -1
- package/dist/ui/assets/{logs-CQMjsNYa.js → logs-Bn5qH5av.js} +1 -1
- package/dist/ui/assets/{masked-input-BfhwpXRH.js → masked-input-BAcMJrej.js} +1 -1
- package/dist/ui/assets/{proxy-status-widget-HO9jS5Qd.js → proxy-status-widget-BzhhtHaF.js} +1 -1
- package/dist/ui/assets/{raw-json-settings-editor-panel-DX7F7Pri.js → raw-json-settings-editor-panel-q7Z0GFci.js} +1 -1
- package/dist/ui/assets/{searchable-select-qRzYMbYU.js → searchable-select-D2J-XoN0.js} +1 -1
- package/dist/ui/assets/{separator-B2k5GQrX.js → separator-4bzMuArh.js} +1 -1
- package/dist/ui/assets/{shared-B1RmJpal.js → shared-DMT_Fh95.js} +1 -1
- package/dist/ui/assets/{table-Cb3x_pJ-.js → table-CyRavMCY.js} +1 -1
- package/dist/ui/assets/{updates-Av_yOTDS.js → updates-D6XV9cJj.js} +1 -1
- package/dist/ui/index.html +1 -1
- package/package.json +1 -1
- package/dist/ui/assets/cliproxy-C6Hg0R5t.js +0 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../src/cliproxy/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;
|
|
1
|
+
{"version":3,"file":"model-catalog.d.ts","sourceRoot":"","sources":["../../src/cliproxy/model-catalog.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAchD;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,wFAAwF;IACxF,IAAI,EAAE,QAAQ,GAAG,QAAQ,GAAG,MAAM,CAAC;IACnC,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,8CAA8C;IAC9C,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,0CAA0C;IAC1C,MAAM,CAAC,EAAE,MAAM,EAAE,CAAC;IAClB,iFAAiF;IACjF,QAAQ,CAAC,EAAE,SAAS,GAAG,KAAK,GAAG,QAAQ,GAAG,MAAM,GAAG,OAAO,CAAC;IAC3D,gDAAgD;IAChD,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,+CAA+C;IAC/C,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,iDAAiD;IACjD,EAAE,EAAE,MAAM,CAAC;IACX,sCAAsC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,6FAA6F;IAC7F,IAAI,CAAC,EAAE,MAAM,GAAG,KAAK,GAAG,OAAO,CAAC;IAChC,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,0DAA0D;IAC1D,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,kCAAkC;IAClC,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,uDAAuD;IACvD,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,iCAAiC;IACjC,iBAAiB,CAAC,EAAE,MAA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,CACvC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,GACd,MAAM,GAAG,SAAS,CAGpB;AAED;;GAEG;AACH,wBAAgB,uBAAuB,CACrC,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,GACd,eAAe,GAAG,SAAS,CAG7B;AAED;;;GAGG;AACH,wBAAgB,gBAAgB,CAC9B,QAAQ,EAAE,gBAAgB,EAC1B,OAAO,EAAE,MAAM,GACd,eAAe,CAAC,UAAU,CAAC,GAAG,SAAS,CAGzC;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAGrF;AAED;;;GAGG;AACH,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAG5F;AAED;;GAEG;AACH,wBAAgB,wBAAwB,CAAC,QAAQ,EAAE,gBAAgB,EAAE,OAAO,EAAE,MAAM,GAAG,OAAO,CAG7F;AAED;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAG5D"}
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
9
|
exports.isNativeGeminiModel = exports.supportsNativeImageInput = exports.supportsExtendedContext = exports.supportsThinking = exports.getModelMaxLevel = exports.getModelThinkingSupport = exports.getModelDeprecationReason = exports.isModelDeprecated = exports.getModelIssueUrl = exports.isModelBroken = exports.findModel = exports.getSuggestedReplacementModel = exports.getProviderCatalog = exports.supportsModelConfig = exports.MODEL_CATALOG = void 0;
|
|
10
10
|
const model_id_normalizer_1 = require("./model-id-normalizer");
|
|
11
|
+
const agy_gemini_pro_compatibility_1 = require("../shared/agy-gemini-pro-compatibility");
|
|
11
12
|
const extended_context_utils_1 = require("../shared/extended-context-utils");
|
|
12
13
|
const gemini_minor_version_compatibility_1 = require("../shared/gemini-minor-version-compatibility");
|
|
13
14
|
/**
|
|
@@ -51,11 +52,19 @@ exports.MODEL_CATALOG = {
|
|
|
51
52
|
},
|
|
52
53
|
},
|
|
53
54
|
{
|
|
54
|
-
id:
|
|
55
|
-
name: 'Gemini 3.1 Pro',
|
|
56
|
-
description: '
|
|
55
|
+
id: agy_gemini_pro_compatibility_1.AGY_GEMINI_PRO_HIGH_ID,
|
|
56
|
+
name: 'Gemini 3.1 Pro High',
|
|
57
|
+
description: 'Current Antigravity Gemini Pro route with higher reasoning budget',
|
|
57
58
|
nativeImageInput: true,
|
|
58
|
-
thinking: { type: '
|
|
59
|
+
thinking: { type: 'none' },
|
|
60
|
+
extendedContext: true,
|
|
61
|
+
},
|
|
62
|
+
{
|
|
63
|
+
id: agy_gemini_pro_compatibility_1.AGY_GEMINI_PRO_LOW_ID,
|
|
64
|
+
name: 'Gemini 3.1 Pro Low',
|
|
65
|
+
description: 'Current Antigravity Gemini Pro route with the lighter quota tier',
|
|
66
|
+
nativeImageInput: true,
|
|
67
|
+
thinking: { type: 'none' },
|
|
59
68
|
extendedContext: true,
|
|
60
69
|
},
|
|
61
70
|
{
|
|
@@ -394,6 +403,12 @@ function findModel(provider, modelId) {
|
|
|
394
403
|
if (compatibilityId) {
|
|
395
404
|
lookupCandidates.add(compatibilityId);
|
|
396
405
|
}
|
|
406
|
+
if ((0, model_id_normalizer_1.isAntigravityProvider)(provider)) {
|
|
407
|
+
const agyCompatibilityId = agy_gemini_pro_compatibility_1.AGY_GEMINI_PRO_COMPATIBILITY_IDS[candidate];
|
|
408
|
+
if (agyCompatibilityId) {
|
|
409
|
+
lookupCandidates.add(agyCompatibilityId);
|
|
410
|
+
}
|
|
411
|
+
}
|
|
397
412
|
}
|
|
398
413
|
return catalog.models.find((m) => lookupCandidates.has(m.id.toLowerCase()));
|
|
399
414
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"model-catalog.js","sourceRoot":"","sources":["../../src/cliproxy/model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,MAAM,KAAK,GAAG,SAAS,CAAC,QAAQ,EAAE,OAAO,CAAC,CAAC;IAC3C,OAAO,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;AAC1C,CAAC;AAHD,4DAGC;AAED;;;GAGG;AACH,SAAgB,mBAAmB,CAAC,OAAe;IACjD,MAAM,KAAK,GAAG,OAAO,CAAC,WAAW,EAAE,CAAC;IACpC,OAAO,KAAK,CAAC,UAAU,CAAC,SAAS,CAAC,CAAC;AACrC,CAAC;AAHD,kDAGC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare const AGY_GEMINI_PRO_HIGH_ID = "gemini-3.1-pro-high";
|
|
2
|
+
export declare const AGY_GEMINI_PRO_LOW_ID = "gemini-3.1-pro-low";
|
|
3
|
+
export declare const AGY_GEMINI_PRO_COMPATIBILITY_IDS: Readonly<{
|
|
4
|
+
'gemini-3-pro-high': string;
|
|
5
|
+
'gemini-3.1-pro-high': string;
|
|
6
|
+
'gemini-3-pro-low': string;
|
|
7
|
+
'gemini-3.1-pro-low': string;
|
|
8
|
+
'gemini-3-pro-preview': string;
|
|
9
|
+
'gemini-3-pro-preview-customtools': string;
|
|
10
|
+
'gemini-3.1-pro-preview': string;
|
|
11
|
+
'gemini-3.1-pro-preview-customtools': string;
|
|
12
|
+
'gemini-3-1-pro-preview': string;
|
|
13
|
+
'gemini-3-1-pro-preview-customtools': string;
|
|
14
|
+
}>;
|
|
15
|
+
//# sourceMappingURL=agy-gemini-pro-compatibility.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agy-gemini-pro-compatibility.d.ts","sourceRoot":"","sources":["../../src/shared/agy-gemini-pro-compatibility.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,sBAAsB,wBAAwB,CAAC;AAC5D,eAAO,MAAM,qBAAqB,uBAAuB,CAAC;AAE1D,eAAO,MAAM,gCAAgC;;;;;;;;;;;EAWV,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.AGY_GEMINI_PRO_COMPATIBILITY_IDS = exports.AGY_GEMINI_PRO_LOW_ID = exports.AGY_GEMINI_PRO_HIGH_ID = void 0;
|
|
4
|
+
exports.AGY_GEMINI_PRO_HIGH_ID = 'gemini-3.1-pro-high';
|
|
5
|
+
exports.AGY_GEMINI_PRO_LOW_ID = 'gemini-3.1-pro-low';
|
|
6
|
+
exports.AGY_GEMINI_PRO_COMPATIBILITY_IDS = Object.freeze({
|
|
7
|
+
'gemini-3-pro-high': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
8
|
+
'gemini-3.1-pro-high': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
9
|
+
'gemini-3-pro-low': exports.AGY_GEMINI_PRO_LOW_ID,
|
|
10
|
+
'gemini-3.1-pro-low': exports.AGY_GEMINI_PRO_LOW_ID,
|
|
11
|
+
'gemini-3-pro-preview': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
12
|
+
'gemini-3-pro-preview-customtools': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
13
|
+
'gemini-3.1-pro-preview': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
14
|
+
'gemini-3.1-pro-preview-customtools': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
15
|
+
'gemini-3-1-pro-preview': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
16
|
+
'gemini-3-1-pro-preview-customtools': exports.AGY_GEMINI_PRO_HIGH_ID,
|
|
17
|
+
});
|
|
18
|
+
//# sourceMappingURL=agy-gemini-pro-compatibility.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"agy-gemini-pro-compatibility.js","sourceRoot":"","sources":["../../src/shared/agy-gemini-pro-compatibility.ts"],"names":[],"mappings":";;;AAAa,QAAA,sBAAsB,GAAG,qBAAqB,CAAC;AAC/C,QAAA,qBAAqB,GAAG,oBAAoB,CAAC;AAE7C,QAAA,gCAAgC,GAAG,MAAM,CAAC,MAAM,CAAC;IAC5D,mBAAmB,EAAE,8BAAsB;IAC3C,qBAAqB,EAAE,8BAAsB;IAC7C,kBAAkB,EAAE,6BAAqB;IACzC,oBAAoB,EAAE,6BAAqB;IAC3C,sBAAsB,EAAE,8BAAsB;IAC9C,kCAAkC,EAAE,8BAAsB;IAC1D,wBAAwB,EAAE,8BAAsB;IAChD,oCAAoC,EAAE,8BAAsB;IAC5D,wBAAwB,EAAE,8BAAsB;IAChD,oCAAoC,EAAE,8BAAsB;CAC5B,CAAC,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
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-Cb3x_pJ-.js";import{Y as O,a as z,ag as de,ah as ue,ai as xe,aj as me,ak as he,L as T,I as V,x as D,aC as Se,d as b,B as P,C as M,b as R,e as Ge,f as Me,g as Re,n as Oe,j as I,k as q,_ as Q}from"./index-fEZshZPo.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-BE0w14Bi.js";import{t as k}from"./notifications-B2HqRBj7.js";import{b0 as W,b1 as E,b2 as pe,aG as ge,_ as fe,b3 as Ee,b4 as Ue,m as Y,as as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-KVCk4_U8.js";import{C as re}from"./checkbox-By2DQCzK.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(a){return Array.from(a).sort((r,t)=>r.localeCompare(t))}function We(a){const r=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const h=n.context_group||"default",m=r.get(h)??{group:h,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),r.set(h,m)}const t=Array.from(r.values()).sort((n,h)=>n.group.localeCompare(h.group)),u=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const h=n.context_group||"default",m=r.get(h),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=u.filter(n=>n.context_mode==="shared").length,i=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,c=u.filter(n=>n.context_inferred).length,p=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:u,sharedCount:s,sharedStandardCount:Math.max(s-i,0),deeperSharedCount:i,isolatedCount:u.length-s,legacyContextCount:c,legacyContinuityCount:p,sharedAloneCount:u.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:u.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:u.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:()=>O.accounts.list(),select:a=>{const r=a.accounts.filter(i=>i.type!=="cliproxy"),t=We(r),u=a.accounts.length-r.length,s=t.accounts.some(i=>i.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:u,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=$();return F({mutationFn:r=>O.accounts.setDefault(r),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(`Default account set to "${t}"`)},onError:r=>{k.error(r.message)}})}function et(){const a=$();return F({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success("Default account reset to CCS")},onError:r=>{k.error(r.message)}})}function tt(){const a=$();return F({mutationFn:r=>O.accounts.delete(r),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(`Account "${t}" deleted`)},onError:r=>{k.error(r.message)}})}function be(){const a=$();return F({mutationFn:({name:r,context_mode:t,context_group:u,continuity_mode:s})=>O.accounts.updateContext(r,{context_mode:t,context_group:u,continuity_mode:s}),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]});const u=t.context_mode==="shared"?t.continuity_mode==="deeper"?`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";k.success(`Updated "${t.name}" context to ${u}`)},onError:r=>{k.error(r.message)}})}function st(){const a=$();return F({mutationFn:async r=>{const t=r.filter(i=>i.context_inferred||i.continuity_inferred),s=(await Promise.allSettled(t.map(i=>{const c=i.context_mode==="shared";return O.accounts.updateContext(i.name,{context_mode:c?"shared":"isolated",context_group:c?i.context_group||"default":void 0,continuity_mode:c?i.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(i=>i.status==="rejected").length;return{updatedCount:t.length-s,failedCount:s}},onSuccess:({updatedCount:r,failedCount:t})=>{if(a.invalidateQueries({queryKey:["accounts"]}),t>0&&r>0){k.error(`Confirmed ${r} legacy account${r>1?"s":""}, but ${t} update${t>1?"s":""} failed. Refreshed account state.`);return}if(t>0){k.error(`Failed to confirm ${t} legacy account${t>1?"s":""}. Refreshed account state.`);return}if(r>0){k.success(`Confirmed explicit sync mode for ${r} legacy account${r>1?"s":""}`);return}k.info("No legacy accounts need confirmation")},onError:r=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(r.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:r,plainCcsLane:t,onClose:u}){const{t:s}=z(),i=be(),[c,p]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,h]=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]),l=C.useMemo(()=>r.find(g=>g.group===x),[r,x]),N=x.length>0&&x.length<=oe&&at.test(x),o=c==="isolated"||N,d=c==="shared"?Math.max((l?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=c==="shared"?Math.max((l?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,S=`ccs auth default ${a.name}`,_=`ccs auth backup ${a.name}`,w=(g,K,G,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=G.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+G.length)%G.length;H(G[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:"",A=()=>{o&&i.mutate({name:a.name,context_mode:c,context_group:c==="shared"?x:void 0,continuity_mode:c==="shared"?m:void 0},{onSuccess:()=>{u()}})},B=g=>{g||u()};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(T,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="isolated",tabIndex:c==="isolated"?0:-1,onClick:()=>p("isolated"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="shared",tabIndex:c==="shared"?0:-1,onClick:()=>p("shared"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(c==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>h(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{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(D,{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(D,{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:_}),e.jsx(D,{value:_,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:S}),e.jsx(D,{value:S,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${c==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[c==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[c==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group: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] ${c==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:u,disabled:i.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:A,disabled:!o||i.isPending,children:i.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:r,groupSummaries:t,plainCcsLane:u}){const{t:s}=z(),i=Je(),c=tt(),p=et(),n=be(),[h,m]=C.useState(null),[y,x]=C.useState(null),l=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:o})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:o.original.name}),o.original.name===r&&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:o})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:o.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:o})=>{const d=new Date(o.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:o})=>{if(!o.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(o.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:o})=>{if(o.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((o.original.context_mode||"isolated")==="shared"){const f=o.original.context_group||"default",v=o.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(P,{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:o.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:o.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return o.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(P,{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(P,{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:o})=>{const d=o.original.name===r,f=i.isPending||c.isPending||n.isPending,v=o.original.type==="cliproxy",j=o.original.context_inferred||o.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(o.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:o.original.name,context_mode:o.original.context_mode==="shared"?"shared":"isolated",context_group:o.original.context_mode==="shared"?o.original.context_group||"default":void 0,continuity_mode:o.original.context_mode==="shared"?o.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:()=>i.mutate(o.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(o.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:l,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(o=>e.jsx(te,{children:o.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)})},o.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(o=>e.jsx(te,{children:o.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},o.id))})]})}),r&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:u,onClose:()=>x(null)}),e.jsx(ze,{open:!!h,onOpenChange:o=>!o&&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:h??""})})]}),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:()=>{h&&(c.mutate(h),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:r})=>{const{t}=z();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Re,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(r)})]})]})};function ie({totalAccounts:a,primaryAccountName:r,isolatedCount:t,sharedStandardCount:u,deeperSharedCount:s,sharedAloneCount:i,sharedPeerAccountCount:c,deeperReadyAccountCount:p,sharedPeerGroups:n,deeperReadyGroups:h,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:l}=z(),N=x?x.kind==="native"?l("continuityOverview.lane.native"):x.kind==="account-default"?l("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?l("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?l("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",o=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":h.length===0?"shared-standard":t>0||i>0||p<c||h.length<n.length?"partial":"ready",d=h[0]||n[0]||"default",f=h.length>0&&(t>0||u>0||n.length>h.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"})}[o],S=!!r&&x?.account_name===r,_=a>0&&!!x&&(!r||!S),w=a>1&&o!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{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:l(`continuityReadiness.messages.${o}.title`,{group:d})}),e.jsx(P,{variant:o==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:l(`continuityReadiness.state.${o}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:l(`continuityReadiness.messages.${o}.description`,{group:d,count:i})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(P,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:l("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(P,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:l("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&h.length===0&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.partialBadge",{group:d})})]})]})}),(_||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[_&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{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(D,{value:"ccs auth backup default",size:"icon"})]}),r?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 ${r}`}),e.jsx(D,{value:`ccs auth default ${r}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:l("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:l("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:l("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:l("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:l("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:l("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:u})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:l("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const le=64;function rt({open:a,onClose:r}){const{t}=z(),[u,s]=C.useState(""),[i,c]=C.useState(!1),[p,n]=C.useState(""),[h,m]=C.useState(!1),[y,x]=C.useState(!1),l=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(u),N=p.trim().toLowerCase().replace(/\s+/g,"-"),o=N.length===0||N.length<=le&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=u&&l?[`ccs auth create ${u}`,i?N.length>0?`--context-group ${N}`:"--share-context":"",i&&h?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!l||i&&!o||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),c(!1),n(""),m(!1),x(!1),r()};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(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:u,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),u&&!l&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:i,onCheckedChange:j=>c(j===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),i&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:p,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:h,onCheckedChange:j=>m(j===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),p.trim().length>0&&!o&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:le})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!l||i&&!o,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!l||i&&!o,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}=z(),r=ve(),{data:t,isLoading:u}=Ye(),s=st(),[i,c]=C.useState(!1),p=t?.accounts||[],n=t?.cliproxyCount||0,h=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,l=t?.deeperSharedCount||0,N=t?.isolatedCount||0,o=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],S=t?.sharedGroups||[],_=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=p.filter(H=>H.context_inferred||H.continuity_inferred),A=L.length,B=A>0,g=()=>r("/cliproxy?provider=claude"),K=()=>r("/cliproxy?provider=claude&action=auth"),G=()=>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(Oe,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:h})}),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:G,disabled:s.isPending||A===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:A})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(M,{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(D,{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(D,{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(P,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(P,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{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:u?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{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:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:G,disabled:s.isPending||A===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:A})})]})]}),e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]}),e.jsx(rt,{open:i,onClose:()=>c(!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-CyRavMCY.js";import{Y as O,a as z,ag as de,ah as ue,ai as xe,aj as me,ak as he,L as T,I as V,x as D,aC as Se,d as b,B as P,C as M,b as R,e as Ge,f as Me,g as Re,n as Oe,j as I,k as q,_ as Q}from"./index-BDlLr4t5.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-Cq0uMwyf.js";import{t as k}from"./notifications-B2HqRBj7.js";import{b0 as W,b1 as E,b2 as pe,aG as ge,_ as fe,b3 as Ee,b4 as Ue,m as Y,as as Be,Q as Qe,a6 as U,T as J,x as Ze,$ as Xe,o as se,U as Ve,a9 as ae,Z as ne}from"./icons-KVCk4_U8.js";import{C as re}from"./checkbox-dGCgZTKA.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(a){return Array.from(a).sort((r,t)=>r.localeCompare(t))}function We(a){const r=new Map;for(const n of a){if(n.context_mode!=="shared")continue;const h=n.context_group||"default",m=r.get(h)??{group:h,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),r.set(h,m)}const t=Array.from(r.values()).sort((n,h)=>n.group.localeCompare(h.group)),u=a.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const h=n.context_group||"default",m=r.get(h),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=u.filter(n=>n.context_mode==="shared").length,i=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,c=u.filter(n=>n.context_inferred).length,p=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:u,sharedCount:s,sharedStandardCount:Math.max(s-i,0),deeperSharedCount:i,isolatedCount:u.length-s,legacyContextCount:c,legacyContinuityCount:p,sharedAloneCount:u.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:u.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:u.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:()=>O.accounts.list(),select:a=>{const r=a.accounts.filter(i=>i.type!=="cliproxy"),t=We(r),u=a.accounts.length-r.length,s=t.accounts.some(i=>i.name===a.default)?a.default:null;return{accounts:t.accounts,default:s,cliproxyCount:u,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=$();return F({mutationFn:r=>O.accounts.setDefault(r),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(`Default account set to "${t}"`)},onError:r=>{k.error(r.message)}})}function et(){const a=$();return F({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{a.invalidateQueries({queryKey:["accounts"]}),k.success("Default account reset to CCS")},onError:r=>{k.error(r.message)}})}function tt(){const a=$();return F({mutationFn:r=>O.accounts.delete(r),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]}),k.success(`Account "${t}" deleted`)},onError:r=>{k.error(r.message)}})}function be(){const a=$();return F({mutationFn:({name:r,context_mode:t,context_group:u,continuity_mode:s})=>O.accounts.updateContext(r,{context_mode:t,context_group:u,continuity_mode:s}),onSuccess:(r,t)=>{a.invalidateQueries({queryKey:["accounts"]});const u=t.context_mode==="shared"?t.continuity_mode==="deeper"?`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";k.success(`Updated "${t.name}" context to ${u}`)},onError:r=>{k.error(r.message)}})}function st(){const a=$();return F({mutationFn:async r=>{const t=r.filter(i=>i.context_inferred||i.continuity_inferred),s=(await Promise.allSettled(t.map(i=>{const c=i.context_mode==="shared";return O.accounts.updateContext(i.name,{context_mode:c?"shared":"isolated",context_group:c?i.context_group||"default":void 0,continuity_mode:c?i.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(i=>i.status==="rejected").length;return{updatedCount:t.length-s,failedCount:s}},onSuccess:({updatedCount:r,failedCount:t})=>{if(a.invalidateQueries({queryKey:["accounts"]}),t>0&&r>0){k.error(`Confirmed ${r} legacy account${r>1?"s":""}, but ${t} update${t>1?"s":""} failed. Refreshed account state.`);return}if(t>0){k.error(`Failed to confirm ${t} legacy account${t>1?"s":""}. Refreshed account state.`);return}if(r>0){k.success(`Confirmed explicit sync mode for ${r} legacy account${r>1?"s":""}`);return}k.info("No legacy accounts need confirmation")},onError:r=>{a.invalidateQueries({queryKey:["accounts"]}),k.error(r.message)}})}const oe=64,at=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:a,groupSummaries:r,plainCcsLane:t,onClose:u}){const{t:s}=z(),i=be(),[c,p]=C.useState(a.context_mode==="shared"?"shared":"isolated"),[n,h]=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]),l=C.useMemo(()=>r.find(g=>g.group===x),[r,x]),N=x.length>0&&x.length<=oe&&at.test(x),o=c==="isolated"||N,d=c==="shared"?Math.max((l?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===x?1:0),0):0,f=c==="shared"?Math.max((l?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===x?1:0),0):0,v=t?.account_name===a.name,j=!!t&&!v,S=`ccs auth default ${a.name}`,_=`ccs auth backup ${a.name}`,w=(g,K,G,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=G.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+G.length)%G.length;H(G[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:"",A=()=>{o&&i.mutate({name:a.name,context_mode:c,context_group:c==="shared"?x:void 0,continuity_mode:c==="shared"?m:void 0},{onSuccess:()=>{u()}})},B=g=>{g||u()};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(T,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="isolated",tabIndex:c==="isolated"?0:-1,onClick:()=>p("isolated"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="shared",tabIndex:c==="shared"?0:-1,onClick:()=>p("shared"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:s("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:s(c==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(V,{id:"context-group",value:n,onChange:g=>h(g.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{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(D,{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(D,{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:_}),e.jsx(D,{value:_,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:S}),e.jsx(D,{value:S,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${c==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[c==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[c==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:s("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:s("editAccountContext.sameGroupRule",{group: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] ${c==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:u,disabled:i.isPending,children:s("editAccountContext.cancel")}),e.jsx(b,{onClick:A,disabled:!o||i.isPending,children:i.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function ce({data:a,defaultAccount:r,groupSummaries:t,plainCcsLane:u}){const{t:s}=z(),i=Je(),c=tt(),p=et(),n=be(),[h,m]=C.useState(null),[y,x]=C.useState(null),l=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:o})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:o.original.name}),o.original.name===r&&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:o})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:o.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:o})=>{const d=new Date(o.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:o})=>{if(!o.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(o.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:o})=>{if(o.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((o.original.context_mode||"isolated")==="shared"){const f=o.original.context_group||"default",v=o.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(P,{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:o.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:o.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return o.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(P,{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(P,{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:o})=>{const d=o.original.name===r,f=i.isPending||c.isPending||n.isPending,v=o.original.type==="cliproxy",j=o.original.context_inferred||o.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(o.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:o.original.name,context_mode:o.original.context_mode==="shared"?"shared":"isolated",context_group:o.original.context_mode==="shared"?o.original.context_group||"default":void 0,continuity_mode:o.original.context_mode==="shared"?o.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:()=>i.mutate(o.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(o.original.name),title:s(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:a,columns:l,getCoreRowModel:we()});return a.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:s("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(o=>e.jsx(te,{children:o.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)})},o.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(o=>e.jsx(te,{children:o.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},o.id))})]})}),r&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:u,onClose:()=>x(null)}),e.jsx(ze,{open:!!h,onOpenChange:o=>!o&&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:h??""})})]}),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:()=>{h&&(c.mutate(h),m(null))},children:s("accountsTable.delete")})]})]})})]})}const X=({titleKey:a,descKey:r})=>{const{t}=z();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(a),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Re,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(a)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(r)})]})]})};function ie({totalAccounts:a,primaryAccountName:r,isolatedCount:t,sharedStandardCount:u,deeperSharedCount:s,sharedAloneCount:i,sharedPeerAccountCount:c,deeperReadyAccountCount:p,sharedPeerGroups:n,deeperReadyGroups:h,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:l}=z(),N=x?x.kind==="native"?l("continuityOverview.lane.native"):x.kind==="account-default"?l("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?l("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?l("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",o=a<2?"single":n.length===0?t===a?"isolated":"shared-alone":h.length===0?"shared-standard":t>0||i>0||p<c||h.length<n.length?"partial":"ready",d=h[0]||n[0]||"default",f=h.length>0&&(t>0||u>0||n.length>h.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"})}[o],S=!!r&&x?.account_name===r,_=a>0&&!!x&&(!r||!S),w=a>1&&o!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{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:l(`continuityReadiness.messages.${o}.title`,{group:d})}),e.jsx(P,{variant:o==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:l(`continuityReadiness.state.${o}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:l(`continuityReadiness.messages.${o}.description`,{group:d,count:i})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(P,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:l("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(P,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:l("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&h.length===0&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.partialBadge",{group:d})})]})]})}),(_||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[_&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{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(D,{value:"ccs auth backup default",size:"icon"})]}),r?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 ${r}`}),e.jsx(D,{value:`ccs auth default ${r}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:l("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:l("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:l("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:l("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:l("historySyncLearningMap.isolated")}),e.jsx(X,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:l("historySyncLearningMap.shared")}),e.jsx(X,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:u})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:l("historySyncLearningMap.deeper")}),e.jsx(X,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:s})]})]})]})}const le=64;function rt({open:a,onClose:r}){const{t}=z(),[u,s]=C.useState(""),[i,c]=C.useState(!1),[p,n]=C.useState(""),[h,m]=C.useState(!1),[y,x]=C.useState(!1),l=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(u),N=p.trim().toLowerCase().replace(/\s+/g,"-"),o=N.length===0||N.length<=le&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=u&&l?[`ccs auth create ${u}`,i?N.length>0?`--context-group ${N}`:"--share-context":"",i&&h?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!l||i&&!o||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{s(""),c(!1),n(""),m(!1),x(!1),r()};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(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(V,{id:"profile-name",value:u,onChange:j=>s(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),u&&!l&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:i,onCheckedChange:j=>c(j===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),i&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(V,{id:"context-group",value:p,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:h,onCheckedChange:j=>m(j===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),p.trim().length>0&&!o&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:le})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Xe,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!l||i&&!o,children:y?e.jsx(Y,{className:"w-4 h-4 text-green-500"}):e.jsx(se,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!l||i&&!o,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}=z(),r=ve(),{data:t,isLoading:u}=Ye(),s=st(),[i,c]=C.useState(!1),p=t?.accounts||[],n=t?.cliproxyCount||0,h=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,l=t?.deeperSharedCount||0,N=t?.isolatedCount||0,o=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],S=t?.sharedGroups||[],_=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=p.filter(H=>H.context_inferred||H.continuity_inferred),A=L.length,B=A>0,g=()=>r("/cliproxy?provider=claude"),K=()=>r("/cliproxy?provider=claude&action=auth"),G=()=>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(Oe,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.migrationFollowup")}),e.jsxs("div",{className:"rounded-md border border-amber-500/50 bg-amber-500/10 p-3 space-y-3",children:[e.jsxs("div",{className:"flex items-start gap-2",children:[e.jsx(J,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:h})}),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:G,disabled:s.isPending||A===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:A})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(M,{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(D,{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(D,{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(P,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(P,{variant:"secondary",children:a("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:a("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[a("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),a("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:a("accountsTable.sync")}),a("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{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:u?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{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:()=>c(!0),children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[a("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:G,disabled:s.isPending||A===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:A})})]})]}),e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]}),e.jsx(rt,{open:i,onClose:()=>c(!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,bK 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,bK as l}from"./index-BDlLr4t5.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};
|