@georgedong32/ccs 7.67.1 → 7.67.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 (96) hide show
  1. package/.claude/commands/opsx/apply.md +152 -0
  2. package/.claude/commands/opsx/archive.md +157 -0
  3. package/.claude/commands/opsx/continue.md +114 -0
  4. package/.claude/commands/opsx/explore.md +173 -0
  5. package/.claude/commands/opsx/ff.md +97 -0
  6. package/.claude/commands/opsx/new.md +69 -0
  7. package/.claude/commands/opsx/propose.md +106 -0
  8. package/.claude/commands/opsx/sync.md +134 -0
  9. package/.claude/commands/opsx/verify.md +164 -0
  10. package/.claude/settings.local.json +47 -1
  11. package/dist/auth/commands/create-command-env.d.ts +1 -0
  12. package/dist/auth/commands/create-command-env.d.ts.map +1 -1
  13. package/dist/channels/official-channels-runtime.d.ts +1 -0
  14. package/dist/channels/official-channels-runtime.d.ts.map +1 -1
  15. package/dist/channels/official-channels-store.d.ts +1 -0
  16. package/dist/channels/official-channels-store.d.ts.map +1 -1
  17. package/dist/cliproxy/base-config-loader.d.ts +1 -0
  18. package/dist/cliproxy/base-config-loader.d.ts.map +1 -1
  19. package/dist/cliproxy/config/env-builder.d.ts +1 -0
  20. package/dist/cliproxy/config/env-builder.d.ts.map +1 -1
  21. package/dist/cliproxy/config/extended-context-config.d.ts +1 -0
  22. package/dist/cliproxy/config/extended-context-config.d.ts.map +1 -1
  23. package/dist/cliproxy/config/thinking-config.d.ts +1 -0
  24. package/dist/cliproxy/config/thinking-config.d.ts.map +1 -1
  25. package/dist/cliproxy/model-id-normalizer.d.ts +1 -0
  26. package/dist/cliproxy/model-id-normalizer.d.ts.map +1 -1
  27. package/dist/cursor/cursor-anthropic-response.d.ts +1 -0
  28. package/dist/cursor/cursor-anthropic-response.d.ts.map +1 -1
  29. package/dist/cursor/cursor-executor.d.ts +1 -0
  30. package/dist/cursor/cursor-executor.d.ts.map +1 -1
  31. package/dist/docker/docker-executor.d.ts +1 -0
  32. package/dist/docker/docker-executor.d.ts.map +1 -1
  33. package/dist/targets/claude-adapter.d.ts +1 -0
  34. package/dist/targets/claude-adapter.d.ts.map +1 -1
  35. package/dist/targets/codex-adapter.d.ts +1 -0
  36. package/dist/targets/codex-adapter.d.ts.map +1 -1
  37. package/dist/targets/droid-adapter.d.ts +1 -0
  38. package/dist/targets/droid-adapter.d.ts.map +1 -1
  39. package/dist/targets/target-adapter.d.ts +1 -0
  40. package/dist/targets/target-adapter.d.ts.map +1 -1
  41. package/dist/types/cli.d.ts +1 -0
  42. package/dist/types/cli.d.ts.map +1 -1
  43. package/dist/ui/assets/{accounts-DhtktAIG.js → accounts-3AVm26OA.js} +1 -1
  44. package/dist/ui/assets/{alert-dialog-DQK2Jxfk.js → alert-dialog-DDRA-1Pt.js} +1 -1
  45. package/dist/ui/assets/{api-Den1YY2d.js → api-BPEl09Ob.js} +1 -1
  46. package/dist/ui/assets/{auth-section-BQitOLMK.js → auth-section-DoAPGxlq.js} +1 -1
  47. package/dist/ui/assets/{backups-section-BLGK5re-.js → backups-section-CyRRApPr.js} +1 -1
  48. package/dist/ui/assets/{channels-Dop1axTi.js → channels-CkgeG_Nr.js} +1 -1
  49. package/dist/ui/assets/{checkbox-DDrDuGxi.js → checkbox-2A_GWLUb.js} +1 -1
  50. package/dist/ui/assets/{claude-extension-6WjTc0o8.js → claude-extension-1rjZXaRt.js} +1 -1
  51. package/dist/ui/assets/{cliproxy-Ch7RdSMG.js → cliproxy-CMU0po64.js} +1 -1
  52. package/dist/ui/assets/{cliproxy-ai-providers-DjybBlb5.js → cliproxy-ai-providers-CRYD_2SS.js} +1 -1
  53. package/dist/ui/assets/{cliproxy-control-panel-DDif_QAT.js → cliproxy-control-panel-Bo9-0Mcr.js} +1 -1
  54. package/dist/ui/assets/{codex-DFAV50Ee.js → codex-DZCkRvut.js} +1 -1
  55. package/dist/ui/assets/{confirm-dialog-CP26_Zko.js → confirm-dialog-wFhgI3dr.js} +1 -1
  56. package/dist/ui/assets/{copilot-uZuyhqwv.js → copilot-Dd7oxTU-.js} +1 -1
  57. package/dist/ui/assets/{cursor-CuaM2FmN.js → cursor-CvA9T82x.js} +1 -1
  58. package/dist/ui/assets/{droid-DdjXJ2lF.js → droid-6r-EzLds.js} +1 -1
  59. package/dist/ui/assets/{globalenv-section-D5_-EIlf.js → globalenv-section-QTLjTpzK.js} +1 -1
  60. package/dist/ui/assets/{health-BHhVKLNR.js → health-580PHGfZ.js} +1 -1
  61. package/dist/ui/assets/index-BgDioiqT.js +1 -0
  62. package/dist/ui/assets/{index-B8bAYHAs.js → index-CNKKQedn.js} +1 -1
  63. package/dist/ui/assets/{index-Ba-43jCS.js → index-Cd_4MB83.js} +1 -1
  64. package/dist/ui/assets/{index-Bm09kGOw.js → index-CxcEG3G-.js} +1 -1
  65. package/dist/ui/assets/{index-TSYtCr3K.js → index-DI-8QF69.js} +3 -3
  66. package/dist/ui/assets/{index-DHY37v8a.js → index-ZXB5YY2K.js} +1 -1
  67. package/dist/ui/assets/{masked-input-CTkIqCMg.js → masked-input-DUhsSbtq.js} +1 -1
  68. package/dist/ui/assets/{proxy-status-widget-DPhKjJFl.js → proxy-status-widget-bxJaZJK2.js} +1 -1
  69. package/dist/ui/assets/{raw-json-settings-editor-panel-DQr_y0E4.js → raw-json-settings-editor-panel-BDlKTYzk.js} +1 -1
  70. package/dist/ui/assets/{searchable-select-C2sP7JW5.js → searchable-select-rg8_CopX.js} +1 -1
  71. package/dist/ui/assets/{separator-2lt47Sla.js → separator-DgIPRe__.js} +1 -1
  72. package/dist/ui/assets/{shared-DPKtsiFQ.js → shared-BiFfbORv.js} +1 -1
  73. package/dist/ui/assets/{table-DbsFACgT.js → table-7YfVdOmB.js} +1 -1
  74. package/dist/ui/assets/{updates-C5iL4KNn.js → updates-BsjUVKfy.js} +1 -1
  75. package/dist/ui/index.html +1 -1
  76. package/dist/utils/claude-detector.d.ts +1 -0
  77. package/dist/utils/claude-detector.d.ts.map +1 -1
  78. package/dist/utils/claude-spawner.d.ts +1 -0
  79. package/dist/utils/claude-spawner.d.ts.map +1 -1
  80. package/dist/utils/shell-executor.d.ts +1 -0
  81. package/dist/utils/shell-executor.d.ts.map +1 -1
  82. package/dist/utils/websearch/trace.d.ts +1 -0
  83. package/dist/utils/websearch/trace.d.ts.map +1 -1
  84. package/dist/web-server/model-pricing.d.ts.map +1 -1
  85. package/dist/web-server/model-pricing.js +85 -25
  86. package/dist/web-server/model-pricing.js.map +1 -1
  87. package/dist/web-server/services/codex-dashboard-service.d.ts +1 -0
  88. package/dist/web-server/services/codex-dashboard-service.d.ts.map +1 -1
  89. package/dist/web-server/services/droid-dashboard-service.d.ts +1 -0
  90. package/dist/web-server/services/droid-dashboard-service.d.ts.map +1 -1
  91. package/dist/web-server/usage/handlers.d.ts +5 -0
  92. package/dist/web-server/usage/handlers.d.ts.map +1 -1
  93. package/dist/web-server/usage/handlers.js +23 -15
  94. package/dist/web-server/usage/handlers.js.map +1 -1
  95. package/package.json +5 -6
  96. package/dist/ui/assets/index-DLCFe4s3.js +0 -1
@@ -1 +1 @@
1
- {"version":3,"file":"thinking-config.d.ts","sourceRoot":"","sources":["../../../src/cliproxy/config/thinking-config.ts"],"names":[],"mappings":"AAAA;;;GAGG;;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,UAAU,CAAC;AAEjD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAOxE,oDAAoD;AACpD,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,QAAQ,GAAG,OAAO,CAAC;AAmCpD;;;GAGG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,CAKhE;AAED;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,MAAM,CAEzF;AA0CD;;;GAGG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,EAAE,SAAS,E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,cAAc,GAC7B,MAAM,CAiBR;AAED;;GAEG;AACH,UAAU,qBAAqB;IAC7B,QAAQ,CAAC,EAAE,gBAAgB,CAAC;CAC7B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,mBAAmB,CACjC,OAAO,EAAE,MAAM,CAAC,UAAU,EAC1B,QAAQ,EAAE,gBAAgB,EAC1B,gBAAgB,CAAC,EAAE,MAAM,GAAG,MAAM,EAClC,qBAAqB,CAAC,EAAE;IACtB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB,EACD,cAAc,CAAC,EAAE;IACf,IAAI,CAAC,EAAE,qBAAqB,CAAC;IAC7B,MAAM,CAAC,EAAE,qBAAqB,CAAC;IAC/B,KAAK,CAAC,EAAE,qBAAqB,CAAC;CAC/B,GACA,MAAM,CAAC,UAAU,CAqJnB"}
@@ -5,6 +5,7 @@
5
5
  * model version formats (e.g., 4.6 vs 4-6).
