@kaitranntt/ccs 7.79.1-dev.1 → 7.79.1-dev.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (45) hide show
  1. package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts +8 -0
  2. package/dist/cliproxy/ai-providers/model-id-normalizer.d.ts.map +1 -1
  3. package/dist/cliproxy/ai-providers/model-id-normalizer.js +18 -1
  4. package/dist/cliproxy/ai-providers/model-id-normalizer.js.map +1 -1
  5. package/dist/targets/codex-cliproxy-provider-config.d.ts.map +1 -1
  6. package/dist/targets/codex-cliproxy-provider-config.js +41 -13
  7. package/dist/targets/codex-cliproxy-provider-config.js.map +1 -1
  8. package/dist/ui/assets/{accounts-CQ7-Zx3_.js → accounts-C-sOjvWS.js} +1 -1
  9. package/dist/ui/assets/{alert-dialog-834N3Y7a.js → alert-dialog-BrOo6Lh3.js} +1 -1
  10. package/dist/ui/assets/{api-BJc1e2ju.js → api-CXdC3ABc.js} +1 -1
  11. package/dist/ui/assets/{auth-section-FHhzv-t_.js → auth-section-XJ5PohAT.js} +1 -1
  12. package/dist/ui/assets/{backups-section-XgV36q98.js → backups-section-DjMi9NN5.js} +1 -1
  13. package/dist/ui/assets/{channels-BiUWmX53.js → channels-dD6o7KFj.js} +1 -1
  14. package/dist/ui/assets/{checkbox-Q5jqcuNs.js → checkbox-CVS69doq.js} +1 -1
  15. package/dist/ui/assets/{claude-extension-Dg6ZOc-X.js → claude-extension-D47wkgfq.js} +1 -1
  16. package/dist/ui/assets/{cliproxy-DUGEhRI_.js → cliproxy-CXgzAe6X.js} +1 -1
  17. package/dist/ui/assets/{cliproxy-ai-providers-DH1LvC9H.js → cliproxy-ai-providers-POOrpQVc.js} +1 -1
  18. package/dist/ui/assets/{cliproxy-control-panel-DQcF0grk.js → cliproxy-control-panel-BWa_KiNM.js} +1 -1
  19. package/dist/ui/assets/{codex-B4aTo2gn.js → codex-CYyPdHS4.js} +1 -1
  20. package/dist/ui/assets/{confirm-dialog-ZIkkz4a-.js → confirm-dialog-BuxHs897.js} +1 -1
  21. package/dist/ui/assets/{copilot-BxTvmyiq.js → copilot-BQ4Cltbo.js} +1 -1
  22. package/dist/ui/assets/{cursor-DFNXCb2C.js → cursor-BVUNUVux.js} +1 -1
  23. package/dist/ui/assets/{droid-BtmVuSvi.js → droid-Bw34FF6c.js} +1 -1
  24. package/dist/ui/assets/{globalenv-section-ZUDnNjxP.js → globalenv-section-B4UDGHiP.js} +1 -1
  25. package/dist/ui/assets/{health-BQ5SLS-w.js → health-30TwUdp_.js} +1 -1
  26. package/dist/ui/assets/{index-DKO-Gvdv.js → index-BUBCzEHD.js} +1 -1
  27. package/dist/ui/assets/{index-C6Qs2iuI.js → index-BjQ5PWH7.js} +1 -1
  28. package/dist/ui/assets/{index-DG9lONG_.js → index-BxIFAuoV.js} +1 -1
  29. package/dist/ui/assets/{index-2_GLcEv2.js → index-ByGCSVsI.js} +1 -1
  30. package/dist/ui/assets/index-C6j8gpEb.js +56 -0
  31. package/dist/ui/assets/{index-YRmKZmzf.js → index-DtiygQmg.js} +1 -1
  32. package/dist/ui/assets/{index-BW69dNHf.js → index-s94_IKNx.js} +1 -1
  33. package/dist/ui/assets/{logs-CiJ1hg6a.js → logs-CDD_WQvt.js} +1 -1
  34. package/dist/ui/assets/{masked-input-CxbGLkmv.js → masked-input-DpM1vKP_.js} +1 -1
  35. package/dist/ui/assets/{proxy-status-widget-BWr7WQY-.js → proxy-status-widget-7iMiOpQe.js} +1 -1
  36. package/dist/ui/assets/{raw-json-settings-editor-panel-BRT6eyp6.js → raw-json-settings-editor-panel-D-zQkcvr.js} +1 -1
  37. package/dist/ui/assets/{searchable-select-zyPEV9KP.js → searchable-select-B8Kp0x8p.js} +1 -1
  38. package/dist/ui/assets/{separator-BDmUKYTf.js → separator-DlXQBF83.js} +1 -1
  39. package/dist/ui/assets/{shared-CDiPdrLt.js → shared-D_h3QKy6.js} +1 -1
  40. package/dist/ui/assets/{table-DB4ZK3nd.js → table-Dyt0FuBK.js} +1 -1
  41. package/dist/ui/assets/{updates-IMCUh1DI.js → updates-DfIV0IC0.js} +1 -1
  42. package/dist/ui/assets/{use-accounts-CyI5Ozs6.js → use-accounts-Dy2ogHT-.js} +1 -1
  43. package/dist/ui/index.html +1 -1
  44. package/package.json +1 -1
  45. package/dist/ui/assets/index-BRwWpHe-.js +0 -56
@@ -10,6 +10,14 @@ import type { CLIProxyProvider } from '../types';
10
10
  /** Env vars that carry model identifiers. */
11
11
  export declare const MODEL_ENV_VAR_KEYS: readonly ["ANTHROPIC_MODEL", "ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL"];
12
12
  type ProviderLike = CLIProxyProvider | string | null | undefined;
13
+ export type CodexModelTuningEffort = 'medium' | 'high' | 'xhigh';
14
+ export type CodexModelServiceTier = 'fast';
15
+ export interface CodexModelTuningAlias {
16
+ baseModel: string;
17
+ effort: CodexModelTuningEffort | null;
18
+ serviceTier: CodexModelServiceTier | null;
19
+ }
20
+ export declare function parseCodexModelTuningAlias(model: string): CodexModelTuningAlias | null;
13
21
  /**
14
22
  * Extract provider segment from `/api/provider/{provider}` request paths.
15
23
  *
@@ -1 +1 @@
1
- {"version":3,"file":"model-id-normalizer.d.ts","sourceRoot":"","sources":["../../../src/cliproxy/ai-providers/model-id-normalizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAGjD,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,iIAA2B,CAAC;AAE3D,KAAK,YAAY,GAAG,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AAkFjE;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAI3E;AAED,uEAAuE;AAC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AM,CAAC,UAAU,CAenB"}
@@ -6,7 +6,7 @@
6
6
  * model version formats (e.g., 4.6 vs 4-6).
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.normalizeModelEnvVarsForProvider = exports.normalizeModelIdForRouting = exports.canonicalizeModelIdForProvider = exports.normalizeModelIdForProvider = exports.getDeniedModelIdReasonForProvider = exports.isDeniedAntigravityModelId = exports.migrateDeniedAntigravityModelAliases = exports.normalizeDeprecatedAntigravityModelAliases = exports.normalizeClaudeDottedThinkingMajorMinor = exports.normalizeClaudeDottedMajorMinor = exports.normalizeIFlowLegacyModelAliases = exports.normalizeCodexLegacyModelAliases = exports.stripCodexEffortSuffix = exports.isIFlowProvider = exports.isCodexProvider = exports.isAntigravityProvider = exports.extractProviderFromPathname = exports.MODEL_ENV_VAR_KEYS = void 0;
9
+ exports.normalizeModelEnvVarsForProvider = exports.normalizeModelIdForRouting = exports.canonicalizeModelIdForProvider = exports.normalizeModelIdForProvider = exports.getDeniedModelIdReasonForProvider = exports.isDeniedAntigravityModelId = exports.migrateDeniedAntigravityModelAliases = exports.normalizeDeprecatedAntigravityModelAliases = exports.normalizeClaudeDottedThinkingMajorMinor = exports.normalizeClaudeDottedMajorMinor = exports.normalizeIFlowLegacyModelAliases = exports.normalizeCodexLegacyModelAliases = exports.stripCodexEffortSuffix = exports.isIFlowProvider = exports.isCodexProvider = exports.isAntigravityProvider = exports.extractProviderFromPathname = exports.parseCodexModelTuningAlias = exports.MODEL_ENV_VAR_KEYS = void 0;
10
10
  const extended_context_utils_1 = require("../../shared/extended-context-utils");
11
11
  /** Env vars that carry model identifiers. */
12
12
  exports.MODEL_ENV_VAR_KEYS = extended_context_utils_1.ANTHROPIC_MODEL_ENV_KEYS;
@@ -79,6 +79,23 @@ function splitCodexTuningSuffix(model) {
79
79
  suffix: suffix ? `-${suffix}` : '',
80
80
  };
81
81
  }