6
6
  */
7
7
  /// <reference types="node" />
8
+ /// <reference types="bun-types" />
8
9
  import type { CLIProxyProvider } from './types';
9
10
  /** Env vars that carry model identifiers. */
10
11
  export declare const MODEL_ENV_VAR_KEYS: readonly ["ANTHROPIC_MODEL", "ANTHROPIC_DEFAULT_OPUS_MODEL", "ANTHROPIC_DEFAULT_SONNET_MODEL", "ANTHROPIC_DEFAULT_HAIKU_MODEL"];
@@ -1 +1 @@
1
- {"version":3,"file":"model-id-normalizer.d.ts","sourceRoot":"","sources":["../../src/cliproxy/model-id-normalizer.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAGhD,6CAA6C;AAC7C,eAAO,MAAM,kBAAkB,iIAA2B,CAAC;AAE3D,KAAK,YAAY,GAAG,gBAAgB,GAAG,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;AA4CjE;;;;;;GAMG;AACH,w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AA0C,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAKhF;AAED;;;GAGG;AACH,wBAAgB,oCAAoC,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAK1E;AAED;;GAEG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAEjE;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,KAAK,EAAE,MAAM,EACb,QAAQ,EAAE,YAAY,GACrB,MAAM,GAAG,IAAI,CAKf;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,2BAA2B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAQzF;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAM5F;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,YAAY,GAAG,MAAM,CAWxF;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,gCAAgC,CAC9C,OAAO,EAAE,MAAM,CAAC,UAAU,EAC1B,QAAQ,EAAE,YAAY,EACtB,IAAI,GAAE,SAAS,MAAM,EAAuB,GAC3C,MAAM,CAAC,UAAU,CAenB"}
@@ -1,3 +1,4 @@
1
+ /// <reference types="bun-types" />
1
2
  /// <reference types="node" />
2
3
  type ResponseHeaders = Headers | Record<string, string> | Array<[string, string]>;
3
4
  export declare function createAnthropicErrorResponse(status: number, type: string, message: string, headers?: ResponseHeaders): Response;
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-anthropic-response.d.ts","sourceRoot":"","sources":["../../src/cursor/cursor-anthropic-response.ts"],"names":[],"mappings":";AAOA,KAAK,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAoClF,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,QAAQ,CASV;AAmLD,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAYxF"}
1
+ {"version":3,"file":"cursor-anthropic-response.d.ts","sourceRoot":"","sources":["../../src/cursor/cursor-anthropic-response.ts"],"names":[],"mappings":";;AAOA,KAAK,eAAe,GAAG,OAAO,GAAG,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,KAAK,CAAC,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;AAoClF,wBAAgB,4BAA4B,CAC1C,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,MAAM,EACf,OAAO,CAAC,EAAE,eAAe,GACxB,QAAQ,CASV;AAmLD,wBAAsB,4BAA4B,CAAC,QAAQ,EAAE,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC,CAYxF"}
@@ -2,6 +2,7 @@
2
2
  * Cursor Executor
3
3
  * Handles HTTP/2 requests to Cursor API with protobuf encoding/decoding
4
4
  */
5
+ /// <reference types="bun-types" />
5
6
  /// <reference types="node" />
6
7
  /// <reference types="node" />
7
8
  /// <reference types="node" />
@@ -1 +1 @@
1
- {"version":3,"file":"cursor-executor.d.ts","sourceRoot":"","sources":["../../src/cursor/cursor-executor.ts"],"names":[],"mappings":"AAAA;;;GAGG;;;;;AAEH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,MAAM,CAAC;AAGhD,OAAO,KAAK,EAAE,UAAU,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAC;AAKpF,0BAA0B;AAC1B,UAAU,cAAc;IACtB,KAAK,EAAE,MAAM,CAAC;IACd,IAAI,EAAE;QACJ,QAAQ,EAAE,KAAK,CAAC;YACd,IAA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GAChC,UAAU;IAQP,gBAAgB,CACpB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC;IAoBnB,gBAAgB,CACpB,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,EAC/B,IAAI,EAAE,UAAU,EAChB,MAAM,CAAC,EAAE,WAAW,GACnB,OAAO,CAAC,aAAa,CAAC;IAgEnB,OAAO,CAAC,MAAM,EAAE,cAAc,GAAG,OAAO,CAAC;QAC7C,QAAQ,EAAE,QAAQ,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;QAChC,eAAe,EAAE,cAAc,CAAC,MAAM,CAAC,CAAC;KACzC,CAAC;IAgEF;;;;OAIG;YACW,gBAAgB;IAsT9B;;;OAGG;IACH,OAAO,CAAE,mBAAmB;IAoF5B,uBAAuB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,QAAQ;IAgI/F,yFAAyF;IACzF,sBAAsB,CAAC,MAAM,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,EAAE,KAAK,EAAE,cAAc,CAAC,MAAM,CAAC,GAAG,QAAQ;CAkN/F;AAED,eAAe,cAAc,CAAC"}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="bun-types" />
2
3
  import { type DockerAssetPaths } from './docker-assets';
3
4
  import type { DockerCommandResult, DockerCommandTarget, DockerConfigSummary, DockerLogsOptions, DockerStatusResult, DockerUpOptions } from './docker-types';
4
5
  interface DockerSyncRunOptions {
@@ -1 +1 @@
1
- {"version":3,"file":"docker-executor.d.ts","sourceRoot":"","sources":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C,CAAC;CACnE;AAED,qBAAa,cAAc;IAGb,OAAO,CAAC,QAAQ,CAAC,IAAI;IAFjC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAmB;gBAEb,IAAI,GAAE,kBAAuB;IAI1D,SAAS,CAAC,OAAO,EAAE;QAAE,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,SAAS,CAAC,EAAE,MAAM,CAAA;KAAE,GAAG,mBAAmB;IAI7F,EAAE,CAAC,OAAO,EAAE,eAAe,GAAG,IAAI;IAoBlC,IAAI,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAIxC,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,kBAAkB;IAaxD,MAAM,CAAC,OAAO,EAAE,mBAAmB,GAAG,IAAI;IAcpC,IAAI,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,MAAM,GAAG,IAAI,CAAC;IAuB9D,OAAO,CAAC,iBAAiB;IAsBzB,OAAO,CAAC,UAAU;IA0BlB,OAAO,CAAC,SAAS;YAcH,kBAAkB;IAQhC,OAAO,CAAC,sBAAsB;IAI9B,OAAO,CAAC,yBAAyB;IAIjC,OAAO,CAAC,OAAO;YAYD,YAAY;IAI1B,OAAO,CAAC,aAAa;CAgBtB"}
@@ -5,6 +5,7 @@
5
5
  * Wraps existing detection, spawning, and execution logic.
6
6
  */
7
7
  /// <reference types="node" />
8
+ /// <reference types="bun-types" />
8
9
  import { TargetAdapter, TargetBinaryInfo, TargetCredentials, TargetType } from './target-adapter';
9
10
  import type { ProfileType } from '../types/profile';
10
11
  export declare class ClaudeAdapter implements TargetAdapter {
@@ -1 +1 @@
1
- {"version":3,"file":"claude-adapter.d.ts","sourceRoot":"","sources":["../../src/targets/claude-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAGH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBA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E,SAAS,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAIzD,QAAQ,CAAC,KAAK,EAAE,iBAAiB,EAAE,WAAW,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU;IAuB/E,IAAI,CACF,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,QAAQ,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAE,GACzD,IAAI;IAoEP;;OAEG;IACH,mBAAmB,CAAC,YAAY,EAAE,WAAW,GAAG,OAAO;CAGxD"}
@@ -1,4 +1,5 @@
1
1
  /// <reference types="node" />
2
+ /// <reference types="bun-types" />
2
3
  import type { ProfileType } from '../types/profile';
3
4
  import type { TargetAdapter, TargetBinaryInfo, TargetCredentials, TargetType } from './target-adapter';
4
5
  export declare class CodexAdapter implements TargetAdapter {
@@ -1 +1 @@
1
- {"version":3,"file":"codex-adapter.d.ts","sourceRoot":"","sources":["../../src/targets/codex-adapter.ts"],"names":[],"mappings":";AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAKpD,OAAO,KAAK,EACV,aAAa,EACb,gBAAgB,EAChB,iBAAiB,EACjB,UAAU,EACX,MAAM,kBAAkB,CAAC;AA0J1B,qBAAa,YAAa,YAAW,aAAa;IAChD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAW;IACpC,QAAQ,CAAC,WAAW,eAAe;IAEnC,YAAY,IAAI,gBAAgB,GAAG,IAAI;IAIjC,kBAAkB,CAAC,MAAM,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAIlE,SAAS,CACP,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAAE,EAClB,OAAO,CAAC,EAAE;QACR,KAAK,CAAC,EAAE,iBAAiB,CAAC;QAC1B,WAAW,C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AE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAE,GACxD,IAAI;IA+EP,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO;CAKvD"}
@@ -5,6 +5,7 @@
5
5
  * Writes credentials + active model to ~/.factory/settings.json and spawns `droid`.
6
6
  */
7
7
  /// <reference types="node" />
8
+ /// <reference types="bun-types" />
8
9
  import { TargetAdapter, TargetBinaryInfo, TargetCredentials, TargetType } from './target-adapter';
9
10
  import type { ProfileType } from '../types/profile';
10
11
  export declare class DroidAdapter implements TargetAdapter {
@@ -1 +1 @@
1
- {"version":3,"file":"droid-adapter.d.ts","sourceRoot":"","sources":["../../src/targets/droid-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAIH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOpD,qBAAa,YAAa,YAAW,aAAa;IAChD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAW;IACpC,QAAQ,CAAC,WAAW,mBAAmB;IAEvC,OAAO,CAAC,mBAAmB;IAS3B,YAAY,IAAI,gBAAgB,GAAG,IAAI;IASvC;;;OAGG;IACG,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBjE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWxD;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU;IAUjF,IAAI,CACF,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAE,GACxD,IAAI;IAkFP,2EAA2E;IAC3E,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO;CAGvD"}
1
+ {"version":3,"file":"droid-adapter.d.ts","sourceRoot":"","sources":["../../src/targets/droid-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;;AAIH,OAAO,EAAE,aAAa,EAAE,gBAAgB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AAElG,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAOpD,qBAAa,YAAa,YAAW,aAAa;IAChD,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAW;IACpC,QAAQ,CAAC,WAAW,mBAAmB;IAEvC,OAAO,CAAC,mBAAmB;IAS3B,YAAY,IAAI,gBAAgB,GAAG,IAAI;IASvC;;;OAGG;IACG,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC;IAoBjE,SAAS,CAAC,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,MAAM,EAAE;IAWxD;;;OAGG;IACH,QAAQ,CAAC,MAAM,EAAE,iBAAiB,EAAE,YAAY,EAAE,WAAW,GAAG,MAAM,CAAC,UAAU;IAUjF,IAAI,CACF,IAAI,EAAE,MAAM,EAAE,EACd,GAAG,EAAE,MAAM,CAAC,UAAU,EACtB,OAAO,CAAC,EAAE;QAAE,GAAG,CAAC,EAAE,MAAM,CAAC;QAAC,UAAU,CAAC,EAAE,gBAAgB,CAAA;KAAE,GACxD,IAAI;IAkFP,2EAA2E;IAC3E,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,OAAO;CAGvD"}
@@ -5,6 +5,7 @@
5
5
  * Profile resolution is target-agnostic — only the "last mile" execution differs.
6
6
  */
7
7
  /// <reference types="node" />
8
+ /// <reference types="bun-types" />
8
9
  /**
9
10
  * Supported CLI target types.
10
11
  * 'claude' is the default; additional targets register via target-registry.
@@ -1 +1 @@
1
- {"version":3,"file":"target-adapter.d.ts","sourceRoot":"","sources":["../../src/targets/target-adapter.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;;AAEH;;;GAGG;AACH,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEtD;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;IACf,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,WAAW,GAAG,QAAQ,GAAG,6BAA6B,CAAC;IAClE;;;;OAIG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACpC,2EAA2E;IAC3E,OAAO,CAAC,EAAE,MAAM,CAAC,UAAU,CAAC;CAC7B;AAED;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,UAAU,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,SAAS,MAAM,EAAE,CAAC;CAC9B;AAED;;;;;;;;GAQG;AACH,MAAM,WAAW,aAAa;IAC5B,QAAQ,CAAC,IAAI,EAAE,UAAU,CAAC;IAC1B,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAE7B;;;OAGG;IACH,YAAY,IAAI,gBAAgB,GAAG,IAAI,CAAC;IAExC;;;;;OAKG;IACH,kBAAkB,CAAC,KAAK,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAE5D;;;OA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nOptions as NodeSpawnOptions } from 'child_process';
4
5
  /**
5
6
  * CLI Runtime Types
@@ -1 +1 @@
1
- {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/types/cli.ts"],"names":[],"mappings":";;AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtE;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC"}
1
+ {"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../src/types/cli.ts"],"names":[],"mappings":";;;AAAA,OAAO,KAAK,EAAE,YAAY,IAAI,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAEtE;;GAEG;AAEH;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,YAAY,EAAE,OAAO,CAAC;IACtB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,EAAE,CAAC;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,kBAAmB,SAAQ,gBAAgB;IAC1D,KAAK,EAAE,SAAS,GAAG,MAAM,CAAC;IAC1B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,GAAG,EAAE,MAAM,CAAC,UAAU,CAAC;CACxB;AAED;;GAEG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,OAAO,GAAG,OAAO,CAAC;AAEpD;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,OAAO,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED;;GAEG;AACH,eAAO,MAAM,QAAQ;;;;;;;CAOX,CAAC;AAEX,MAAM,MAAM,QAAQ,GAAG,CAAC,OAAO,QAAQ,CAAC,CAAC,MAAM,OAAO,QAAQ,CAAC,CAAC"}
@@ -1 +1 @@
1
- import{j as e}from"./radix-ui-BlliRfHq.js";import{r as C,h as ve}from"./react-vendor-CNOkPC89.js";import{u as Ce,a as $,b as F,e as ke,f as ee,g as we}from"./tanstack-BjiH4QZq.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-DbsFACgT.js";import{q as O,a as z,D as de,j as ue,k as xe,l as me,m as he,L as T,I as X,E as D,aw as Se,d as b,B as P,C as M,b as R,e as Ge,f as Me,g as Re,A as Oe,o as I,p as q,a2 as Q}from"./index-TSYtCr3K.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-DQK2Jxfk.js";import{t as k}from"./notifications-B2HqRBj7.js";import{aT as W,aU as E,aV as pe,ay as ge,Q as fe,aW as Ee,aX as Ue,k as J,aj as Be,J as Qe,au as U,T as Y,v as Ze,V as Ve,m as ae,U as Xe,a5 as se,Z as ne}from"./icons-CQ3MLSan.js";import{C as re}from"./checkbox-DDrDuGxi.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(s){return Array.from(s).sort((r,t)=>r.localeCompare(t))}function We(s){const r=new Map;for(const n of s){if(n.context_mode!=="shared")continue;const h=n.context_group||"default",m=r.get(h)??{group:h,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),r.set(h,m)}const t=Array.from(r.values()).sort((n,h)=>n.group.localeCompare(h.group)),u=s.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const h=n.context_group||"default",m=r.get(h),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),a=u.filter(n=>n.context_mode==="shared").length,i=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,c=u.filter(n=>n.context_inferred).length,p=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:u,sharedCount:a,sharedStandardCount:Math.max(a-i,0),deeperSharedCount:i,isolatedCount:u.length-a,legacyContextCount:c,legacyContinuityCount:p,sharedAloneCount:u.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:u.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:u.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Je(){return Ce({queryKey:["accounts"],queryFn:()=>O.accounts.list(),select:s=>{const r=s.accounts.filter(i=>i.type!=="cliproxy"),t=We(r),u=s.accounts.length-r.length,a=t.accounts.some(i=>i.name===s.default)?s.default:null;return{accounts:t.accounts,default:a,cliproxyCount:u,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:s.plain_ccs_lane??null}}})}function Ye(){const s=$();return F({mutationFn:r=>O.accounts.setDefault(r),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]}),k.success(`Default account set to "${t}"`)},onError:r=>{k.error(r.message)}})}function et(){const s=$();return F({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{s.invalidateQueries({queryKey:["accounts"]}),k.success("Default account reset to CCS")},onError:r=>{k.error(r.message)}})}function tt(){const s=$();return F({mutationFn:r=>O.accounts.delete(r),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]}),k.success(`Account "${t}" deleted`)},onError:r=>{k.error(r.message)}})}function be(){const s=$();return F({mutationFn:({name:r,context_mode:t,context_group:u,continuity_mode:a})=>O.accounts.updateContext(r,{context_mode:t,context_group:u,continuity_mode:a}),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]});const u=t.context_mode==="shared"?t.continuity_mode==="deeper"?`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";k.success(`Updated "${t.name}" context to ${u}`)},onError:r=>{k.error(r.message)}})}function at(){const s=$();return F({mutationFn:async r=>{const t=r.filter(i=>i.context_inferred||i.continuity_inferred),a=(await Promise.allSettled(t.map(i=>{const c=i.context_mode==="shared";return O.accounts.updateContext(i.name,{context_mode:c?"shared":"isolated",context_group:c?i.context_group||"default":void 0,continuity_mode:c?i.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(i=>i.status==="rejected").length;return{updatedCount:t.length-a,failedCount:a}},onSuccess:({updatedCount:r,failedCount:t})=>{if(s.invalidateQueries({queryKey:["accounts"]}),t>0&&r>0){k.error(`Confirmed ${r} legacy account${r>1?"s":""}, but ${t} update${t>1?"s":""} failed. Refreshed account state.`);return}if(t>0){k.error(`Failed to confirm ${t} legacy account${t>1?"s":""}. Refreshed account state.`);return}if(r>0){k.success(`Confirmed explicit sync mode for ${r} legacy account${r>1?"s":""}`);return}k.info("No legacy accounts need confirmation")},onError:r=>{s.invalidateQueries({queryKey:["accounts"]}),k.error(r.message)}})}const oe=64,st=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:s,groupSummaries:r,plainCcsLane:t,onClose:u}){const{t:a}=z(),i=be(),[c,p]=C.useState(s.context_mode==="shared"?"shared":"isolated"),[n,h]=C.useState(s.context_group||"default"),[m,y]=C.useState(s.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),l=C.useMemo(()=>r.find(g=>g.group===x),[r,x]),N=x.length>0&&x.length<=oe&&st.test(x),o=c==="isolated"||N,d=c==="shared"?Math.max((l?.sharedCount??0)-(s.context_mode==="shared"&&s.context_group===x?1:0),0):0,f=c==="shared"?Math.max((l?.deeperCount??0)-(s.continuity_mode==="deeper"&&s.context_group===x?1:0),0):0,v=t?.account_name===s.name,j=!!t&&!v,S=`ccs auth default ${s.name}`,_=`ccs auth backup ${s.name}`,w=(g,K,G,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=G.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+G.length)%G.length;H(G[Ne])},L=t?t.kind==="native"?a("continuityOverview.lane.native"):t.kind==="account-default"?a("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?a("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?a("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",A=()=>{o&&i.mutate({name:s.name,context_mode:c,context_group:c==="shared"?x:void 0,continuity_mode:c==="shared"?m:void 0},{onSuccess:()=>{u()}})},B=g=>{g||u()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:a("editAccountContext.title")}),e.jsx(he,{children:a("editAccountContext.description",{name:s.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:a("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":a("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="isolated",tabIndex:c==="isolated"?0:-1,onClick:()=>p("isolated"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="shared",tabIndex:c==="shared"?0:-1,onClick:()=>p("shared"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:a(c==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:a("editAccountContext.historySyncGroup")}),e.jsx(X,{id:"context-group",value:n,onChange:g=>h(g.target.value),placeholder:a("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:a("editAccountContext.invalidGroup")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:a("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":a("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:a(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:a("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:a("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:s.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:_}),e.jsx(D,{value:_,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:S}),e.jsx(D,{value:S,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${c==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[c==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[c==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:a("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:a("editAccountContext.sameGroupRule",{group:x})})," ",d>0?a("editAccountContext.sameGroupPeerCount",{count:d}):a("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?a("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:a("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${c==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:a("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:u,disabled:i.isPending,children:a("editAccountContext.cancel")}),e.jsx(b,{onClick:A,disabled:!o||i.isPending,children:i.isPending?a("editAccountContext.saving"):a("editAccountContext.save")})]})]})})}function ce({data:s,defaultAccount:r,groupSummaries:t,plainCcsLane:u}){const{t:a}=z(),i=Ye(),c=tt(),p=et(),n=be(),[h,m]=C.useState(null),[y,x]=C.useState(null),l=[{accessorKey:"name",header:a("accountsTable.name"),size:200,cell:({row:o})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:o.original.name}),o.original.name===r&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:a("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:a("accountsTable.type"),size:100,cell:({row:o})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:o.original.type||"oauth"})},{accessorKey:"created",header:a("accountsTable.created"),size:150,cell:({row:o})=>{const d=new Date(o.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:a("accountsTable.lastUsed"),size:150,cell:({row:o})=>{if(!o.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(o.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:a("accountsTable.historySync"),size:170,cell:({row:o})=>{if(o.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((o.original.context_mode||"isolated")==="shared"){const f=o.original.context_group||"default",v=o.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(P,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:a(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:o.original.sameGroupPeerCount>0?a("accountsTable.sameGroupPeerCount",{count:o.original.sameGroupPeerCount}):a("accountsTable.noSameGroupPeer")})]})}return o.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(P,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:a("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:a("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(P,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:a("accountsTable.badges.isolated")})})}},{id:"actions",header:a("accountsTable.actions"),size:220,cell:({row:o})=>{const d=o.original.name===r,f=i.isPending||c.isPending||n.isPending,v=o.original.type==="cliproxy",j=o.original.context_inferred||o.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(o.original),title:a("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),a("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:o.original.name,context_mode:o.original.context_mode==="shared"?"shared":"isolated",context_group:o.original.context_mode==="shared"?o.original.context_group||"default":void 0,continuity_mode:o.original.context_mode==="shared"?o.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:a("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),a("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>i.mutate(o.original.name),children:[e.jsx(J,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),a(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(o.original.name),title:a(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:s,columns:l,getCoreRowModel:we()});return s.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:a("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(o=>e.jsx(te,{children:o.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},o.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(o=>e.jsx(te,{children:o.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},o.id))})]})}),r&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),a("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:u,onClose:()=>x(null)}),e.jsx(ze,{open:!!h,onOpenChange:o=>!o&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:a("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:a("accountsTable.deleteDialogDesc",{name:h??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:a("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{h&&(c.mutate(h),m(null))},children:a("accountsTable.delete")})]})]})})]})}const V=({titleKey:s,descKey:r})=>{const{t}=z();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(s),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Re,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(s)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(r)})]})]})};function ie({totalAccounts:s,primaryAccountName:r,isolatedCount:t,sharedStandardCount:u,deeperSharedCount:a,sharedAloneCount:i,sharedPeerAccountCount:c,deeperReadyAccountCount:p,sharedPeerGroups:n,deeperReadyGroups:h,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:l}=z(),N=x?x.kind==="native"?l("continuityOverview.lane.native"):x.kind==="account-default"?l("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?l("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?l("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",o=s<2?"single":n.length===0?t===s?"isolated":"shared-alone":h.length===0?"shared-standard":t>0||i>0||p<c||h.length<n.length?"partial":"ready",d=h[0]||n[0]||"default",f=h.length>0&&(t>0||u>0||n.length>h.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(Y,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(Y,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[o],S=!!r&&x?.account_name===r,_=s>0&&!!x&&(!r||!S),w=s>1&&o!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:l(`continuityReadiness.messages.${o}.title`,{group:d})}),e.jsx(P,{variant:o==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:l(`continuityReadiness.state.${o}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:l(`continuityReadiness.messages.${o}.description`,{group:d,count:i})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(P,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:l("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(P,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:l("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&h.length===0&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.partialBadge",{group:d})})]})]})}),(_||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[_&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),r?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${r}`}),e.jsx(D,{value:`ccs auth default ${r}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:l("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:l("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:l("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:l("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:l("historySyncLearningMap.isolated")}),e.jsx(V,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:l("historySyncLearningMap.shared")}),e.jsx(V,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:u})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:l("historySyncLearningMap.deeper")}),e.jsx(V,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:a})]})]})]})}const le=64;function rt({open:s,onClose:r}){const{t}=z(),[u,a]=C.useState(""),[i,c]=C.useState(!1),[p,n]=C.useState(""),[h,m]=C.useState(!1),[y,x]=C.useState(!1),l=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(u),N=p.trim().toLowerCase().replace(/\s+/g,"-"),o=N.length===0||N.length<=le&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=u&&l?[`ccs auth create ${u}`,i?N.length>0?`--context-group ${N}`:"--share-context":"",i&&h?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!l||i&&!o||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{a(""),c(!1),n(""),m(!1),x(!1),r()};return e.jsx(de,{open:s,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(X,{id:"profile-name",value:u,onChange:j=>a(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),u&&!l&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:i,onCheckedChange:j=>c(j===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),i&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(X,{id:"context-group",value:p,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:h,onCheckedChange:j=>m(j===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),p.trim().length>0&&!o&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:le})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Ve,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!l||i&&!o,children:y?e.jsx(J,{className:"w-4 h-4 text-green-500"}):e.jsx(ae,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!l||i&&!o,children:y?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:s}=z(),r=ve(),{data:t,isLoading:u}=Je(),a=at(),[i,c]=C.useState(!1),p=t?.accounts||[],n=t?.cliproxyCount||0,h=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,l=t?.deeperSharedCount||0,N=t?.isolatedCount||0,o=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],S=t?.sharedGroups||[],_=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=p.filter(H=>H.context_inferred||H.continuity_inferred),A=L.length,B=A>0,g=()=>r("/cliproxy?provider=claude"),K=()=>r("/cliproxy?provider=claude&action=auth"),G=()=>a.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Xe,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:s("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.manageSuffix")]})]}),e.jsx(Oe,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>c(!0),children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),s("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),s("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[s("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("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(Y,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:s("accountsPage.legacyContextPending",{count:h})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:s("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:G,disabled:a.isPending||A===0,children:a.isPending?s("accountsPage.confirmingLegacy"):s("accountsPage.confirmLegacy",{count:A})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:s("accountsPage.noLegacyFollowup")}),e.jsxs(M,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:s("accountsPage.quickCommands")}),e.jsx(Q,{children:s("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(D,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(D,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{variant:"outline",children:s("accountsPage.workspaceBadge")}),e.jsx(P,{variant:"secondary",children:s("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:s("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[s("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:s("accountsTable.sync")}),s("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:s("accountsPage.accountMatrix")}),e.jsx(Q,{children:s("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:s("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:s("accountsPage.title")}),e.jsxs(Q,{children:[s("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>c(!0),children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),s("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[s("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[s("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:G,disabled:a.isPending||A===0,children:a.isPending?s("accountsPage.confirmingLegacy"):s("accountsPage.confirmLegacy",{count:A})})]})]}),e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:s("accountsPage.accountMatrix")})}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:s("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]}),e.jsx(rt,{open:i,onClose:()=>c(!1)})]})}export{bt as AccountsPage};
1
+ import{j as e}from"./radix-ui-BlliRfHq.js";import{r as C,h as ve}from"./react-vendor-CNOkPC89.js";import{u as Ce,a as $,b as F,e as ke,f as ee,g as we}from"./tanstack-BjiH4QZq.js";import{T as Pe,a as Ae,b as te,c as De,d as _e,e as Te}from"./table-7YfVdOmB.js";import{q as O,a as z,D as de,j as ue,k as xe,l as me,m as he,L as T,I as X,E as D,aw as Se,d as b,B as P,C as M,b as R,e as Ge,f as Me,g as Re,A as Oe,o as I,p as q,a2 as Q}from"./index-DI-8QF69.js";import{A as ze,a as $e,b as Fe,c as Le,d as Ke,e as He,f as Ie,g as qe}from"./alert-dialog-DDRA-1Pt.js";import{t as k}from"./notifications-B2HqRBj7.js";import{aT as W,aU as E,aV as pe,ay as ge,Q as fe,aW as Ee,aX as Ue,k as J,aj as Be,J as Qe,au as U,T as Y,v as Ze,V as Ve,m as ae,U as Xe,a5 as se,Z as ne}from"./icons-CQ3MLSan.js";import{C as re}from"./checkbox-2A_GWLUb.js";import"./utils-CzKF5WmX.js";import"./form-utils-Bcoyqxpq.js";import"./code-highlight-BRUf_pqB.js";function Z(s){return Array.from(s).sort((r,t)=>r.localeCompare(t))}function We(s){const r=new Map;for(const n of s){if(n.context_mode!=="shared")continue;const h=n.context_group||"default",m=r.get(h)??{group:h,sharedCount:0,deeperCount:0,accountNames:[]};m.sharedCount+=1,m.accountNames.push(n.name),n.continuity_mode==="deeper"&&(m.deeperCount+=1),r.set(h,m)}const t=Array.from(r.values()).sort((n,h)=>n.group.localeCompare(h.group)),u=s.map(n=>{if(n.context_mode!=="shared")return{...n,sameGroupPeerCount:0,sameGroupDeeperPeerCount:0};const h=n.context_group||"default",m=r.get(h),y=Math.max((m?.sharedCount??1)-1,0),x=Math.max((m?.deeperCount??0)-(n.continuity_mode==="deeper"?1:0),0);return{...n,sameGroupPeerCount:y,sameGroupDeeperPeerCount:x}}),a=u.filter(n=>n.context_mode==="shared").length,i=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode==="deeper").length,c=u.filter(n=>n.context_inferred).length,p=u.filter(n=>n.context_mode==="shared"&&n.continuity_mode!=="deeper"&&n.continuity_inferred).length;return{accounts:u,sharedCount:a,sharedStandardCount:Math.max(a-i,0),deeperSharedCount:i,isolatedCount:u.length-a,legacyContextCount:c,legacyContinuityCount:p,sharedAloneCount:u.filter(n=>n.context_mode==="shared"&&n.sameGroupPeerCount===0).length,sharedPeerAccountCount:u.filter(n=>n.sameGroupPeerCount>0).length,deeperReadyAccountCount:u.filter(n=>n.continuity_mode==="deeper"&&n.sameGroupDeeperPeerCount>0).length,sharedPeerGroups:Z(t.filter(n=>n.sharedCount>=2).map(n=>n.group)),deeperReadyGroups:Z(t.filter(n=>n.deeperCount>=2).map(n=>n.group)),sharedGroups:Z(t.map(n=>n.group)),groupSummaries:t}}function Je(){return Ce({queryKey:["accounts"],queryFn:()=>O.accounts.list(),select:s=>{const r=s.accounts.filter(i=>i.type!=="cliproxy"),t=We(r),u=s.accounts.length-r.length,a=t.accounts.some(i=>i.name===s.default)?s.default:null;return{accounts:t.accounts,default:a,cliproxyCount:u,legacyContextCount:t.legacyContextCount,legacyContinuityCount:t.legacyContinuityCount,sharedCount:t.sharedCount,sharedStandardCount:t.sharedStandardCount,deeperSharedCount:t.deeperSharedCount,isolatedCount:t.isolatedCount,sharedAloneCount:t.sharedAloneCount,sharedPeerAccountCount:t.sharedPeerAccountCount,deeperReadyAccountCount:t.deeperReadyAccountCount,sharedPeerGroups:t.sharedPeerGroups,deeperReadyGroups:t.deeperReadyGroups,sharedGroups:t.sharedGroups,groupSummaries:t.groupSummaries,plainCcsLane:s.plain_ccs_lane??null}}})}function Ye(){const s=$();return F({mutationFn:r=>O.accounts.setDefault(r),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]}),k.success(`Default account set to "${t}"`)},onError:r=>{k.error(r.message)}})}function et(){const s=$();return F({mutationFn:()=>O.accounts.resetDefault(),onSuccess:()=>{s.invalidateQueries({queryKey:["accounts"]}),k.success("Default account reset to CCS")},onError:r=>{k.error(r.message)}})}function tt(){const s=$();return F({mutationFn:r=>O.accounts.delete(r),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]}),k.success(`Account "${t}" deleted`)},onError:r=>{k.error(r.message)}})}function be(){const s=$();return F({mutationFn:({name:r,context_mode:t,context_group:u,continuity_mode:a})=>O.accounts.updateContext(r,{context_mode:t,context_group:u,continuity_mode:a}),onSuccess:(r,t)=>{s.invalidateQueries({queryKey:["accounts"]});const u=t.context_mode==="shared"?t.continuity_mode==="deeper"?`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, deeper continuity)`:`shared (${(t.context_group||"default").trim().toLowerCase().replace(/\s+/g,"-")}, standard)`:"isolated";k.success(`Updated "${t.name}" context to ${u}`)},onError:r=>{k.error(r.message)}})}function at(){const s=$();return F({mutationFn:async r=>{const t=r.filter(i=>i.context_inferred||i.continuity_inferred),a=(await Promise.allSettled(t.map(i=>{const c=i.context_mode==="shared";return O.accounts.updateContext(i.name,{context_mode:c?"shared":"isolated",context_group:c?i.context_group||"default":void 0,continuity_mode:c?i.continuity_mode==="deeper"?"deeper":"standard":void 0})}))).filter(i=>i.status==="rejected").length;return{updatedCount:t.length-a,failedCount:a}},onSuccess:({updatedCount:r,failedCount:t})=>{if(s.invalidateQueries({queryKey:["accounts"]}),t>0&&r>0){k.error(`Confirmed ${r} legacy account${r>1?"s":""}, but ${t} update${t>1?"s":""} failed. Refreshed account state.`);return}if(t>0){k.error(`Failed to confirm ${t} legacy account${t>1?"s":""}. Refreshed account state.`);return}if(r>0){k.success(`Confirmed explicit sync mode for ${r} legacy account${r>1?"s":""}`);return}k.info("No legacy accounts need confirmation")},onError:r=>{s.invalidateQueries({queryKey:["accounts"]}),k.error(r.message)}})}const oe=64,st=/^[a-zA-Z][a-zA-Z0-9_-]*$/;function nt({account:s,groupSummaries:r,plainCcsLane:t,onClose:u}){const{t:a}=z(),i=be(),[c,p]=C.useState(s.context_mode==="shared"?"shared":"isolated"),[n,h]=C.useState(s.context_group||"default"),[m,y]=C.useState(s.continuity_mode==="deeper"?"deeper":"standard"),x=C.useMemo(()=>n.trim().toLowerCase().replace(/\s+/g,"-"),[n]),l=C.useMemo(()=>r.find(g=>g.group===x),[r,x]),N=x.length>0&&x.length<=oe&&st.test(x),o=c==="isolated"||N,d=c==="shared"?Math.max((l?.sharedCount??0)-(s.context_mode==="shared"&&s.context_group===x?1:0),0):0,f=c==="shared"?Math.max((l?.deeperCount??0)-(s.continuity_mode==="deeper"&&s.context_group===x?1:0),0):0,v=t?.account_name===s.name,j=!!t&&!v,S=`ccs auth default ${s.name}`,_=`ccs auth backup ${s.name}`,w=(g,K,G,H)=>{if(!["ArrowLeft","ArrowRight","ArrowUp","ArrowDown"].includes(g.key))return;g.preventDefault();const je=G.indexOf(K),ye=g.key==="ArrowLeft"||g.key==="ArrowUp"?-1:1,Ne=(je+ye+G.length)%G.length;H(G[Ne])},L=t?t.kind==="native"?a("continuityOverview.lane.native"):t.kind==="account-default"?a("continuityOverview.lane.accountDefault",{name:t.account_name||""}):t.kind==="account-inherited"?a("continuityOverview.lane.accountInherited",{name:t.account_name||""}):t.kind==="profile-default"?a("continuityOverview.lane.profileDefault",{name:t.profile_name||"default"}):t.label:"",A=()=>{o&&i.mutate({name:s.name,context_mode:c,context_group:c==="shared"?x:void 0,continuity_mode:c==="shared"?m:void 0},{onSuccess:()=>{u()}})},B=g=>{g||u()};return e.jsx(de,{open:!0,onOpenChange:B,children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:a("editAccountContext.title")}),e.jsx(he,{children:a("editAccountContext.description",{name:s.name})})]}),e.jsxs("div",{className:"space-y-4 py-2",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:a("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":a("editAccountContext.syncMode"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="isolated",tabIndex:c==="isolated"?0:-1,onClick:()=>p("isolated"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="isolated"?"bg-background text-blue-600 dark:text-blue-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(W,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.isolatedOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":c==="shared",tabIndex:c==="shared"?0:-1,onClick:()=>p("shared"),onKeyDown:g=>w(g,c,["isolated","shared"],p),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${c==="shared"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.sharedOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:a(c==="isolated"?"editAccountContext.isolatedModeHint":"editAccountContext.sharedModeHint")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"context-group",children:a("editAccountContext.historySyncGroup")}),e.jsx(X,{id:"context-group",value:n,onChange:g=>h(g.target.value),placeholder:a("editAccountContext.groupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("editAccountContext.groupHint",{max:oe})}),!N&&e.jsx("p",{className:"text-xs text-destructive",children:a("editAccountContext.invalidGroup")})]}),c==="shared"&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("div",{className:"flex items-center justify-between",children:e.jsx(T,{className:"text-sm font-semibold",children:a("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":a("editAccountContext.continuityDepth"),children:[e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="standard",tabIndex:m==="standard"?0:-1,onClick:()=>y("standard"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="standard"?"bg-background text-emerald-600 dark:text-emerald-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(E,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.standardOption")})]}),e.jsxs("button",{type:"button",role:"radio","aria-checked":m==="deeper",tabIndex:m==="deeper"?0:-1,onClick:()=>y("deeper"),onKeyDown:g=>w(g,m,["standard","deeper"],y),className:`flex-1 flex justify-center items-center gap-2 px-3 py-1.5 rounded-[10px] text-sm font-medium transition-all duration-200 overflow-hidden ${m==="deeper"?"bg-background text-indigo-600 dark:text-indigo-400 shadow-sm ring-1 ring-border/50":"text-muted-foreground hover:text-foreground hover:bg-muted/50"}`,children:[e.jsx(pe,{className:"h-4 w-4 shrink-0"}),e.jsx("span",{className:"truncate",children:a("editAccountContext.deeperOption")})]})]}),e.jsx("p",{className:"text-xs text-muted-foreground pt-1 px-1",children:a(m==="standard"?"editAccountContext.standardHint":"editAccountContext.deeperHint")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:a("editAccountContext.credentialsIsolated")}),j&&e.jsx("div",{className:"rounded-[14px] border border-amber-200 bg-amber-50/50 p-4 text-xs shadow-sm dark:border-amber-900/40 dark:bg-amber-900/10",children:e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"font-medium text-foreground",children:a("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-muted-foreground leading-relaxed",children:a("continuityOverview.plainLaneDescription",{lane:L||"plain ccs",name:s.name})}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:_}),e.jsx(D,{value:_,size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:S}),e.jsx(D,{value:S,size:"icon"})]})]})]})}),e.jsx("div",{className:`rounded-[14px] border p-4 text-xs shadow-sm transition-colors ${c==="isolated"?"bg-blue-50/50 border-blue-200 dark:bg-blue-900/10 dark:border-blue-800/40":"bg-muted/40 border-border/60"}`,children:e.jsxs("div",{className:"flex items-start gap-3",children:[c==="isolated"?e.jsx(ge,{className:"h-4 w-4 text-blue-500 mt-0.5 shrink-0"}):e.jsx(fe,{className:"h-4 w-4 text-muted-foreground mt-0.5 shrink-0"}),e.jsxs("div",{className:"space-y-1.5 flex-1 text-muted-foreground leading-relaxed",children:[c==="isolated"?e.jsx("p",{className:"text-foreground font-medium selection:bg-blue-200",children:a("editAccountContext.isolatedImplication")}):e.jsxs(e.Fragment,{children:[e.jsxs("p",{children:[e.jsx("span",{className:"text-foreground font-medium",children:a("editAccountContext.sameGroupRule",{group:x})})," ",d>0?a("editAccountContext.sameGroupPeerCount",{count:d}):a("editAccountContext.noSameGroupPeer")]}),m==="deeper"&&e.jsx("p",{children:f>0?a("editAccountContext.deeperReady",{count:f}):e.jsx("span",{className:"text-amber-600 dark:text-amber-500",children:a("editAccountContext.deeperNeedsPeers")})})]}),e.jsx("p",{className:`pt-1.5 text-[11px] ${c==="isolated"?"text-blue-700/70 dark:text-blue-300/60":"text-muted-foreground/70"}`,children:a("editAccountContext.resumeOriginalWarning")})]})]})})]}),e.jsxs(Se,{children:[e.jsx(b,{variant:"outline",onClick:u,disabled:i.isPending,children:a("editAccountContext.cancel")}),e.jsx(b,{onClick:A,disabled:!o||i.isPending,children:i.isPending?a("editAccountContext.saving"):a("editAccountContext.save")})]})]})})}function ce({data:s,defaultAccount:r,groupSummaries:t,plainCcsLane:u}){const{t:a}=z(),i=Ye(),c=tt(),p=et(),n=be(),[h,m]=C.useState(null),[y,x]=C.useState(null),l=[{accessorKey:"name",header:a("accountsTable.name"),size:200,cell:({row:o})=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-medium",children:o.original.name}),o.original.name===r&&e.jsx("span",{className:"text-xs bg-primary/10 text-primary px-1.5 py-0.5 rounded border border-primary/20",children:a("accountsTable.defaultBadge")})]})},{accessorKey:"type",header:a("accountsTable.type"),size:100,cell:({row:o})=>e.jsx("span",{className:"capitalize text-muted-foreground",children:o.original.type||"oauth"})},{accessorKey:"created",header:a("accountsTable.created"),size:150,cell:({row:o})=>{const d=new Date(o.original.created);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{accessorKey:"last_used",header:a("accountsTable.lastUsed"),size:150,cell:({row:o})=>{if(!o.original.last_used)return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});const d=new Date(o.original.last_used);return e.jsx("span",{className:"text-muted-foreground",children:d.toLocaleDateString()})}},{id:"context",header:a("accountsTable.historySync"),size:170,cell:({row:o})=>{if(o.original.type==="cliproxy")return e.jsx("span",{className:"text-muted-foreground/50",children:"-"});if((o.original.context_mode||"isolated")==="shared"){const f=o.original.context_group||"default",v=o.original.continuity_mode==="deeper";return e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsxs("div",{className:"flex items-center gap-1.5 flex-wrap",children:[e.jsx(P,{variant:"outline",className:`font-mono text-[10px] uppercase px-1.5 py-0 border ${v?"text-indigo-700 border-indigo-300/60 bg-indigo-50/50 dark:text-indigo-300 dark:border-indigo-900/40 dark:bg-indigo-900/20":"text-emerald-700 border-emerald-300/60 bg-emerald-50/50 dark:text-emerald-300 dark:border-emerald-900/40 dark:bg-emerald-900/20"}`,children:a(v?"accountsTable.badges.deeper":"accountsTable.badges.shared")}),e.jsx("span",{className:"text-xs font-semibold text-foreground/80",children:f})]}),e.jsx("p",{className:"text-[10px] text-muted-foreground whitespace-nowrap",children:o.original.sameGroupPeerCount>0?a("accountsTable.sameGroupPeerCount",{count:o.original.sameGroupPeerCount}):a("accountsTable.noSameGroupPeer")})]})}return o.original.context_inferred?e.jsxs("div",{className:"flex flex-col items-start gap-1",children:[e.jsx(P,{variant:"outline",className:"text-amber-700 border-amber-300/60 bg-amber-50/50 dark:text-amber-400 dark:border-amber-900/40 dark:bg-amber-900/20 font-mono text-[10px] uppercase px-1.5 py-0",children:a("accountsTable.badges.legacy")}),e.jsx("p",{className:"text-[10px] text-amber-700/80 dark:text-amber-400/80 whitespace-nowrap",children:a("accountsTable.legacyReview")})]}):e.jsx("div",{className:"flex flex-col items-start gap-1.5",children:e.jsx(P,{variant:"secondary",className:"font-mono text-[10px] uppercase px-1.5 py-0 text-muted-foreground bg-muted/60 border-transparent shadow-none",children:a("accountsTable.badges.isolated")})})}},{id:"actions",header:a("accountsTable.actions"),size:220,cell:({row:o})=>{const d=o.original.name===r,f=i.isPending||c.isPending||n.isPending,v=o.original.type==="cliproxy",j=o.original.context_inferred||o.original.continuity_inferred;return e.jsxs("div",{className:"flex items-center gap-1",children:[!v&&e.jsxs(b,{variant:"outline",size:"sm",className:"h-8 px-2",disabled:f,onClick:()=>x(o.original),title:a("accountsTable.syncTitle"),children:[e.jsx(Ee,{className:"w-3.5 h-3.5 mr-1"}),a("accountsTable.sync")]}),!v&&j&&e.jsxs(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-amber-700 hover:text-amber-700 hover:bg-amber-500/10 dark:text-amber-400 dark:hover:text-amber-400",disabled:f,onClick:()=>n.mutate({name:o.original.name,context_mode:o.original.context_mode==="shared"?"shared":"isolated",context_group:o.original.context_mode==="shared"?o.original.context_group||"default":void 0,continuity_mode:o.original.context_mode==="shared"?o.original.continuity_mode==="deeper"?"deeper":"standard":void 0}),title:a("accountsTable.confirmLegacyTitle"),children:[e.jsx(Ue,{className:"w-3 h-3 mr-1"}),a("accountsTable.confirm")]}),e.jsxs(b,{variant:d?"secondary":"default",size:"sm",className:"h-8 px-2",disabled:d||f,onClick:()=>i.mutate(o.original.name),children:[e.jsx(J,{className:`w-3 h-3 mr-1 ${d?"opacity-50":""}`}),a(d?"accountsTable.active":"accountsTable.setDefault")]}),e.jsx(b,{variant:"ghost",size:"sm",className:"h-8 px-2 text-destructive hover:text-destructive hover:bg-destructive/10",disabled:d||f,onClick:()=>m(o.original.name),title:a(d?"accountsTable.cannotDeleteDefault":"accountsTable.deleteAccount"),children:e.jsx(Be,{className:"w-4 h-4"})})]})}}],N=ke({data:s,columns:l,getCoreRowModel:we()});return s.length===0?e.jsx("div",{className:"text-center py-8 text-muted-foreground",children:a("accountsTable.noAccounts")}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"space-y-4",children:[e.jsx("div",{className:"border rounded-md",children:e.jsxs(Pe,{children:[e.jsx(Ae,{children:N.getHeaderGroups().map(o=>e.jsx(te,{children:o.headers.map(d=>{const f={name:"w-[200px]",type:"w-[100px]",created:"w-[150px]",last_used:"w-[150px]",context:"w-[170px]",actions:"w-[290px]"}[d.id]||"w-auto";return e.jsx(De,{className:f,children:d.isPlaceholder?null:ee(d.column.columnDef.header,d.getContext())},d.id)})},o.id))}),e.jsx(_e,{children:N.getRowModel().rows.map(o=>e.jsx(te,{children:o.getVisibleCells().map(d=>e.jsx(Te,{children:ee(d.column.columnDef.cell,d.getContext())},d.id))},o.id))})]})}),r&&e.jsx("div",{className:"flex justify-end",children:e.jsxs(b,{variant:"outline",size:"sm",onClick:()=>p.mutate(),disabled:p.isPending,children:[e.jsx(Qe,{className:"w-4 h-4 mr-2"}),a("accountsTable.resetToDefault")]})})]}),y&&e.jsx(nt,{account:y,groupSummaries:t,plainCcsLane:u,onClose:()=>x(null)}),e.jsx(ze,{open:!!h,onOpenChange:o=>!o&&m(null),children:e.jsxs($e,{children:[e.jsxs(Fe,{children:[e.jsx(Le,{children:a("accountsTable.deleteDialogTitle")}),e.jsx(Ke,{children:a("accountsTable.deleteDialogDesc",{name:h??""})})]}),e.jsxs(He,{children:[e.jsx(Ie,{children:a("accountsTable.cancel")}),e.jsx(qe,{className:"bg-destructive text-destructive-foreground hover:bg-destructive/90",onClick:()=>{h&&(c.mutate(h),m(null))},children:a("accountsTable.delete")})]})]})})]})}const V=({titleKey:s,descKey:r})=>{const{t}=z();return e.jsxs(Ge,{children:[e.jsx(Me,{asChild:!0,children:e.jsx(b,{variant:"ghost",size:"icon","aria-label":t(s),className:"h-5 w-5 rounded-full hover:bg-muted text-muted-foreground/70 transition-colors",children:e.jsx(fe,{className:"h-3 w-3"})})}),e.jsxs(Re,{className:"w-72 p-4 rounded-xl shadow-lg border-border/50 text-sm",side:"top",align:"center",children:[e.jsx("p",{className:"font-semibold tracking-tight",children:t(s)}),e.jsx("p",{className:"mt-1.5 text-muted-foreground leading-relaxed",children:t(r)})]})]})};function ie({totalAccounts:s,primaryAccountName:r,isolatedCount:t,sharedStandardCount:u,deeperSharedCount:a,sharedAloneCount:i,sharedPeerAccountCount:c,deeperReadyAccountCount:p,sharedPeerGroups:n,deeperReadyGroups:h,legacyTargetCount:m,cliproxyCount:y,plainCcsLane:x}){const{t:l}=z(),N=x?x.kind==="native"?l("continuityOverview.lane.native"):x.kind==="account-default"?l("continuityOverview.lane.accountDefault",{name:x.account_name||""}):x.kind==="account-inherited"?l("continuityOverview.lane.accountInherited",{name:x.account_name||""}):x.kind==="profile-default"?l("continuityOverview.lane.profileDefault",{name:x.profile_name||"default"}):x.label:"",o=s<2?"single":n.length===0?t===s?"isolated":"shared-alone":h.length===0?"shared-standard":t>0||i>0||p<c||h.length<n.length?"partial":"ready",d=h[0]||n[0]||"default",f=h.length>0&&(t>0||u>0||n.length>h.length),j={ready:e.jsx(Ze,{className:"h-6 w-6 text-emerald-600 dark:text-emerald-400"}),"shared-standard":e.jsx(E,{className:"h-6 w-6 text-blue-600 dark:text-blue-400"}),single:e.jsx(ge,{className:"h-6 w-6 text-stone-400"}),isolated:e.jsx(W,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),"shared-alone":e.jsx(Y,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"}),partial:e.jsx(Y,{className:"h-6 w-6 text-amber-600 dark:text-amber-400"})}[o],S=!!r&&x?.account_name===r,_=s>0&&!!x&&(!r||!S),w=s>1&&o!=="ready";return e.jsxs("div",{className:"flex flex-col gap-4",children:[e.jsx(M,{className:"flex flex-col justify-between overflow-hidden relative group p-0 border-border bg-card shadow-sm hover:shadow-md transition-shadow duration-300",children:e.jsxs(R,{className:"p-6 flex flex-col h-full bg-gradient-to-br from-card to-muted/20 space-y-4",children:[e.jsx("div",{className:"flex items-start justify-between gap-4",children:e.jsxs("div",{className:"flex flex-col sm:flex-row sm:items-start gap-4",children:[e.jsx("div",{className:"rounded-2xl bg-background p-3 shadow-sm ring-1 ring-border/50 self-start shrink-0",children:j}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("h3",{className:"text-lg font-semibold tracking-tight",children:l(`continuityReadiness.messages.${o}.title`,{group:d})}),e.jsx(P,{variant:o==="ready"?"default":"secondary",className:"rounded-full px-2.5 py-0.5 font-medium shadow-sm",children:l(`continuityReadiness.state.${o}`)})]}),e.jsx("p",{className:"text-sm text-muted-foreground max-w-lg leading-relaxed",children:l(`continuityReadiness.messages.${o}.description`,{group:d,count:i})})]})]})}),e.jsxs("div",{className:"mt-auto pt-4 flex flex-wrap items-center gap-2",children:[y>0&&e.jsx(P,{variant:"outline",className:"text-blue-700 bg-blue-50/50 border-blue-200/60 dark:border-blue-900/40 dark:bg-blue-900/20 dark:text-blue-300",children:l("historySyncLearningMap.cliproxyManaged",{count:y})}),m>0&&e.jsx(P,{variant:"outline",className:"text-amber-700 bg-amber-50/50 border-amber-200/60 dark:border-amber-900/40 dark:bg-amber-900/20 dark:text-amber-300",children:l("historySyncLearningMap.legacyConfirmation",{count:m})}),n.length>0&&h.length===0&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.recommendBadge",{group:d})}),f&&e.jsx(P,{variant:"secondary",className:"font-mono text-[11px] px-2 bg-muted/50 text-muted-foreground border-transparent",children:l("continuityOverview.partialBadge",{group:d})})]})]})}),(_||w)&&e.jsx(M,{className:"border-dashed",children:e.jsxs(R,{className:"p-5 space-y-4",children:[_&&e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityOverview.plainLaneTitle")}),e.jsx("p",{className:"text-sm text-muted-foreground",children:l("continuityOverview.plainLaneDescription",{lane:N||"plain ccs"})})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs -r"}),e.jsx(D,{value:"ccs -r",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth backup default"}),e.jsx(D,{value:"ccs auth backup default",size:"icon"})]}),r?e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:`ccs auth default ${r}`}),e.jsx(D,{value:`ccs auth default ${r}`,size:"icon"})]}):e.jsx("p",{className:"text-xs text-muted-foreground",children:l("continuityOverview.setDefaultHint")})]})]}),w&&e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-sm font-semibold text-foreground",children:l("continuityReadiness.stepsTitle")}),e.jsxs("ol",{className:"space-y-1 pl-5 text-sm text-muted-foreground",children:[e.jsx("li",{children:l("continuityReadiness.steps.syncBoth")}),e.jsx("li",{children:l("continuityReadiness.steps.sameGroup",{group:d})}),e.jsx("li",{children:l("continuityReadiness.steps.enableDeeper")}),e.jsx("li",{children:l("continuityReadiness.steps.resumeOriginal")})]})]})]})}),e.jsxs("div",{className:"flex flex-col md:flex-row items-center gap-3",children:[e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-blue-300/40 bg-blue-50/50 dark:border-blue-900/30 dark:bg-blue-900/10 shadow-sm transition-colors hover:bg-blue-100/40 dark:hover:bg-blue-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(W,{className:"h-4 w-4 text-blue-700/80 dark:text-blue-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-blue-900 dark:text-blue-200",children:l("historySyncLearningMap.isolated")}),e.jsx(V,{titleKey:"accountsPage.isolated",descKey:"accountsPage.isolatedDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-blue-900 dark:text-blue-200",children:t})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-emerald-300/40 bg-emerald-50/50 dark:border-emerald-900/30 dark:bg-emerald-900/10 shadow-sm transition-colors hover:bg-emerald-100/40 dark:hover:bg-emerald-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(E,{className:"h-4 w-4 text-emerald-700/80 dark:text-emerald-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-emerald-900 dark:text-emerald-200",children:l("historySyncLearningMap.shared")}),e.jsx(V,{titleKey:"accountsPage.sharedStandard",descKey:"accountsPage.sharedStandardDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-emerald-900 dark:text-emerald-200",children:u})]}),e.jsx(U,{className:"hidden md:block h-4 w-4 text-muted-foreground/40 shrink-0"}),e.jsxs("div",{className:"flex-1 w-full flex items-center justify-between p-3.5 rounded-xl border border-indigo-300/40 bg-indigo-50/50 dark:border-indigo-900/30 dark:bg-indigo-900/10 shadow-sm transition-colors hover:bg-indigo-100/40 dark:hover:bg-indigo-900/20",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(pe,{className:"h-4 w-4 text-indigo-700/80 dark:text-indigo-400/80"}),e.jsx("span",{className:"text-xs font-semibold uppercase tracking-wider text-indigo-900 dark:text-indigo-200",children:l("historySyncLearningMap.deeper")}),e.jsx(V,{titleKey:"accountsPage.sharedDeeper",descKey:"accountsPage.sharedDeeperDesc"})]}),e.jsx("span",{className:"text-lg font-mono font-bold text-indigo-900 dark:text-indigo-200",children:a})]})]})]})}const le=64;function rt({open:s,onClose:r}){const{t}=z(),[u,a]=C.useState(""),[i,c]=C.useState(!1),[p,n]=C.useState(""),[h,m]=C.useState(!1),[y,x]=C.useState(!1),l=/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(u),N=p.trim().toLowerCase().replace(/\s+/g,"-"),o=N.length===0||N.length<=le&&/^[a-zA-Z][a-zA-Z0-9_-]*$/.test(N),d=u&&l?[`ccs auth create ${u}`,i?N.length>0?`--context-group ${N}`:"--share-context":"",i&&h?"--deeper-continuity":""].filter(Boolean).join(" "):t("createAuthProfileDialog.commandFallback"),f=async()=>{!l||i&&!o||(await navigator.clipboard.writeText(d),x(!0),setTimeout(()=>x(!1),2e3))},v=()=>{a(""),c(!1),n(""),m(!1),x(!1),r()};return e.jsx(de,{open:s,onOpenChange:j=>!j&&v(),children:e.jsxs(ue,{className:"sm:max-w-md",children:[e.jsxs(xe,{children:[e.jsx(me,{children:t("createAuthProfileDialog.title")}),e.jsx(he,{children:t("createAuthProfileDialog.description")})]}),e.jsxs("div",{className:"space-y-4 py-4",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{htmlFor:"profile-name",children:t("createAuthProfileDialog.profileName")}),e.jsx(X,{id:"profile-name",value:u,onChange:j=>a(j.target.value),placeholder:t("createAuthProfileDialog.profileNamePlaceholder"),autoComplete:"off"}),u&&!l&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidProfileName")})]}),e.jsxs("div",{className:"space-y-3",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(re,{id:"share-context",checked:i,onCheckedChange:j=>c(j===!0)}),e.jsx(T,{htmlFor:"share-context",className:"cursor-pointer",children:t("createAuthProfileDialog.enableSharedHistory")})]}),i&&e.jsxs("div",{className:"space-y-2 pl-6",children:[e.jsx(T,{htmlFor:"context-group",children:t("createAuthProfileDialog.historySyncGroupOptional")}),e.jsx(X,{id:"context-group",value:p,onChange:j=>n(j.target.value),placeholder:t("createAuthProfileDialog.historySyncGroupPlaceholder"),autoComplete:"off"}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.historySyncGroupHint")}),e.jsxs("div",{className:"flex items-center gap-2 pt-1",children:[e.jsx(re,{id:"deeper-continuity",checked:h,onCheckedChange:j=>m(j===!0)}),e.jsx(T,{htmlFor:"deeper-continuity",className:"cursor-pointer",children:t("createAuthProfileDialog.deeperContinuity")})]}),e.jsx("p",{className:"text-xs text-muted-foreground",children:t("createAuthProfileDialog.deeperContinuityHint")}),p.trim().length>0&&!o&&e.jsx("p",{className:"text-xs text-destructive",children:t("createAuthProfileDialog.invalidContextGroup",{max:le})})]})]}),e.jsxs("div",{className:"space-y-2",children:[e.jsx(T,{children:t("createAuthProfileDialog.command")}),e.jsxs("div",{className:"flex items-center gap-2 p-3 bg-muted rounded-md font-mono text-sm",children:[e.jsx(Ve,{className:"w-4 h-4 text-muted-foreground shrink-0"}),e.jsx("code",{className:"flex-1 break-all",children:d}),e.jsx(b,{variant:"ghost",size:"sm",className:"shrink-0 h-8 px-2",onClick:f,disabled:!l||i&&!o,children:y?e.jsx(J,{className:"w-4 h-4 text-green-500"}):e.jsx(ae,{className:"w-4 h-4"})})]})]}),e.jsxs("div",{className:"text-sm text-muted-foreground space-y-1",children:[e.jsx("p",{children:t("createAuthProfileDialog.afterRunPrefix")}),e.jsxs("ol",{className:"list-decimal list-inside pl-2 space-y-0.5",children:[e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep1")}),e.jsx("li",{children:t("createAuthProfileDialog.afterRunStep2")})]}),e.jsx("p",{className:"pt-1",children:t("createAuthProfileDialog.poolingHint")})]}),e.jsxs("div",{className:"flex justify-end gap-2 pt-2",children:[e.jsx(b,{variant:"ghost",onClick:v,children:t("createAuthProfileDialog.close")}),e.jsx(b,{onClick:f,disabled:!l||i&&!o,children:y?e.jsxs(e.Fragment,{children:[e.jsx(J,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copied")]}):e.jsxs(e.Fragment,{children:[e.jsx(ae,{className:"w-4 h-4 mr-2"}),t("createAuthProfileDialog.copyCommand")]})})]})]})]})})}function bt(){const{t:s}=z(),r=ve(),{data:t,isLoading:u}=Je(),a=at(),[i,c]=C.useState(!1),p=t?.accounts||[],n=t?.cliproxyCount||0,h=t?.legacyContextCount||0,m=t?.legacyContinuityCount||0,y=t?.sharedCount||0,x=t?.sharedStandardCount||0,l=t?.deeperSharedCount||0,N=t?.isolatedCount||0,o=t?.sharedAloneCount||0,d=t?.sharedPeerAccountCount||0,f=t?.deeperReadyAccountCount||0,v=t?.sharedPeerGroups||[],j=t?.deeperReadyGroups||[],S=t?.sharedGroups||[],_=t?.groupSummaries||[],w=t?.plainCcsLane||null,L=p.filter(H=>H.context_inferred||H.continuity_inferred),A=L.length,B=A>0,g=()=>r("/cliproxy?provider=claude"),K=()=>r("/cliproxy?provider=claude&action=auth"),G=()=>a.mutate(L);return e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"hidden h-full min-h-0 lg:flex",children:[e.jsxs("div",{className:"w-80 border-r flex flex-col bg-muted/20 shrink-0",children:[e.jsxs("div",{className:"p-4 border-b bg-background space-y-2",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(Xe,{className:"h-5 w-5 text-primary"}),e.jsx("h1",{className:"font-semibold",children:s("accountsPage.title")})]}),e.jsxs("p",{className:"text-xs text-muted-foreground",children:[s("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.manageSuffix")]})]}),e.jsx(Oe,{className:"flex-1",children:e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsxs("div",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("accountsPage.primaryActions")}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:()=>c(!0),children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),s("accountsPage.createAccount")]}),e.jsxs(b,{size:"sm",className:"w-full justify-start",onClick:K,children:[e.jsx(ne,{className:"w-4 h-4 mr-2"}),s("accountsPage.authClaudeInPool")]}),e.jsxs(b,{variant:"outline",size:"sm",className:"w-full justify-start",onClick:g,children:[s("accountsPage.openClaudePoolSettings"),e.jsx(U,{className:"w-4 h-4 ml-auto"})]})]}),B?e.jsxs("section",{className:"space-y-2",children:[e.jsx("p",{className:"text-[11px] font-medium uppercase tracking-wide text-muted-foreground",children:s("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(Y,{className:"h-4 w-4 mt-0.5 text-amber-700 dark:text-amber-400 shrink-0"}),e.jsxs("div",{className:"space-y-1 text-xs",children:[h>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:s("accountsPage.legacyContextPending",{count:h})}),m>0&&e.jsx("p",{className:"text-amber-800 dark:text-amber-300",children:s("accountsPage.legacyContinuityPending",{count:m})})]})]}),e.jsx(b,{variant:"secondary",size:"sm",className:"w-full justify-start",onClick:G,disabled:a.isPending||A===0,children:a.isPending?s("accountsPage.confirmingLegacy"):s("accountsPage.confirmLegacy",{count:A})})]})]}):e.jsx("div",{className:"rounded-md border bg-background px-3 py-2 text-xs text-muted-foreground",children:s("accountsPage.noLegacyFollowup")}),e.jsxs(M,{children:[e.jsxs(I,{className:"pb-2",children:[e.jsx(q,{className:"text-sm",children:s("accountsPage.quickCommands")}),e.jsx(Q,{children:s("accountsPage.quickCommandsDesc")})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs auth create work --context-group sprint-a --deeper-continuity"}),e.jsx(D,{value:"ccs auth create work --context-group sprint-a --deeper-continuity",size:"icon"})]}),e.jsxs("div",{className:"rounded-md border bg-background px-2 py-2 font-mono text-[11px] flex items-start gap-2",children:[e.jsx("span",{className:"flex-1 break-all",children:"ccs cliproxy auth claude"}),e.jsx(D,{value:"ccs cliproxy auth claude",size:"icon"})]})]})]})]})})]}),e.jsxs("div",{className:"flex-1 min-w-0 flex flex-col bg-background",children:[e.jsxs("div",{className:"px-5 py-4 border-b bg-background",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx(P,{variant:"outline",children:s("accountsPage.workspaceBadge")}),e.jsx(P,{variant:"secondary",children:s("accountsPage.historySyncBadge")})]}),e.jsx("h2",{className:"mt-2 text-xl font-semibold tracking-tight",children:s("accountsPage.authAccounts")}),e.jsxs("p",{className:"mt-1 text-sm text-muted-foreground",children:[s("accountsPage.tableScopePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.tableScopeMiddle"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:s("accountsTable.sync")}),s("accountsPage.tableScopeSuffix")]})]}),e.jsxs("div",{className:"flex-1 min-h-0 p-5 space-y-4 overflow-y-auto",children:[e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{className:"flex flex-col",children:[e.jsxs(I,{className:"pb-3",children:[e.jsx(q,{className:"text-lg",children:s("accountsPage.accountMatrix")}),e.jsx(Q,{children:s("accountsPage.sharedTotalDesc",{count:y})})]}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:s("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]})]})]}),e.jsxs("div",{className:"p-4 space-y-4 lg:hidden",children:[e.jsxs(M,{children:[e.jsxs(I,{children:[e.jsx(q,{className:"text-lg",children:s("accountsPage.title")}),e.jsxs(Q,{children:[s("accountsPage.managePrefix"),e.jsx("code",{className:"mx-1 rounded bg-muted px-1 py-0.5",children:"ccs auth"}),s("accountsPage.mobileManageSuffix")]})]}),e.jsxs(R,{className:"space-y-2",children:[e.jsxs(b,{className:"w-full",onClick:()=>c(!0),children:[e.jsx(se,{className:"w-4 h-4 mr-2"}),s("accountsPage.createAccount")]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:g,children:[s("accountsPage.openCliProxyClaudePool"),e.jsx(U,{className:"w-4 h-4 ml-2"})]}),e.jsxs(b,{variant:"outline",className:"w-full",onClick:K,children:[s("accountsPage.authClaudeInPool"),e.jsx(ne,{className:"w-4 h-4 ml-2"})]}),e.jsx(b,{variant:"outline",className:"w-full",onClick:G,disabled:a.isPending||A===0,children:a.isPending?s("accountsPage.confirmingLegacy"):s("accountsPage.confirmLegacy",{count:A})})]})]}),e.jsx(ie,{totalAccounts:p.length,primaryAccountName:p.length===1?p[0]?.name:null,isolatedCount:N,sharedStandardCount:x,deeperSharedCount:l,sharedAloneCount:o,sharedPeerAccountCount:d,deeperReadyAccountCount:f,sharedGroups:S,sharedPeerGroups:v,deeperReadyGroups:j,legacyTargetCount:A,cliproxyCount:n,plainCcsLane:w}),e.jsxs(M,{children:[e.jsx(I,{className:"pb-3",children:e.jsx(q,{className:"text-base",children:s("accountsPage.accountMatrix")})}),e.jsx(R,{children:u?e.jsx("div",{className:"text-muted-foreground",children:s("accountsPage.loadingAccounts")}):e.jsx(ce,{data:p,defaultAccount:t?.default??null,groupSummaries:_,plainCcsLane:w})})]})]}),e.jsx(rt,{open:i,onClose:()=>c(!1)})]})}export{bt as AccountsPage};
@@ -1 +1 @@
1
- import{j as e,a4 as s,a5 as r,a6 as n,a7 as i,a8 as d,a9 as c,aa as u,ab as f}from"./radix-ui-BlliRfHq.js";import"./react-vendor-CNOkPC89.js";import{c as o,bC as l}from"./index-TSYtCr3K.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 C({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,C as f,y as g};
1
+ import{j as e,a4 as s,a5 as r,a6 as n,a7 as i,a8 as d,a9 as c,aa as u,ab as f}from"./radix-ui-BlliRfHq.js";import"./react-vendor-CNOkPC89.js";import{c as o,bC as l}from"./index-DI-8QF69.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 C({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,C as f,y as g};