82
+ function parseCodexModelTuningAlias(model) {
83
+ const trimmed = trimModelId(model);
84
+ const { baseModel, suffix } = splitBaseModelAndSuffix(trimmed);
85
+ if (suffix)
86
+ return null;
87
+ const parsed = splitCodexTuningSuffix(baseModel);
88
+ if (!parsed.suffix)
89
+ return null;
90
+ const tokens = parsed.suffix.slice(1).split('-');
91
+ const effort = tokens.find((token) => token !== 'fast');
92
+ return {
93
+ baseModel: parsed.baseModel.trim(),
94
+ effort: effort ?? null,
95
+ serviceTier: tokens.includes('fast') ? 'fast' : null,
96
+ };
97
+ }
98
+ exports.parseCodexModelTuningAlias = parseCodexModelTuningAlias;
82
99
  /**
83
100
  * Extract provider segment from `/api/provider/{provider}` request paths.
84
101
  *
@@ -1 +1 @@
1
- {"version":3,"file":"model-id-normalizer.js","sourceRoot":"","sources":["../../../src/cliproxy/ai-providers/model-id-normalizer.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,gFAA+E;AAE/E,6CAA6C;AAChC,QAAA,kBAAkB,GAAG,iDAAwB,CAAC;AAI3D,MAAM,2BAA2B,GAAG,+DAA+D,CAAC;AACpG,MAAM,4BAA4B,GAChC,wEAAwE,CAAC;AAC3E,MAAM,+CAA+C,GACnD,yDAAyD,CAAC;AAC5D,MAAM,qCAAqC,GAAG,mBAAmB,CAAC;AAClE,MAAM,8BAA8B,GAClC,qEAAqE,CAAC;AACxE,MAAM,gCAAgC,GACpC,2DAA2D,CAAC;AAC9D,MAAM,kCAAkC,GACtC,6DAA6D,CAAC;AAChE,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AACvE,MAAM,+BAA+B,GAAG,6BAA6B,CAAC;AACtE,MAAM,0BAA0B,GAAqC,MAAM,CAAC,MAAM,CAAC;IACjF,aAAa,EAAE,SAAS;IACxB,kBAAkB,EAAE,cAAc;IAClC,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,cAAc;IACpC,mBAAmB,EAAE,SAAS;IAC9B,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,cAAc;CACrC,CAAC,C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AK;YAAE,SAAS;QAExC,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC;IACjC,CAAC;IAED,OAAO,OAAO,IAAI,OAAO,CAAC;AAC5B,CAAC;AAnBD,4EAmBC"}
1
+ {"version":3,"file":"model-id-normalizer.js","sourceRoot":"","sources":["../../../src/cliproxy/ai-providers/model-id-normalizer.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAGH,gFAA+E;AAE/E,6CAA6C;AAChC,QAAA,kBAAkB,GAAG,iDAAwB,CAAC;AAI3D,MAAM,2BAA2B,GAAG,+DAA+D,CAAC;AACpG,MAAM,4BAA4B,GAChC,wEAAwE,CAAC;AAC3E,MAAM,+CAA+C,GACnD,yDAAyD,CAAC;AAC5D,MAAM,qCAAqC,GAAG,mBAAmB,CAAC;AAClE,MAAM,8BAA8B,GAClC,qEAAqE,CAAC;AACxE,MAAM,gCAAgC,GACpC,2DAA2D,CAAC;AAC9D,MAAM,kCAAkC,GACtC,6DAA6D,CAAC;AAChE,MAAM,mCAAmC,GAAG,0BAA0B,CAAC;AACvE,MAAM,+BAA+B,GAAG,6BAA6B,CAAC;AACtE,MAAM,0BAA0B,GAAqC,MAAM,CAAC,MAAM,CAAC;IACjF,aAAa,EAAE,SAAS;IACxB,kBAAkB,EAAE,cAAc;IAClC,YAAY,EAAE,cAAc;IAC5B,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,cAAc;IACpC,mBAAmB,EAAE,SAAS;IAC9B,eAAe,EAAE,SAAS;IAC1B,oBAAoB,EAAE,cAAc;CACrC,CAAC,CAAC;AACH,MAAM,0BAA0B,GAAqC,MAAM,CAAC,MAAM,CAAC;IACjF,eAAe,EAAE,kBAAkB;IACnC,WAAW,EAAE,SAAS;IACtB,oBAAoB,EAAE,eAAe;IACrC,SAAS,EAAE,SAAS;IACpB,cAAc,EAAE,kBAAkB;CACnC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AE,QAAQ,CAAC,CAAC;IAC7D,CAAC;IACD,MAAM,kBAAkB,GAAG,uCAAuC,CAAC,YAAY,CAAC,CAAC;IACjF,OAAO,0CAA0C,CAAC,kBAAkB,CAAC,CAAC;AACxE,CAAC;AAXD,gEAWC;AAED;;;;;;;;;;GAUG;AACH,SAAgB,gCAAgC,CAC9C,OAA0B,EAC1B,QAAsB,EACtB,OAA0B,0BAAkB;IAE5C,IAAI,OAAO,GAA6B,IAAI,CAAC;IAE7C,KAAK,MAAM,GAAG,IAAI,IAAI,EAAE,CAAC;QACvB,MAAM,KAAK,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;QAC3B,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,CAAC,IAAI,EAAE,CAAC,MAAM,KAAK,CAAC;YAAE,SAAS;QAErE,MAAM,eAAe,GAAG,2BAA2B,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;QACrE,IAAI,eAAe,KAAK,KAAK;YAAE,SAAS;QAExC,IAAI,CAAC,OAAO;YAAE,OAAO,GAAG,EAAE,GAAG,OAAO,EAAE,CAAC;QACvC,OAAO,CAAC,GAAG,CAAC,GAAG,eAAe,CAAC;IACjC,CAAC;IAED,OAAO,OAAO,IAAI,OAAO,CAAC;AAC5B,CAAC;AAnBD,4EAmBC"}
@@ -1 +1 @@
1
- {"version":3,"file":"codex-cliproxy-provider-config.d.ts","sourceRoot":"","sources":["../../src/targets/codex-cliproxy-provider-config.ts"],"names":[],"mappings":";;AASA,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AACrE,eAAO,MAAM,0BAA0B,aAAa,CAAC;AACrD,eAAO,MAAM,+BAA+B,qBAAqB,CAAC;AAClE,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAE7D,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAgBD,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAErF;AA0ED,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,iCAAiC,CAAC,CAuD5C"}
1
+ {"version":3,"file":"codex-cliproxy-provider-config.d.ts","sourceRoot":"","sources":["../../src/targets/codex-cliproxy-provider-config.ts"],"names":[],"mappings":";;AAWA,eAAO,MAAM,2BAA2B,4BAA4B,CAAC;AACrE,eAAO,MAAM,0BAA0B,aAAa,CAAC;AACrD,eAAO,MAAM,+BAA+B,qBAAqB,CAAC;AAClE,eAAO,MAAM,4BAA4B,mBAAmB,CAAC;AAG7D,MAAM,WAAW,iCAAiC;IAChD,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAChB;AAgBD,wBAAgB,iCAAiC,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEtE;AAED,wBAAgB,uBAAuB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,OAAO,CAErF;AAoFD,wBAAsB,iCAAiC,CACrD,IAAI,EAAE,MAAM,EACZ,GAAG,GAAE,MAAM,CAAC,UAAwB,GACnC,OAAO,CAAC,iCAAiC,CAAC,CAsE5C"}
@@ -28,10 +28,13 @@ const os = __importStar(require("os"));
28
28
  const path = __importStar(require("path"));
29
29
  const helpers_1 = require("../utils/helpers");
30
30
  const compatible_cli_toml_file_service_1 = require("../web-server/services/compatible-cli-toml-file-service");
31
+ const model_catalog_1 = require("../cliproxy/model-catalog");
32
+ const model_id_normalizer_1 = require("../cliproxy/ai-providers/model-id-normalizer");
31
33
  exports.CCSXP_CLIPROXY_SHORTCUT_ENV = 'CCSXP_CLIPROXY_SHORTCUT';
32
34
  exports.CODEX_CLIPROXY_PROVIDER_ID = 'cliproxy';
33
35
  exports.CODEX_CLIPROXY_PROVIDER_ENV_KEY = 'CLIPROXY_API_KEY';
34
36
  exports.CODEX_CLIPROXY_PROVIDER_NAME = 'CLIProxy Codex';
37
+ const CODEX_FAST_SERVICE_TIER = 'priority';
35
38
  function resolveCodexConfigPath(env = process.env) {
36
39
  const baseDir = path.resolve(env.CODEX_HOME ? (0, helpers_1.expandPath)(env.CODEX_HOME) : path.join(os.homedir(), '.codex'));
37
40
  const displayBase = env.CODEX_HOME ? '$CODEX_HOME' : '~/.codex';
@@ -95,18 +98,31 @@ function buildProviderConfig(baseUrl, envKey) {
95
98
  supports_websockets: false,
96
99
  };
97
100
  }
98
- function buildProviderBlock(baseUrl) {
99
- return (0, compatible_cli_toml_file_service_1.stringifyTomlObject)({
101
+ function appendProviderBlock(rawText, baseUrl) {
102
+ const prefix = rawText.trimEnd();
103
+ const providerBlock = (0, compatible_cli_toml_file_service_1.stringifyTomlObject)({
100
104
  model_providers: {
101
105
  [exports.CODEX_CLIPROXY_PROVIDER_ID]: buildProviderConfig(baseUrl, exports.CODEX_CLIPROXY_PROVIDER_ENV_KEY),
102
106
  },
103
- });
104
- }
105
- function appendProviderBlock(rawText, baseUrl) {
106
- const prefix = rawText.trimEnd();
107
- const providerBlock = buildProviderBlock(baseUrl).trimEnd();
107
+ }).trimEnd();
108
108
  return prefix ? `${prefix}\n\n${providerBlock}\n` : `${providerBlock}\n`;
109
109
  }
110
+ function normalizeTopLevelCodexModelAlias(config) {
111
+ const model = config.model;
112
+ if (typeof model !== 'string')
113
+ return false;
114
+ const parsed = (0, model_id_normalizer_1.parseCodexModelTuningAlias)(model);
115
+ if (!parsed || (!parsed.effort && !parsed.serviceTier))
116
+ return false;
117
+ if (!parsed.baseModel || (0, model_catalog_1.getModelMaxLevel)('codex', parsed.baseModel) === undefined)
118
+ return false;
119
+ config.model = parsed.baseModel;
120
+ if (parsed.effort)
121
+ config.model_reasoning_effort = parsed.effort;
122
+ if (parsed.serviceTier)
123
+ config.service_tier = CODEX_FAST_SERVICE_TIER;
124
+ return true;
125
+ }
110
126
  async function ensureCodexCliproxyProviderConfig(port, env = process.env) {
111
127
  const { configPath, displayPath } = resolveCodexConfigPath(env);
112
128
  const fileProbe = await (0, compatible_cli_toml_file_service_1.probeTomlObjectFile)(configPath, 'Codex user config', displayPath);
@@ -120,13 +136,22 @@ async function ensureCodexCliproxyProviderConfig(port, env = process.env) {
120
136
  const modelProvidersValue = config.model_providers;
121
137
  const providers = asObject(modelProvidersValue);
122
138
  const expectedBaseUrl = buildCodexCliproxyProviderBaseUrl(port);
139
+ const normalizedModelAlias = normalizeTopLevelCodexModelAlias(config);
123
140
  if (modelProvidersValue !== undefined && !providers) {
124
141
  throw new Error(`Cannot repair ${displayPath}: [model_providers] must be a table.`);
125
142
  }
126
143
  if (!providers || !Object.prototype.hasOwnProperty.call(providers, exports.CODEX_CLIPROXY_PROVIDER_ID)) {
127
144
  await (0, compatible_cli_toml_file_service_1.writeTomlFileAtomic)({
128
145
  filePath: configPath,
129
- rawText: appendProviderBlock(fileProbe.rawText, expectedBaseUrl),
146
+ rawText: normalizedModelAlias
147
+ ? (0, compatible_cli_toml_file_service_1.stringifyTomlObject)({
148
+ ...config,
149
+ model_providers: {
150
+ ...(providers ?? {}),
151
+ [exports.CODEX_CLIPROXY_PROVIDER_ID]: buildProviderConfig(expectedBaseUrl, exports.CODEX_CLIPROXY_PROVIDER_ENV_KEY),
152
+ },
153
+ })
154
+ : appendProviderBlock(fileProbe.rawText, expectedBaseUrl),
130
155
  expectedMtime: fileProbe.diagnostics.mtimeMs ?? undefined,
131
156
  fileLabel: 'config.toml',
132
157
  });
@@ -137,13 +162,16 @@ async function ensureCodexCliproxyProviderConfig(port, env = process.env) {
137
162
  throw new Error(`Cannot repair ${displayPath}: [model_providers.${exports.CODEX_CLIPROXY_PROVIDER_ID}] must be a table.`);
138
163
  }
139
164
  const envKey = resolveProviderEnvKey(currentProvider);
140
- if (isProviderReady(currentProvider, expectedBaseUrl, envKey)) {
165
+ const providerReady = isProviderReady(currentProvider, expectedBaseUrl, envKey);
166
+ if (!providerReady) {
167
+ providers[exports.CODEX_CLIPROXY_PROVIDER_ID] = {
168
+ ...currentProvider,
169
+ ...buildProviderConfig(expectedBaseUrl, envKey),
170
+ };
171
+ }
172
+ if (providerReady && !normalizedModelAlias) {
141
173
  return { changed: false, configPath, displayPath, envKey };
142
174
  }
143
- providers[exports.CODEX_CLIPROXY_PROVIDER_ID] = {
144
- ...currentProvider,
145
- ...buildProviderConfig(expectedBaseUrl, envKey),
146
- };
147
175
  await (0, compatible_cli_toml_file_service_1.writeTomlFileAtomic)({
148
176
  filePath: configPath,
149
177
  rawText: (0, compatible_cli_toml_file_service_1.stringifyTomlObject)(config),
@@ -1 +1 @@
1
- {"version":3,"file":"codex-cliproxy-provider-config.js","sourceRoot":"","sources":["../../src/targets/codex-cliproxy-provider-config.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,uCAAyB;AACzB,2CAA6B;AAC7B,8CAA8C;AAC9C,8GAIiE;AAEpD,QAAA,2BAA2B,GAAG,yBAAyB,CAAC;AACxD,QAAA,0BAA0B,GAAG,UAAU,CAAC;AACxC,QAAA,+BAA+B,GAAG,kBAAkB,CAAC;AACrD,QAAA,4BAA4B,GAAG,gBAAgB,CAAC;AAS7D,SAAS,sBAAsB,CAAC,MAAyB,OAAO,CAAC,GAAG;IAIlE,MAAM,OAAO,GAAG,IAAI,CAAC,OAAO,CAC1B,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,IAAA,oBAAU,EAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,OAAO,EAAE,EAAE,QAAQ,CAAC,CAChF,CAAC;IACF,MAAM,WAAW,GAAG,GAAG,CAAC,UAAU,CAA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AE,MAAM,EAAE,CAAC;IAC7D,CAAC;IAED,MAAM,IAAA,sDAAmB,EAAC;QACxB,QAAQ,EAAE,UAAU;QACpB,OAAO,EAAE,IAAA,sDAAmB,EAAC,MAAM,CAAC;QACpC,aAAa,EAAE,SAAS,CAAC,WAAW,CAAC,OAAO,IAAI,SAAS;QACzD,SAAS,EAAE,aAAa;KACzB,CAAC,CAAC;IACH,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,WAAW,EAAE,MAAM,EAAE,CAAC;AAC5D,CAAC;AAzED,8EAyEC"}
@@ -1 +1 @@
1
- import{j as e}from"./radix-ui-nu4wz29m.js";import{r as k,e as Ae}from"./react-vendor-Bjx91N7w.js";import{e as Pe,f as se,g as De}from"./tanstack-bhJxV1h8.js";import{T as Te,a as Se,b as te,c as Re,d as _e,e as Oe}from"./table-DB4ZK3nd.js";import{a as R,ah as q,ai as W,aj as Q,ak as J,al as Y,L as S,I as E,x as P,aD as pe,d as p,r as Ge,s as Me,t as ze,v as Le,w as ae,bi as ne,bj as re,bk as ce,B as C,c as $e,C as O,j as M,k as z,_ as F,b as G,e as Ie,f as He,g as Fe,n as Be}from"./index-BRwWpHe-.js";import{A as Ue,a as Ke,b as Ee,c as Ze,d as Ve,e as Xe,f as qe,g as We}from"./alert-dialog-834N3Y7a.js";import{u as fe,a as Qe,b as Je,c as Ye,d as es,e as ss,f as ts}from"./use-accounts-CyI5Ozs6.js";import{b1 as Z,b2 as L,b3 as ee,aH as be,_ as je,b4 as Ne,ai as ye,w as as,b5 as ns,b6 as rs,m as V,at as cs,Q as os,b7 as ds,a7 as ls,$ as ve,a6 as B,T as X,x as is,o as oe,U as xs,a9 as de,Z as le}from"./icons-DzKUh8vG.js";import{C as ie}from"./checkbox-Q5jqcuNs.js";import"./notifications-B4_o8bcr.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./charts-eIPy2oG6.js";const xe=64,us=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function ms({account:a,groupSummaries:x,plainCcsLane:t,onClose:m}){const{t:s}=R(),u=fe(),[r,l]=k.useState(a.context_mode==="shared"?"shared":"isolated"),[g,b]=k.useState(a.context_group||"default"),[h,v]=k.useState(a.continuity_mode==="deeper"?"deeper":"standard"),d=k.useMemo(()=>g.trim().toLowerCase().replace(/\s+/g,"-"),[g]),c=k.useMemo(()=>x.find(f=>f.group===d),[x,d]),N=d.length>0&&d.length<=xe&&us.test(d),j=r==="isolated"||N,y=r==="shared"?Math.max((c?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===d?1:0),0):0,n=r==="shared"?Math.max((c?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===d?1:0),0):0,o=t?.account_name===a.name,i=!!t&&!o,w=`ccs auth default ${a.name}`,D=`ccs auth backup ${a.name}`,A=(f,I,_,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(f.key))return;f.preventDefault();const ke=_.indexOf(I),we=f.key==="ArrowLeft"||f.key==="ArrowUp"?-1:1,Ce=(ke+we+_.length)%_.length;H(_[Ce])},$=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:"",T=()=>{j&&u.mutate({name:a.name,context_mode:r,context_group:r==="shared"?d:void 0,continuity_mode:r==="shared"?h:void 0},{onSuccess:()=>{m()}})},U=f=>{f||m()};return e.jsx(q,{open:!0,onOpenChange:U,children:e.jsxs(W,{className:"sm:max-w-md",children:[e.jsxs(Q,{children:[e.jsx(J,{children:s("editAccountContext.title")}),e.jsx(Y,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":r==="isolated",tabIndex:r==="isolated"?0:-1,onClick:()=>l("isolated"),onKeyDown:f=>A(f,r,["isolated","shared"],l),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 ${r==="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(Z,{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":r==="shared",tabIndex:r==="shared"?0:-1,onClick:()=>l("shared"),onKeyDown:f=>A(f,r,["isolated","shared"],l),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 ${r==="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(L,{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(r==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),r==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(E,{id:"context-group",value:g,onChange:f=>b(f.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:xe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),r==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="standard",tabIndex:h==="standard"?0:-1,onClick:()=>v("standard"),onKeyDown:f=>A(f,h,["standard","deeper"],v),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 ${h==="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(L,{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":h==="deeper",tabIndex:h==="deeper"?0:-1,onClick:()=>v("deeper"),onKeyDown:f=>A(f,h,["standard","deeper"],v),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 ${h==="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(ee,{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(h==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),i&&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:$||"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(P,{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(P,{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:D}),e.jsx(P,{value:D,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:w}),e.jsx(P,{value:w,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${r==="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:[r==="isolated"?e.jsx(be,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(je,{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:[r==="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:d})})," ",y>0?s("editAccountContext.sameGroupPeerCount",{count:y}):s("editAccountContext.noSameGroupPeer")]}),h==="deeper"&&e.jsx("p",{children:n>0?s("editAccountContext.deeperReady",{count:n}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${r==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(pe,{children:[e.jsx(p,{variant:"outline",onClick:m,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(p,{onClick:T,disabled:!j||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function hs({account:a,onClose:x}){const{t}=R(),m=Qe(),[s,u]=k.useState(a.shared_resource_mode||"shared"),r=()=>{m.mutate({name:a.name,shared_resource_mode:s},{onSuccess:()=>{x()}})};return e.jsx(q,{open:!0,onOpenChange:x,children:e.jsxs(W,{className:"sm:max-w-[425px]",children:[e.jsxs(Q,{children:[e.jsx(J,{children:t("editAccountSharedResources.title")}),e.jsx(Y,{children:t("editAccountSharedResources.description",{name:a.name})})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"resource-mode",children:t("editAccountSharedResources.resourceMode")}),e.jsxs(Ge,{value:s,onValueChange:l=>u(l),children:[e.jsx(Me,{id:"resource-mode",className:"w-full",children:e.jsx(ze,{placeholder:t("editAccountSharedResources.selectResourceMode")})}),e.jsxs(Le,{children:[e.jsx(ae,{value:"shared",children:e.jsxs("div",{className:"flex flex-col items-start py-1",children:[e.jsx("span",{className:"font-medium text-sm",children:t("editAccountSharedResources.sharedOption")}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:t("editAccountSharedResources.sharedHint")})]})}),e.jsx(ae,{value:"profile-local",children:e.jsxs("div",{className:"flex flex-col items-start py-1",children:[e.jsx("span",{className:"font-medium text-sm",children:t("editAccountSharedResources.profileLocalOption")}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:t("editAccountSharedResources.profileLocalHint")})]})})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:t("editAccountSharedResources.implicationTitle")}),s==="shared"?e.jsxs(ne,{className:"border-emerald-500/20 bg-emerald-500/5",children:[e.jsx(Ne,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),e.jsx(re,{className:"text-xs font-semibold text-emerald-800 dark:text-emerald-300",children:t("editAccountSharedResources.sharedOption")}),e.jsx(ce,{className:"text-xs text-emerald-700/80 dark:text-emerald-400/80",children:t("editAccountSharedResources.sharedImplication")})]}):e.jsxs(ne,{className:"border-amber-500/20 bg-amber-500/5",children:[e.jsx(ye,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}),e.jsx(re,{className:"text-xs font-semibold text-amber-800 dark:text-amber-300",children:t("editAccountSharedResources.profileLocalOption")}),e.jsx(ce,{className:"text-xs text-amber-700/80 dark:text-amber-400/80",children:t("editAccountSharedResources.profileLocalImplication")})]})]}),a.shared_resource_inferred&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted/50 p-3",children:[e.jsx(as,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t("accountsTable.legacyReview")})]})]}),e.jsxs(pe,{children:[e.jsx(p,{variant:"outline",onClick:x,children:t("editAccountSharedResources.cancel")}),e.jsx(p,{onClick:r,disabled:m.isPending,children:m.isPending?t("editAccountSharedResources.saving"):t("editAccountSharedResources.save")})]})]})})}function ue({data:a,defaultAccount:x,groupSummaries:t,plainCcsLane:m}){const{t:s}=R(),u=Je(),r=Ye(),l=es(),g=fe(),[b,h]=k.useState(null),[v,d]=k.useState(null),[c,N]=k.useState(null),j=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:n})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:n.original.name}),n.original.name===x&&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:n})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:n.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:n})=>{const o=new Date(n.original.created);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:n})=>{if(!n.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const o=new Date(n.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:n})=>{if(n.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((n.original.context_mode||"isolated")==="shared"){const i=n.original.context_group||"default",w=n.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(C,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${w?"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(w?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:i})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:n.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:n.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return n.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(C,{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(C,{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:"resources",header:s("accountsTable.sharedResources"),size:150,cell:({row:n})=>{if(n.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const o=n.original.shared_resource_mode||"shared",i=n.original.shared_resource_inferred;return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(C,{variant:o==="shared"?"outline":"secondary",className:$e("font-mono text-[10px] uppercase px-1.5 py-0",o==="shared"?"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":"text-muted-foreground bg-muted/60 border-transparent shadow-none"),children:s(o==="shared"?"accountsTable.resourcesShared":"accountsTable.resourcesProfileLocal")}),i&&e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:n})=>{const o=n.original.name===x,i=u.isPending||r.isPending||g.isPending,w=n.original.type==="cliproxy",D=n.original.context_inferred||n.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!w&&e.jsxs(p,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:i,onClick:()=>d(n.original),title:s("accountsTable.syncTitle"),children:[e.jsx(ns,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!w&&e.jsxs(p,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:i,onClick:()=>N(n.original),title:s("accountsTable.resourcesTitle"),children:[e.jsx(Ne,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sharedResources")]}),!w&&D&&e.jsxs(p,{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:i,onClick:()=>g.mutate({name:n.original.name,context_mode:n.original.context_mode==="shared"?"shared":"isolated",context_group:n.original.context_mode==="shared"?n.original.context_group||"default":void 0,continuity_mode:n.original.context_mode==="shared"?n.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(rs,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(p,{variant:o?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:o||i,onClick:()=>u.mutate(n.original.name),children:[e.jsx(V,{className:`w-3 h-3 mr-1 ${o?"opacity-50":""}`}),s(o?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:o||i,onClick:()=>h(n.original.name),title:s(o?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(cs,{className:"w-4 h-4"})})]})}}],y=Pe({data:a,columns:j,getCoreRowModel:De()});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(Te,{children:[e.jsx(Se,{children:y.getHeaderGroups().map(n=>e.jsx(te,{children:n.headers.map(o=>{const i={name:"w-[180px]",type:"w-[80px]",created:"w-[120px]",last_used:"w-[120px]",context:"w-[150px]",resources:"w-[120px]",actions:"w-[320px]"}[o.id]||"w-auto";return e.jsx(Re,{className:i,children:o.isPlaceholder?null:se(o.column.columnDef.header,o.getContext())},o.id)})},n.id))}),e.jsx(_e,{children:y.getRowModel().rows.map(n=>e.jsx(te,{children:n.getVisibleCells().map(o=>e.jsx(Oe,{children:se(o.column.columnDef.cell,o.getContext())},o.id))},n.id))})]})}),x&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>l.mutate(),disabled:l.isPending,children:[e.jsx(os,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),v&&e.jsx(ms,{account:v,groupSummaries:t,plainCcsLane:m,onClose:()=>d(null)}),c&&e.jsx(hs,{account:c,onClose:()=>N(null)}),e.jsx(Ue,{open:!!b,onOpenChange:n=>!n&&h(null),children:e.jsxs(Ke,{children:[e.jsxs(Ee,{children:[e.jsx(Ze,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ve,{children:s("accountsTable.deleteDialogDesc",{name:b??""})})]}),e.jsxs(Xe,{children:[e.jsx(qe,{children:s("accountsTable.cancel")}),e.jsx(We,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{b&&(r.mutate(b),h(null))},children:s("accountsTable.delete")})]})]})})]})}function me({totalAccounts:a,isolatedCount:x,sharedPeerGroups:t,deeperReadyGroups:m}){const{t:s}=R(),u=m[0]||t[0]||"daily",r=a<2?"empty":m.length>0?"deeper":t.length>0?"shared":a>=2&&x===a?"isolated":a===0?"empty":"mixed",l=`ccs auth create work2 --share-context --context-group ${u} --deeper-continuity`;return e.jsxs(O,{className:"overflow-hidden",children:[e.jsx(M,{className:"pb-3",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(z,{className:"text-lg",children:s("accountRouteGuide.title")}),e.jsx(F,{children:s("accountRouteGuide.description")})]}),e.jsx(C,{variant:r==="deeper"?"default":"secondary",children:s(`accountRouteGuide.status.${r}`)})]})}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("section",{className:"rounded-md border bg-blue-50/50 p-3 text-sm dark:bg-blue-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ye,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),s("accountRouteGuide.cards.isolated.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.isolated.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-emerald-50/50 p-3 text-sm dark:bg-emerald-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ds,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),s("accountRouteGuide.cards.select.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.select.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-sky-50/50 p-3 text-sm dark:bg-sky-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ls,{className:"h-4 w-4 text-sky-600 dark:text-sky-400"}),s("accountRouteGuide.cards.settings.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.settings.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-indigo-50/50 p-3 text-sm dark:bg-indigo-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(L,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-400"}),s("accountRouteGuide.cards.sync.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.sync.desc")})]})]}),e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.isolated")]}),["ccs auth create work","ccs auth create personal","ccs work","ccs personal"].map(g=>e.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:g}),e.jsx(P,{value:g,size:"icon"})]},g))]}),e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.sync")]}),e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:l}),e.jsx(P,{value:l,size:"icon"})]}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.commands.syncDesc",{group:u})})]})]})]})]})}const K=({titleKey:a,descKey:x})=>{const{t}=R();return e.jsxs(Ie,{children:[e.jsx(He,{asChild:!0,children:e.jsx(p,{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(je,{className:"h-3 w-3"})})}),e.jsxs(Fe,{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(x)})]})]})};function he({totalAccounts:a,primaryAccountName:x,isolatedCount:t,sharedStandardCount:m,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:r,deeperReadyAccountCount:l,sharedPeerGroups:g,deeperReadyGroups:b,legacyTargetCount:h,cliproxyCount:v,plainCcsLane:d}){const{t:c}=R(),N=d?d.kind==="native"?c("continuityOverview.lane.native"):d.kind==="account-default"?c("continuityOverview.lane.accountDefault",{name:d.account_name||""}):d.kind==="account-inherited"?c("continuityOverview.lane.accountInherited",{name:d.account_name||""}):d.kind==="profile-default"?c("continuityOverview.lane.profileDefault",{name:d.profile_name||"default"}):d.label:"",j=a<2?"single":g.length===0?t===a?"isolated":"shared-alone":b.length===0?"shared-standard":t>0||u>0||l<r||b.length<g.length?"partial":"ready",y=b[0]||g[0]||"default",n=b.length>0&&(t>0||m>0||g.length>b.length),i={ready:e.jsx(is,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(L,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(be,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(Z,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(X,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(X,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[j],w=!!x&&d?.account_name===x,D=a>0&&!!d&&(!x||!w),A=a>1&&j!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(G,{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:i}),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:c(`continuityReadiness.messages.${j}.title`,{group:y})}),e.jsx(C,{variant:j==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:c(`continuityReadiness.state.${j}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:c(`continuityReadiness.messages.${j}.description`,{group:y,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[v>0&&e.jsx(C,{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:c("historySyncLearningMap.cliproxyManaged",{count:v})}),h>0&&e.jsx(C,{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:c("historySyncLearningMap.legacyConfirmation",{count:h})}),g.length>0&&b.length===0&&e.jsx(C,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:c("continuityOverview.recommendBadge",{group:y})}),n&&e.jsx(C,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:c("continuityOverview.partialBadge",{group:y})})]})]})}),(D||A)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(G,{className:"p-5 space-y-4",children:[D&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:c("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:c("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(P,{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(P,{value:"ccs auth backup default",size:"icon"})]}),x?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 ${x}`}),e.jsx(P,{value:`ccs auth default ${x}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:c("continuityOverview.setDefaultHint")})]})]}),A&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:c("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:c("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:c("continuityReadiness.steps.sameGroup",{group:y})}),e.jsx("li",{children:c("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:c("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(Z,{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:c("historySyncLearningMap.isolated")}),e.jsx(K,{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(B,{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(L,{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:c("historySyncLearningMap.shared")}),e.jsx(K,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:m})]}),e.jsx(B,{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(ee,{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:c("historySyncLearningMap.deeper")}),e.jsx(K,{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 ge=64;function gs({open:a,onClose:x}){const{t}=R(),[m,s]=k.useState(""),[u,r]=k.useState(!1),[l,g]=k.useState(""),[b,h]=k.useState(!1),[v,d]=k.useState(!1),c=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(m),N=l.trim().toLowerCase().replace(/\s+/g,"-"),j=N.length===0||N.length<=ge&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),y=m&&c?[`ccs auth create ${m}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&b?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),n=async()=>{!c||u&&!j||(await navigator.clipboard.writeText(y),d(!0),setTimeout(()=>d(!1),2e3))},o=()=>{s(""),r(!1),g(""),h(!1),d(!1),x()};return e.jsx(q,{open:a,onOpenChange:i=>!i&&o(),children:e.jsxs(W,{className:"sm:max-w-md",children:[e.jsxs(Q,{children:[e.jsx(J,{children:t("createAuthProfileDialog.title")}),e.jsx(Y,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(E,{id:"profile-name",value:m,onChange:i=>s(i.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),m&&!c&&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(ie,{id:"share-context",checked:u,onCheckedChange:i=>r(i===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(E,{id:"context-group",value:l,onChange:i=>g(i.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(ie,{id:"deeper-continuity",checked:b,onCheckedChange:i=>h(i===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),l.trim().length>0&&!j&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ge})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(ve,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:y}),e.jsx(p,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:n,disabled:!c||u&&!j,children:v?e.jsx(V,{className:"w-4 h-4 text-green-500"}):e.jsx(oe,{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(p,{variant:"ghost",onClick:o,children:t("createAuthProfileDialog.close")}),e.jsx(p,{onClick:n,disabled:!c||u&&!j,children:v?e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function Ts(){const{t:a}=R(),x=Ae(),{data:t,isLoading:m}=ss(),s=ts(),[u,r]=k.useState(!1),l=t?.accounts||[],g=t?.cliproxyCount||0,b=t?.legacyContextCount||0,h=t?.legacyContinuityCount||0,v=t?.sharedCount||0,d=t?.sharedStandardCount||0,c=t?.deeperSharedCount||0,N=t?.isolatedCount||0,j=t?.sharedAloneCount||0,y=t?.sharedPeerAccountCount||0,n=t?.deeperReadyAccountCount||0,o=t?.sharedPeerGroups||[],i=t?.deeperReadyGroups||[],w=t?.sharedGroups||[],D=t?.groupSummaries||[],A=t?.plainCcsLane||null,$=l.filter(H=>H.context_inferred||H.continuity_inferred),T=$.length,U=T>0,f=()=>x("/cliproxy?provider=claude"),I=()=>x("/cliproxy?provider=claude&action=auth"),_=()=>s.mutate($);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(xs,{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(Be,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(p,{size:"sm",className:"w-full justify-start",onClick:()=>r(!0),children:[e.jsx(de,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(p,{size:"sm",className:"w-full justify-start",onClick:I,children:[e.jsx(le,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(p,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:f,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(B,{className:"w-4 h-4 ml-auto"})]})]}),U?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(X,{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:[b>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:b})}),h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:h})})]})]}),e.jsx(p,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:_,disabled:s.isPending||T===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:T})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(M,{className:"pb-2",children:[e.jsx(z,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(F,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(G,{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 --share-context --context-group sprint-a --deeper-continuity"}),e.jsx(P,{value:"ccs auth create work --share-context --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(P,{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(C,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(C,{variant:"secondary",children:a("accountsPage.historySyncBadge")}),e.jsx(C,{variant:"secondary",children:a("accountsPage.resourcesBadge")})]}),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(he,{totalAccounts:l.length,primaryAccountName:l.length===1?l[0]?.name:null,isolatedCount:N,sharedStandardCount:d,deeperSharedCount:c,sharedAloneCount:j,sharedPeerAccountCount:y,deeperReadyAccountCount:n,sharedGroups:w,sharedPeerGroups:o,deeperReadyGroups:i,legacyTargetCount:T,cliproxyCount:g,plainCcsLane:A}),e.jsx(me,{totalAccounts:l.length,isolatedCount:N,sharedPeerGroups:o,deeperReadyGroups:i}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(M,{className:"pb-3",children:[e.jsx(z,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(F,{children:a("accountsPage.sharedTotalDesc",{count:v})})]}),e.jsx(G,{children:m?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ue,{data:l,defaultAccount:t?.default??null,groupSummaries:D,plainCcsLane:A})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(M,{children:[e.jsx(z,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(F,{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(G,{className:"space-y-2",children:[e.jsxs(p,{className:"w-full",onClick:()=>r(!0),children:[e.jsx(de,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(p,{variant:"outline",className:"w-full",onClick:f,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(B,{className:"w-4 h-4 ml-2"})]}),e.jsxs(p,{variant:"outline",className:"w-full",onClick:I,children:[a("accountsPage.authClaudeInPool"),e.jsx(le,{className:"w-4 h-4 ml-2"})]}),e.jsx(p,{variant:"outline",className:"w-full",onClick:_,disabled:s.isPending||T===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:T})})]})]}),e.jsx(he,{totalAccounts:l.length,primaryAccountName:l.length===1?l[0]?.name:null,isolatedCount:N,sharedStandardCount:d,deeperSharedCount:c,sharedAloneCount:j,sharedPeerAccountCount:y,deeperReadyAccountCount:n,sharedGroups:w,sharedPeerGroups:o,deeperReadyGroups:i,legacyTargetCount:T,cliproxyCount:g,plainCcsLane:A}),e.jsx(me,{totalAccounts:l.length,isolatedCount:N,sharedPeerGroups:o,deeperReadyGroups:i}),e.jsxs(O,{children:[e.jsx(M,{className:"pb-3",children:e.jsx(z,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(G,{children:m?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ue,{data:l,defaultAccount:t?.default??null,groupSummaries:D,plainCcsLane:A})})]})]}),e.jsx(gs,{open:u,onClose:()=>r(!1)})]})}export{Ts as AccountsPage};
1
+ import{j as e}from"./radix-ui-nu4wz29m.js";import{r as k,e as Ae}from"./react-vendor-Bjx91N7w.js";import{e as Pe,f as se,g as De}from"./tanstack-bhJxV1h8.js";import{T as Te,a as Se,b as te,c as Re,d as _e,e as Oe}from"./table-Dyt0FuBK.js";import{a as R,ah as q,ai as W,aj as Q,ak as J,al as Y,L as S,I as E,x as P,aD as pe,d as p,r as Ge,s as Me,t as ze,v as Le,w as ae,bi as ne,bj as re,bk as ce,B as C,c as $e,C as O,j as M,k as z,_ as F,b as G,e as Ie,f as He,g as Fe,n as Be}from"./index-C6j8gpEb.js";import{A as Ue,a as Ke,b as Ee,c as Ze,d as Ve,e as Xe,f as qe,g as We}from"./alert-dialog-BrOo6Lh3.js";import{u as fe,a as Qe,b as Je,c as Ye,d as es,e as ss,f as ts}from"./use-accounts-Dy2ogHT-.js";import{b1 as Z,b2 as L,b3 as ee,aH as be,_ as je,b4 as Ne,ai as ye,w as as,b5 as ns,b6 as rs,m as V,at as cs,Q as os,b7 as ds,a7 as ls,$ as ve,a6 as B,T as X,x as is,o as oe,U as xs,a9 as de,Z as le}from"./icons-DzKUh8vG.js";import{C as ie}from"./checkbox-CVS69doq.js";import"./notifications-B4_o8bcr.js";import"./utils-CzKF5WmX.js";import"./form-utils-CuHzLhJZ.js";import"./charts-eIPy2oG6.js";const xe=64,us=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function ms({account:a,groupSummaries:x,plainCcsLane:t,onClose:m}){const{t:s}=R(),u=fe(),[r,l]=k.useState(a.context_mode==="shared"?"shared":"isolated"),[g,b]=k.useState(a.context_group||"default"),[h,v]=k.useState(a.continuity_mode==="deeper"?"deeper":"standard"),d=k.useMemo(()=>g.trim().toLowerCase().replace(/\s+/g,"-"),[g]),c=k.useMemo(()=>x.find(f=>f.group===d),[x,d]),N=d.length>0&&d.length<=xe&&us.test(d),j=r==="isolated"||N,y=r==="shared"?Math.max((c?.sharedCount??0)-(a.context_mode==="shared"&&a.context_group===d?1:0),0):0,n=r==="shared"?Math.max((c?.deeperCount??0)-(a.continuity_mode==="deeper"&&a.context_group===d?1:0),0):0,o=t?.account_name===a.name,i=!!t&&!o,w=`ccs auth default ${a.name}`,D=`ccs auth backup ${a.name}`,A=(f,I,_,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(f.key))return;f.preventDefault();const ke=_.indexOf(I),we=f.key==="ArrowLeft"||f.key==="ArrowUp"?-1:1,Ce=(ke+we+_.length)%_.length;H(_[Ce])},$=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:"",T=()=>{j&&u.mutate({name:a.name,context_mode:r,context_group:r==="shared"?d:void 0,continuity_mode:r==="shared"?h:void 0},{onSuccess:()=>{m()}})},U=f=>{f||m()};return e.jsx(q,{open:!0,onOpenChange:U,children:e.jsxs(W,{className:"sm:max-w-md",children:[e.jsxs(Q,{children:[e.jsx(J,{children:s("editAccountContext.title")}),e.jsx(Y,{children:s("editAccountContext.description",{name:a.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.syncMode")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":r==="isolated",tabIndex:r==="isolated"?0:-1,onClick:()=>l("isolated"),onKeyDown:f=>A(f,r,["isolated","shared"],l),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 ${r==="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(Z,{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":r==="shared",tabIndex:r==="shared"?0:-1,onClick:()=>l("shared"),onKeyDown:f=>A(f,r,["isolated","shared"],l),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 ${r==="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(L,{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(r==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),r==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"context-group",children:s("editAccountContext.historySyncGroup")}),e.jsx(E,{id:"context-group",value:g,onChange:f=>b(f.target.value),placeholder:s("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.groupHint",{max:xe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:s("editAccountContext.invalidGroup")})]}),r==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(S,{className:"text-sm font-semibold",children:s("editAccountContext.continuityDepth")})}),e.jsxs("div",{className:"flex p-0.5 bg-muted/60 hover:bg-muted/80 transition-colors rounded-xl border border-border/40 w-full",role:"radiogroup","aria-label":s("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":h==="standard",tabIndex:h==="standard"?0:-1,onClick:()=>v("standard"),onKeyDown:f=>A(f,h,["standard","deeper"],v),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 ${h==="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(L,{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":h==="deeper",tabIndex:h==="deeper"?0:-1,onClick:()=>v("deeper"),onKeyDown:f=>A(f,h,["standard","deeper"],v),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 ${h==="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(ee,{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(h==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:s("editAccountContext.credentialsIsolated")}),i&&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:$||"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(P,{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(P,{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:D}),e.jsx(P,{value:D,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:w}),e.jsx(P,{value:w,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${r==="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:[r==="isolated"?e.jsx(be,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(je,{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:[r==="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:d})})," ",y>0?s("editAccountContext.sameGroupPeerCount",{count:y}):s("editAccountContext.noSameGroupPeer")]}),h==="deeper"&&e.jsx("p",{children:n>0?s("editAccountContext.deeperReady",{count:n}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:s("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${r==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:s("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(pe,{children:[e.jsx(p,{variant:"outline",onClick:m,disabled:u.isPending,children:s("editAccountContext.cancel")}),e.jsx(p,{onClick:T,disabled:!j||u.isPending,children:u.isPending?s("editAccountContext.saving"):s("editAccountContext.save")})]})]})})}function hs({account:a,onClose:x}){const{t}=R(),m=Qe(),[s,u]=k.useState(a.shared_resource_mode||"shared"),r=()=>{m.mutate({name:a.name,shared_resource_mode:s},{onSuccess:()=>{x()}})};return e.jsx(q,{open:!0,onOpenChange:x,children:e.jsxs(W,{className:"sm:max-w-[425px]",children:[e.jsxs(Q,{children:[e.jsx(J,{children:t("editAccountSharedResources.title")}),e.jsx(Y,{children:t("editAccountSharedResources.description",{name:a.name})})]}),e.jsxs("div",{className:"grid gap-4 py-4",children:[e.jsxs("div",{className:"grid gap-2",children:[e.jsx(S,{htmlFor:"resource-mode",children:t("editAccountSharedResources.resourceMode")}),e.jsxs(Ge,{value:s,onValueChange:l=>u(l),children:[e.jsx(Me,{id:"resource-mode",className:"w-full",children:e.jsx(ze,{placeholder:t("editAccountSharedResources.selectResourceMode")})}),e.jsxs(Le,{children:[e.jsx(ae,{value:"shared",children:e.jsxs("div",{className:"flex flex-col items-start py-1",children:[e.jsx("span",{className:"font-medium text-sm",children:t("editAccountSharedResources.sharedOption")}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:t("editAccountSharedResources.sharedHint")})]})}),e.jsx(ae,{value:"profile-local",children:e.jsxs("div",{className:"flex flex-col items-start py-1",children:[e.jsx("span",{className:"font-medium text-sm",children:t("editAccountSharedResources.profileLocalOption")}),e.jsx("span",{className:"text-[11px] text-muted-foreground",children:t("editAccountSharedResources.profileLocalHint")})]})})]})]})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:t("editAccountSharedResources.implicationTitle")}),s==="shared"?e.jsxs(ne,{className:"border-emerald-500/20 bg-emerald-500/5",children:[e.jsx(Ne,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),e.jsx(re,{className:"text-xs font-semibold text-emerald-800 dark:text-emerald-300",children:t("editAccountSharedResources.sharedOption")}),e.jsx(ce,{className:"text-xs text-emerald-700/80 dark:text-emerald-400/80",children:t("editAccountSharedResources.sharedImplication")})]}):e.jsxs(ne,{className:"border-amber-500/20 bg-amber-500/5",children:[e.jsx(ye,{className:"h-4 w-4 text-amber-600 dark:text-amber-400"}),e.jsx(re,{className:"text-xs font-semibold text-amber-800 dark:text-amber-300",children:t("editAccountSharedResources.profileLocalOption")}),e.jsx(ce,{className:"text-xs text-amber-700/80 dark:text-amber-400/80",children:t("editAccountSharedResources.profileLocalImplication")})]})]}),a.shared_resource_inferred&&e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted/50 p-3",children:[e.jsx(as,{className:"h-4 w-4 mt-0.5 text-muted-foreground shrink-0"}),e.jsx("p",{className:"text-[11px] text-muted-foreground",children:t("accountsTable.legacyReview")})]})]}),e.jsxs(pe,{children:[e.jsx(p,{variant:"outline",onClick:x,children:t("editAccountSharedResources.cancel")}),e.jsx(p,{onClick:r,disabled:m.isPending,children:m.isPending?t("editAccountSharedResources.saving"):t("editAccountSharedResources.save")})]})]})})}function ue({data:a,defaultAccount:x,groupSummaries:t,plainCcsLane:m}){const{t:s}=R(),u=Je(),r=Ye(),l=es(),g=fe(),[b,h]=k.useState(null),[v,d]=k.useState(null),[c,N]=k.useState(null),j=[{accessorKey:"name",header:s("accountsTable.name"),size:200,cell:({row:n})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:n.original.name}),n.original.name===x&&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:n})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:n.original.type||"oauth"})},{accessorKey:"created",header:s("accountsTable.created"),size:150,cell:({row:n})=>{const o=new Date(n.original.created);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{accessorKey:"last_used",header:s("accountsTable.lastUsed"),size:150,cell:({row:n})=>{if(!n.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const o=new Date(n.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:o.toLocaleDateString()})}},{id:"context",header:s("accountsTable.historySync"),size:170,cell:({row:n})=>{if(n.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((n.original.context_mode||"isolated")==="shared"){const i=n.original.context_group||"default",w=n.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(C,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${w?"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(w?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:i})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:n.original.sameGroupPeerCount>0?s("accountsTable.sameGroupPeerCount",{count:n.original.sameGroupPeerCount}):s("accountsTable.noSameGroupPeer")})]})}return n.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(C,{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(C,{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:"resources",header:s("accountsTable.sharedResources"),size:150,cell:({row:n})=>{if(n.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const o=n.original.shared_resource_mode||"shared",i=n.original.shared_resource_inferred;return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(C,{variant:o==="shared"?"outline":"secondary",className:$e("font-mono text-[10px] uppercase px-1.5 py-0",o==="shared"?"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":"text-muted-foreground bg-muted/60 border-transparent shadow-none"),children:s(o==="shared"?"accountsTable.resourcesShared":"accountsTable.resourcesProfileLocal")}),i&&e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:s("accountsTable.legacyReview")})]})}},{id:"actions",header:s("accountsTable.actions"),size:220,cell:({row:n})=>{const o=n.original.name===x,i=u.isPending||r.isPending||g.isPending,w=n.original.type==="cliproxy",D=n.original.context_inferred||n.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!w&&e.jsxs(p,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:i,onClick:()=>d(n.original),title:s("accountsTable.syncTitle"),children:[e.jsx(ns,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sync")]}),!w&&e.jsxs(p,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:i,onClick:()=>N(n.original),title:s("accountsTable.resourcesTitle"),children:[e.jsx(Ne,{className:"w-3.5 h-3.5 mr-1"}),s("accountsTable.sharedResources")]}),!w&&D&&e.jsxs(p,{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:i,onClick:()=>g.mutate({name:n.original.name,context_mode:n.original.context_mode==="shared"?"shared":"isolated",context_group:n.original.context_mode==="shared"?n.original.context_group||"default":void 0,continuity_mode:n.original.context_mode==="shared"?n.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:s("accountsTable.confirmLegacyTitle"),children:[e.jsx(rs,{className:"w-3 h-3 mr-1"}),s("accountsTable.confirm")]}),e.jsxs(p,{variant:o?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:o||i,onClick:()=>u.mutate(n.original.name),children:[e.jsx(V,{className:`w-3 h-3 mr-1 ${o?"opacity-50":""}`}),s(o?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(p,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:o||i,onClick:()=>h(n.original.name),title:s(o?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(cs,{className:"w-4 h-4"})})]})}}],y=Pe({data:a,columns:j,getCoreRowModel:De()});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(Te,{children:[e.jsx(Se,{children:y.getHeaderGroups().map(n=>e.jsx(te,{children:n.headers.map(o=>{const i={name:"w-[180px]",type:"w-[80px]",created:"w-[120px]",last_used:"w-[120px]",context:"w-[150px]",resources:"w-[120px]",actions:"w-[320px]"}[o.id]||"w-auto";return e.jsx(Re,{className:i,children:o.isPlaceholder?null:se(o.column.columnDef.header,o.getContext())},o.id)})},n.id))}),e.jsx(_e,{children:y.getRowModel().rows.map(n=>e.jsx(te,{children:n.getVisibleCells().map(o=>e.jsx(Oe,{children:se(o.column.columnDef.cell,o.getContext())},o.id))},n.id))})]})}),x&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(p,{variant:"outline",size:"sm",onClick:()=>l.mutate(),disabled:l.isPending,children:[e.jsx(os,{className:"w-4 h-4 mr-2"}),s("accountsTable.resetToDefault")]})})]}),v&&e.jsx(ms,{account:v,groupSummaries:t,plainCcsLane:m,onClose:()=>d(null)}),c&&e.jsx(hs,{account:c,onClose:()=>N(null)}),e.jsx(Ue,{open:!!b,onOpenChange:n=>!n&&h(null),children:e.jsxs(Ke,{children:[e.jsxs(Ee,{children:[e.jsx(Ze,{children:s("accountsTable.deleteDialogTitle")}),e.jsx(Ve,{children:s("accountsTable.deleteDialogDesc",{name:b??""})})]}),e.jsxs(Xe,{children:[e.jsx(qe,{children:s("accountsTable.cancel")}),e.jsx(We,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{b&&(r.mutate(b),h(null))},children:s("accountsTable.delete")})]})]})})]})}function me({totalAccounts:a,isolatedCount:x,sharedPeerGroups:t,deeperReadyGroups:m}){const{t:s}=R(),u=m[0]||t[0]||"daily",r=a<2?"empty":m.length>0?"deeper":t.length>0?"shared":a>=2&&x===a?"isolated":a===0?"empty":"mixed",l=`ccs auth create work2 --share-context --context-group ${u} --deeper-continuity`;return e.jsxs(O,{className:"overflow-hidden",children:[e.jsx(M,{className:"pb-3",children:e.jsxs("div",{className:"flex flex-wrap items-start justify-between gap-3",children:[e.jsxs("div",{className:"space-y-1",children:[e.jsx(z,{className:"text-lg",children:s("accountRouteGuide.title")}),e.jsx(F,{children:s("accountRouteGuide.description")})]}),e.jsx(C,{variant:r==="deeper"?"default":"secondary",children:s(`accountRouteGuide.status.${r}`)})]})}),e.jsxs(G,{className:"space-y-4",children:[e.jsxs("div",{className:"grid gap-3 md:grid-cols-2 xl:grid-cols-4",children:[e.jsxs("section",{className:"rounded-md border bg-blue-50/50 p-3 text-sm dark:bg-blue-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ye,{className:"h-4 w-4 text-blue-600 dark:text-blue-400"}),s("accountRouteGuide.cards.isolated.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.isolated.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-emerald-50/50 p-3 text-sm dark:bg-emerald-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ds,{className:"h-4 w-4 text-emerald-600 dark:text-emerald-400"}),s("accountRouteGuide.cards.select.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.select.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-sky-50/50 p-3 text-sm dark:bg-sky-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(ls,{className:"h-4 w-4 text-sky-600 dark:text-sky-400"}),s("accountRouteGuide.cards.settings.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.settings.desc")})]}),e.jsxs("section",{className:"rounded-md border bg-indigo-50/50 p-3 text-sm dark:bg-indigo-900/10",children:[e.jsxs("div",{className:"flex items-center gap-2 font-semibold",children:[e.jsx(L,{className:"h-4 w-4 text-indigo-600 dark:text-indigo-400"}),s("accountRouteGuide.cards.sync.title")]}),e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.cards.sync.desc")})]})]}),e.jsxs("div",{className:"grid gap-3 lg:grid-cols-2",children:[e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ve,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.isolated")]}),["ccs auth create work","ccs auth create personal","ccs work","ccs personal"].map(g=>e.jsxs("div",{className:"mt-2 flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:g}),e.jsx(P,{value:g,size:"icon"})]},g))]}),e.jsxs("div",{className:"rounded-md border bg-background p-3",children:[e.jsxs("div",{className:"mb-2 flex items-center gap-2 text-xs font-semibold uppercase tracking-wide text-muted-foreground",children:[e.jsx(ee,{className:"h-3.5 w-3.5"}),s("accountRouteGuide.commands.sync")]}),e.jsxs("div",{className:"flex items-start gap-2 rounded-md bg-muted px-2 py-2 font-mono text-[11px]",children:[e.jsx("span",{className:"flex-1 break-all",children:l}),e.jsx(P,{value:l,size:"icon"})]}),e.jsx("p",{className:"mt-2 text-xs leading-relaxed text-muted-foreground",children:s("accountRouteGuide.commands.syncDesc",{group:u})})]})]})]})]})}const K=({titleKey:a,descKey:x})=>{const{t}=R();return e.jsxs(Ie,{children:[e.jsx(He,{asChild:!0,children:e.jsx(p,{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(je,{className:"h-3 w-3"})})}),e.jsxs(Fe,{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(x)})]})]})};function he({totalAccounts:a,primaryAccountName:x,isolatedCount:t,sharedStandardCount:m,deeperSharedCount:s,sharedAloneCount:u,sharedPeerAccountCount:r,deeperReadyAccountCount:l,sharedPeerGroups:g,deeperReadyGroups:b,legacyTargetCount:h,cliproxyCount:v,plainCcsLane:d}){const{t:c}=R(),N=d?d.kind==="native"?c("continuityOverview.lane.native"):d.kind==="account-default"?c("continuityOverview.lane.accountDefault",{name:d.account_name||""}):d.kind==="account-inherited"?c("continuityOverview.lane.accountInherited",{name:d.account_name||""}):d.kind==="profile-default"?c("continuityOverview.lane.profileDefault",{name:d.profile_name||"default"}):d.label:"",j=a<2?"single":g.length===0?t===a?"isolated":"shared-alone":b.length===0?"shared-standard":t>0||u>0||l<r||b.length<g.length?"partial":"ready",y=b[0]||g[0]||"default",n=b.length>0&&(t>0||m>0||g.length>b.length),i={ready:e.jsx(is,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(L,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(be,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(Z,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(X,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(X,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[j],w=!!x&&d?.account_name===x,D=a>0&&!!d&&(!x||!w),A=a>1&&j!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(O,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(G,{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:i}),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:c(`continuityReadiness.messages.${j}.title`,{group:y})}),e.jsx(C,{variant:j==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:c(`continuityReadiness.state.${j}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:c(`continuityReadiness.messages.${j}.description`,{group:y,count:u})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[v>0&&e.jsx(C,{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:c("historySyncLearningMap.cliproxyManaged",{count:v})}),h>0&&e.jsx(C,{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:c("historySyncLearningMap.legacyConfirmation",{count:h})}),g.length>0&&b.length===0&&e.jsx(C,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:c("continuityOverview.recommendBadge",{group:y})}),n&&e.jsx(C,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:c("continuityOverview.partialBadge",{group:y})})]})]})}),(D||A)&&e.jsx(O,{className:"border-dashed",children:e.jsxs(G,{className:"p-5 space-y-4",children:[D&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:c("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:c("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(P,{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(P,{value:"ccs auth backup default",size:"icon"})]}),x?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 ${x}`}),e.jsx(P,{value:`ccs auth default ${x}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:c("continuityOverview.setDefaultHint")})]})]}),A&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:c("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:c("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:c("continuityReadiness.steps.sameGroup",{group:y})}),e.jsx("li",{children:c("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:c("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(Z,{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:c("historySyncLearningMap.isolated")}),e.jsx(K,{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(B,{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(L,{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:c("historySyncLearningMap.shared")}),e.jsx(K,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:m})]}),e.jsx(B,{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(ee,{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:c("historySyncLearningMap.deeper")}),e.jsx(K,{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 ge=64;function gs({open:a,onClose:x}){const{t}=R(),[m,s]=k.useState(""),[u,r]=k.useState(!1),[l,g]=k.useState(""),[b,h]=k.useState(!1),[v,d]=k.useState(!1),c=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(m),N=l.trim().toLowerCase().replace(/\s+/g,"-"),j=N.length===0||N.length<=ge&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),y=m&&c?[`ccs auth create ${m}`,u?N.length>0?`--context-group ${N}`:"--share-context":"",u&&b?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),n=async()=>{!c||u&&!j||(await navigator.clipboard.writeText(y),d(!0),setTimeout(()=>d(!1),2e3))},o=()=>{s(""),r(!1),g(""),h(!1),d(!1),x()};return e.jsx(q,{open:a,onOpenChange:i=>!i&&o(),children:e.jsxs(W,{className:"sm:max-w-md",children:[e.jsxs(Q,{children:[e.jsx(J,{children:t("createAuthProfileDialog.title")}),e.jsx(Y,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(E,{id:"profile-name",value:m,onChange:i=>s(i.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),m&&!c&&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(ie,{id:"share-context",checked:u,onCheckedChange:i=>r(i===!0)}),e.jsx(S,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),u&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(S,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(E,{id:"context-group",value:l,onChange:i=>g(i.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(ie,{id:"deeper-continuity",checked:b,onCheckedChange:i=>h(i===!0)}),e.jsx(S,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),l.trim().length>0&&!j&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:ge})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(S,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(ve,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:y}),e.jsx(p,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:n,disabled:!c||u&&!j,children:v?e.jsx(V,{className:"w-4 h-4 text-green-500"}):e.jsx(oe,{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(p,{variant:"ghost",onClick:o,children:t("createAuthProfileDialog.close")}),e.jsx(p,{onClick:n,disabled:!c||u&&!j,children:v?e.jsxs(e.Fragment,{children:[e.jsx(V,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(oe,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function Ts(){const{t:a}=R(),x=Ae(),{data:t,isLoading:m}=ss(),s=ts(),[u,r]=k.useState(!1),l=t?.accounts||[],g=t?.cliproxyCount||0,b=t?.legacyContextCount||0,h=t?.legacyContinuityCount||0,v=t?.sharedCount||0,d=t?.sharedStandardCount||0,c=t?.deeperSharedCount||0,N=t?.isolatedCount||0,j=t?.sharedAloneCount||0,y=t?.sharedPeerAccountCount||0,n=t?.deeperReadyAccountCount||0,o=t?.sharedPeerGroups||[],i=t?.deeperReadyGroups||[],w=t?.sharedGroups||[],D=t?.groupSummaries||[],A=t?.plainCcsLane||null,$=l.filter(H=>H.context_inferred||H.continuity_inferred),T=$.length,U=T>0,f=()=>x("/cliproxy?provider=claude"),I=()=>x("/cliproxy?provider=claude&action=auth"),_=()=>s.mutate($);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(xs,{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(Be,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:a("accountsPage.primaryActions")}),e.jsxs(p,{size:"sm",className:"w-full justify-start",onClick:()=>r(!0),children:[e.jsx(de,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(p,{size:"sm",className:"w-full justify-start",onClick:I,children:[e.jsx(le,{className:"w-4 h-4 mr-2"}),a("accountsPage.authClaudeInPool")]}),e.jsxs(p,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:f,children:[a("accountsPage.openClaudePoolSettings"),e.jsx(B,{className:"w-4 h-4 ml-auto"})]})]}),U?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(X,{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:[b>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContextPending",{count:b})}),h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:a("accountsPage.legacyContinuityPending",{count:h})})]})]}),e.jsx(p,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:_,disabled:s.isPending||T===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:T})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:a("accountsPage.noLegacyFollowup")}),e.jsxs(O,{children:[e.jsxs(M,{className:"pb-2",children:[e.jsx(z,{className:"text-sm",children:a("accountsPage.quickCommands")}),e.jsx(F,{children:a("accountsPage.quickCommandsDesc")})]}),e.jsxs(G,{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 --share-context --context-group sprint-a --deeper-continuity"}),e.jsx(P,{value:"ccs auth create work --share-context --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(P,{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(C,{variant:"outline",children:a("accountsPage.workspaceBadge")}),e.jsx(C,{variant:"secondary",children:a("accountsPage.historySyncBadge")}),e.jsx(C,{variant:"secondary",children:a("accountsPage.resourcesBadge")})]}),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(he,{totalAccounts:l.length,primaryAccountName:l.length===1?l[0]?.name:null,isolatedCount:N,sharedStandardCount:d,deeperSharedCount:c,sharedAloneCount:j,sharedPeerAccountCount:y,deeperReadyAccountCount:n,sharedGroups:w,sharedPeerGroups:o,deeperReadyGroups:i,legacyTargetCount:T,cliproxyCount:g,plainCcsLane:A}),e.jsx(me,{totalAccounts:l.length,isolatedCount:N,sharedPeerGroups:o,deeperReadyGroups:i}),e.jsxs(O,{className:"flex flex-col",children:[e.jsxs(M,{className:"pb-3",children:[e.jsx(z,{className:"text-lg",children:a("accountsPage.accountMatrix")}),e.jsx(F,{children:a("accountsPage.sharedTotalDesc",{count:v})})]}),e.jsx(G,{children:m?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ue,{data:l,defaultAccount:t?.default??null,groupSummaries:D,plainCcsLane:A})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(O,{children:[e.jsxs(M,{children:[e.jsx(z,{className:"text-lg",children:a("accountsPage.title")}),e.jsxs(F,{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(G,{className:"space-y-2",children:[e.jsxs(p,{className:"w-full",onClick:()=>r(!0),children:[e.jsx(de,{className:"w-4 h-4 mr-2"}),a("accountsPage.createAccount")]}),e.jsxs(p,{variant:"outline",className:"w-full",onClick:f,children:[a("accountsPage.openCliProxyClaudePool"),e.jsx(B,{className:"w-4 h-4 ml-2"})]}),e.jsxs(p,{variant:"outline",className:"w-full",onClick:I,children:[a("accountsPage.authClaudeInPool"),e.jsx(le,{className:"w-4 h-4 ml-2"})]}),e.jsx(p,{variant:"outline",className:"w-full",onClick:_,disabled:s.isPending||T===0,children:s.isPending?a("accountsPage.confirmingLegacy"):a("accountsPage.confirmLegacy",{count:T})})]})]}),e.jsx(he,{totalAccounts:l.length,primaryAccountName:l.length===1?l[0]?.name:null,isolatedCount:N,sharedStandardCount:d,deeperSharedCount:c,sharedAloneCount:j,sharedPeerAccountCount:y,deeperReadyAccountCount:n,sharedGroups:w,sharedPeerGroups:o,deeperReadyGroups:i,legacyTargetCount:T,cliproxyCount:g,plainCcsLane:A}),e.jsx(me,{totalAccounts:l.length,isolatedCount:N,sharedPeerGroups:o,deeperReadyGroups:i}),e.jsxs(O,{children:[e.jsx(M,{className:"pb-3",children:e.jsx(z,{className:"text-base",children:a("accountsPage.accountMatrix")})}),e.jsx(G,{children:m?e.jsx("div",{className:"text-muted-foreground",children:a("accountsPage.loadingAccounts")}):e.jsx(ue,{data:l,defaultAccount:t?.default??null,groupSummaries:D,plainCcsLane:A})})]})]}),e.jsx(gs,{open:u,onClose:()=>r(!1)})]})}export{Ts 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-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-BRwWpHe-.js";function A({...a}){return e.jsx(s,{"data-slot":"alert-dialog",...a})}function g({...a}){return e.jsx(u,{"data-slot":"alert-dialog-portal",...a})}function m({className:a,...t}){return e.jsx(f,{"data-slot":"alert-dialog-overlay",className:o("data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",a),...t})}function D({className:a,...t}){return e.jsxs(g,{children:[e.jsx(m,{}),e.jsx(r,{"data-slot":"alert-dialog-content",className:o("bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",a),...t})]})}function b({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-header",className:o("flex flex-col gap-2 text-center sm:text-left",a),...t})}function N({className:a,...t}){return e.jsx("div",{"data-slot":"alert-dialog-footer",className:o("flex flex-col-reverse gap-2 sm:flex-row sm:justify-end",a),...t})}function v({className:a,...t}){return e.jsx(n,{"data-slot":"alert-dialog-title",className:o("text-lg font-semibold",a),...t})}function w({className:a,...t}){return e.jsx(i,{"data-slot":"alert-dialog-description",className:o("text-muted-foreground text-sm",a),...t})}function y({className:a,...t}){return e.jsx(c,{className:o(l(),a),...t})}function z({className:a,...t}){return e.jsx(d,{className:o(l({variant:"outline"}),a),...t})}export{A,D as a,b,v as c,w as d,N as e,z as f,y as g};
1
+ 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-nu4wz29m.js";import"./react-vendor-Bjx91N7w.js";import{c as o,bY as l}from"./index-C6j8gpEb.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};