@eddyskywalker/dsh-chatgpt-subscription 0.12.6 → 0.13.0

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 (143) hide show
  1. package/CHANGELOG.md +637 -619
  2. package/lib/client.js +3975 -4521
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +1146 -299
  5. package/lib/types/client/CodexComposerQuota.d.ts.map +1 -1
  6. package/lib/types/client/CodexSubscriptionSection.d.ts +1 -3
  7. package/lib/types/client/CodexSubscriptionSection.d.ts.map +1 -1
  8. package/lib/types/client/ProviderHubSection.d.ts +6 -5
  9. package/lib/types/client/ProviderHubSection.d.ts.map +1 -1
  10. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts +22 -1
  11. package/lib/types/client/antigravity/AntigravityComposerQuota.d.ts.map +1 -1
  12. package/lib/types/client/antigravity/AntigravitySection.d.ts +0 -2
  13. package/lib/types/client/antigravity/AntigravitySection.d.ts.map +1 -1
  14. package/lib/types/client/antigravity/locales.d.ts +33 -26
  15. package/lib/types/client/antigravity/locales.d.ts.map +1 -1
  16. package/lib/types/client/antigravity/styles.d.ts.map +1 -1
  17. package/lib/types/client/claude/ClaudeComposerQuota.d.ts +3 -7
  18. package/lib/types/client/claude/ClaudeComposerQuota.d.ts.map +1 -1
  19. package/lib/types/client/claude/ClaudeSection.d.ts +10 -9
  20. package/lib/types/client/claude/ClaudeSection.d.ts.map +1 -1
  21. package/lib/types/client/claude/locales.d.ts +29 -29
  22. package/lib/types/client/claude/locales.d.ts.map +1 -1
  23. package/lib/types/client/claude/useClaudeSection.d.ts +93 -0
  24. package/lib/types/client/claude/useClaudeSection.d.ts.map +1 -0
  25. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +3 -7
  26. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -1
  27. package/lib/types/client/command-code/CommandCodeSection.d.ts +0 -3
  28. package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -1
  29. package/lib/types/client/command-code/locales.d.ts +32 -29
  30. package/lib/types/client/command-code/locales.d.ts.map +1 -1
  31. package/lib/types/client/common/AccountPoolSection.d.ts +16 -4
  32. package/lib/types/client/common/AccountPoolSection.d.ts.map +1 -1
  33. package/lib/types/client/common/ComposerQuotaBadge.d.ts +35 -0
  34. package/lib/types/client/common/ComposerQuotaBadge.d.ts.map +1 -0
  35. package/lib/types/client/common/ContextWindowEditor.d.ts +69 -0
  36. package/lib/types/client/common/ContextWindowEditor.d.ts.map +1 -0
  37. package/lib/types/client/common/ModelChecklist.d.ts +29 -0
  38. package/lib/types/client/common/ModelChecklist.d.ts.map +1 -0
  39. package/lib/types/client/common/account-pool-labels.d.ts +18 -2
  40. package/lib/types/client/common/account-pool-labels.d.ts.map +1 -1
  41. package/lib/types/client/common/account-quota.d.ts +60 -0
  42. package/lib/types/client/common/account-quota.d.ts.map +1 -0
  43. package/lib/types/client/common/format.d.ts +30 -0
  44. package/lib/types/client/common/format.d.ts.map +1 -0
  45. package/lib/types/client/common/line-api.d.ts +8 -0
  46. package/lib/types/client/common/line-api.d.ts.map +1 -0
  47. package/lib/types/client/common/model-checklist-styles.d.ts +2 -0
  48. package/lib/types/client/common/model-checklist-styles.d.ts.map +1 -0
  49. package/lib/types/client/common/styles.d.ts.map +1 -1
  50. package/lib/types/client/common/use-store.d.ts +3 -0
  51. package/lib/types/client/common/use-store.d.ts.map +1 -0
  52. package/lib/types/client/hub/HubOverview.d.ts +14 -0
  53. package/lib/types/client/hub/HubOverview.d.ts.map +1 -0
  54. package/lib/types/client/hub/brand-icons.d.ts +46 -0
  55. package/lib/types/client/hub/brand-icons.d.ts.map +1 -0
  56. package/lib/types/client/hub/brand-svg.d.ts +51 -0
  57. package/lib/types/client/hub/brand-svg.d.ts.map +1 -0
  58. package/lib/types/client/hub/hub-styles.d.ts +2 -0
  59. package/lib/types/client/hub/hub-styles.d.ts.map +1 -0
  60. package/lib/types/client/hub/providers.d.ts +38 -0
  61. package/lib/types/client/hub/providers.d.ts.map +1 -0
  62. package/lib/types/client/index.d.ts +20 -6
  63. package/lib/types/client/index.d.ts.map +1 -1
  64. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +3 -7
  65. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -1
  66. package/lib/types/client/kimi-code/KimiCodeSection.d.ts +0 -3
  67. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  68. package/lib/types/client/kimi-code/locales.d.ts +32 -32
  69. package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
  70. package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
  71. package/lib/types/client/locales.d.ts +45 -35
  72. package/lib/types/client/locales.d.ts.map +1 -1
  73. package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts +4 -8
  74. package/lib/types/client/minimax-code/MinimaxCodeComposerQuota.d.ts.map +1 -1
  75. package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts +8 -37
  76. package/lib/types/client/minimax-code/MinimaxCodeSection.d.ts.map +1 -1
  77. package/lib/types/client/minimax-code/api.d.ts +3 -3
  78. package/lib/types/client/minimax-code/api.d.ts.map +1 -1
  79. package/lib/types/client/minimax-code/locales.d.ts +29 -56
  80. package/lib/types/client/minimax-code/locales.d.ts.map +1 -1
  81. package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts +115 -0
  82. package/lib/types/client/minimax-code/useMinimaxCodeSection.d.ts.map +1 -0
  83. package/lib/types/client/ollama/OllamaSection.d.ts +2 -2
  84. package/lib/types/client/ollama/OllamaSection.d.ts.map +1 -1
  85. package/lib/types/client/ollama/locales.d.ts +54 -24
  86. package/lib/types/client/ollama/locales.d.ts.map +1 -1
  87. package/lib/types/client/styles.d.ts.map +1 -1
  88. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts +3 -7
  89. package/lib/types/client/workbuddy/WorkBuddyComposerQuota.d.ts.map +1 -1
  90. package/lib/types/client/workbuddy/WorkBuddySection.d.ts +10 -37
  91. package/lib/types/client/workbuddy/WorkBuddySection.d.ts.map +1 -1
  92. package/lib/types/client/workbuddy/locales.d.ts +0 -66
  93. package/lib/types/client/workbuddy/locales.d.ts.map +1 -1
  94. package/lib/types/client/workbuddy/useWorkBuddySection.d.ts +141 -0
  95. package/lib/types/client/workbuddy/useWorkBuddySection.d.ts.map +1 -0
  96. package/lib/types/host/antigravity/account-pool.d.ts +18 -1
  97. package/lib/types/host/antigravity/account-pool.d.ts.map +1 -1
  98. package/lib/types/host/antigravity/client.d.ts.map +1 -1
  99. package/lib/types/host/claude/account-pool.d.ts +22 -2
  100. package/lib/types/host/claude/account-pool.d.ts.map +1 -1
  101. package/lib/types/host/claude/client.d.ts +37 -5
  102. package/lib/types/host/claude/client.d.ts.map +1 -1
  103. package/lib/types/host/claude/routes.d.ts.map +1 -1
  104. package/lib/types/host/codex-account-pool.d.ts +26 -1
  105. package/lib/types/host/codex-account-pool.d.ts.map +1 -1
  106. package/lib/types/host/command-code/account-pool.d.ts +13 -1
  107. package/lib/types/host/command-code/account-pool.d.ts.map +1 -1
  108. package/lib/types/host/command-code/client.d.ts +2 -1
  109. package/lib/types/host/command-code/client.d.ts.map +1 -1
  110. package/lib/types/host/common/account-quota.d.ts +44 -0
  111. package/lib/types/host/common/account-quota.d.ts.map +1 -0
  112. package/lib/types/host/common/catalog-snapshot.d.ts +9 -0
  113. package/lib/types/host/common/catalog-snapshot.d.ts.map +1 -1
  114. package/lib/types/host/common/provider-route.d.ts +56 -0
  115. package/lib/types/host/common/provider-route.d.ts.map +1 -0
  116. package/lib/types/host/hub-overview.d.ts +26 -0
  117. package/lib/types/host/hub-overview.d.ts.map +1 -0
  118. package/lib/types/host/kimi-code/account-pool.d.ts +24 -1
  119. package/lib/types/host/kimi-code/account-pool.d.ts.map +1 -1
  120. package/lib/types/host/kimi-code/client.d.ts +23 -2
  121. package/lib/types/host/kimi-code/client.d.ts.map +1 -1
  122. package/lib/types/host/minimax-code/account-pool.d.ts +34 -2
  123. package/lib/types/host/minimax-code/account-pool.d.ts.map +1 -1
  124. package/lib/types/host/minimax-code/client.d.ts +23 -0
  125. package/lib/types/host/minimax-code/client.d.ts.map +1 -1
  126. package/lib/types/host/minimax-code/routes.d.ts.map +1 -1
  127. package/lib/types/host/oauth-service.d.ts +16 -0
  128. package/lib/types/host/oauth-service.d.ts.map +1 -1
  129. package/lib/types/host/usage-service.d.ts +27 -2
  130. package/lib/types/host/usage-service.d.ts.map +1 -1
  131. package/lib/types/host/workbuddy/account-pool.d.ts +13 -1
  132. package/lib/types/host/workbuddy/account-pool.d.ts.map +1 -1
  133. package/lib/types/host/workbuddy/client.d.ts +15 -0
  134. package/lib/types/host/workbuddy/client.d.ts.map +1 -1
  135. package/lib/types/host/workbuddy/routes.d.ts.map +1 -1
  136. package/lib/types/index.d.ts.map +1 -1
  137. package/lib/types/shared/account-pool-contracts.d.ts +44 -0
  138. package/lib/types/shared/account-pool-contracts.d.ts.map +1 -1
  139. package/lib/types/shared/antigravity-contracts.d.ts +9 -3
  140. package/lib/types/shared/antigravity-contracts.d.ts.map +1 -1
  141. package/lib/types/shared/hub-contracts.d.ts +37 -0
  142. package/lib/types/shared/hub-contracts.d.ts.map +1 -0
  143. package/package.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"CodexComposerQuota.d.ts","sourceRoot":"","sources":["../../../src/client/CodexComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGjF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAC1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IAC/E,GAAG,EAAE,eAAe,CAAA;IACpB,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAwD7G"}
1
+ {"version":3,"file":"CodexComposerQuota.d.ts","sourceRoot":"","sources":["../../../src/client/CodexComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAGjF,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAA;AAE1C,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,YAAY,CAAA;AAE/C,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IAC/E,GAAG,EAAE,eAAe,CAAA;IACpB,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED,wBAAgB,kBAAkB,CAAC,EAAE,GAAG,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAwD7G"}
@@ -1,5 +1,5 @@
1
1
  import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
2
- import type { CredentialStorageDto, PluginStatusDto, QuotaWindowDto } from '../shared/contracts.ts';
2
+ import type { PluginStatusDto, QuotaWindowDto } from '../shared/contracts.ts';
3
3
  import { NS } from './locales.ts';
4
4
  type Props = PropsRuntime<'settings.section'> & PropsLocale<typeof NS>;
5
5
  type BusyAction = 'login' | 'token' | 'quota' | 'reset-credit' | 'test' | 'logout' | 'preferences' | 'set-primary' | 'delete' | 'clear-cooldown' | 'strategy' | null;
@@ -23,8 +23,6 @@ export declare function FetchProviderStatusCard({ status, t }: {
23
23
  status: PluginStatusDto | null | undefined;
24
24
  t: Translate;
25
25
  }): React.JSX.Element | null;
26
- export declare function storageLabel(storage: CredentialStorageDto | undefined, t: Translate): string;
27
- export declare function storageNotice(storage: CredentialStorageDto | undefined, t: Translate): string;
28
26
  export declare function ResetCreditsFact({ resetCredits, busy, onUse, t }: {
29
27
  resetCredits: NonNullable<PluginStatusDto['quota']['resetCredits']>;
30
28
  busy: BusyAction;
@@ -1 +1 @@
1
- {"version":3,"file":"CodexSubscriptionSection.d.ts","sourceRoot":"","sources":["../../../src/client/CodexSubscriptionSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAyB,oBAAoB,EAAE,eAAe,EAAkB,cAAc,EAA8D,MAAM,wBAAwB,CAAA;AAOtM,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAGjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,CAAA;AACtE,KAAK,UAAU,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,cAAc,GAAG,MAAM,GAAG,QAAQ,GAAG,aAAa,GAC9F,aAAa,GAAG,QAAQ,GAAG,gBAAgB,GAAG,UAAU,GAAG,IAAI,CAAA;AACnE,KAAK,SAAS,GAAG,KAAK,CAAC,GAAG,CAAC,CAAA;AAE3B,wBAAgB,wBAAwB,CAAC,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC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AC,eAAe,CAAC,OAAO,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC;IAAC,IAAI,EAAE,UAAU,CAAC;IAAC,KAAK,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAAC,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAUzN;AAED,wBAAgB,QAAQ,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,EAAE,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,cAAc,CAAC;IAAC,CAAC,EAAE,SAAS,CAAA;CAAE,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAczH;AAMD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,EAAE,CAAC,EAAE,SAAS,GAAG,MAAM,CAYpF;AAED,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,gBAAgB,SAA4B,GAAG,MAAM,GAAG,IAAI,CAGxG;AAoCD,wBAAgB,WAAW,CAAC,OAAO,EAAE,MAAM,GAAG,SAAS,GAAG,IAAI,GAAG,MAAM,CAgBtE"}
@@ -4,11 +4,12 @@ type Props = PropsRuntime<'settings.section'> & PropsLocale<typeof NS> & {
4
4
  onModelChange?: () => void;
5
5
  };
6
6
  /**
7
- * Single settings page that hosts every subscription provider behind tabs,
8
- * so the settings sidebar shows one entry instead of one per provider. Only
9
- * the active tab is mounted, mirroring the shell's previous behavior of
10
- * mounting just the selected settings page (each provider section refetches
11
- * its status on mount).
7
+ * Single settings page hosting every subscription provider. The opening
8
+ * screen is the overview — one card per line with its enable switch and
9
+ * account count — and picking a card replaces it with that line's detail
10
+ * page under a back bar. Only the active view is mounted, mirroring the
11
+ * shell's behavior of mounting just the selected settings page (each
12
+ * provider section refetches its status on mount).
12
13
  */
13
14
  export declare function ProviderHubSection({ t, onModelChange, ...runtime }: Props): React.JSX.Element;
14
15
  export {};
@@ -1 +1 @@
1
- {"version":3,"file":"ProviderHubSection.d.ts","sourceRoot":"","sources":["../../../src/client/ProviderHubSection.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AASjF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAEjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IACvE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,CAAA;AAkBD;;;;;;GAMG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAiE7F"}
1
+ {"version":3,"file":"ProviderHubSection.d.ts","sourceRoot":"","sources":["../../../src/client/ProviderHubSection.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAKjC,KAAK,KAAK,GAAG,YAAY,CAAC,kBAAkB,CAAC,GAAG,WAAW,CAAC,OAAO,EAAE,CAAC,GAAG;IACvE,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;CAC3B,CAAA;AAoCD;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,CAAC,EAAE,aAAa,EAAE,GAAG,OAAO,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAqC7F"}
@@ -1,11 +1,32 @@
1
1
  import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
2
2
  import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
+ import type { AntigravityQuotaGroup, AntigravityWebStatus } from '../../shared/antigravity-contracts.ts';
4
+ import { type ComposerQuotaFacts } from '../common/ComposerQuotaBadge.tsx';
3
5
  import type { SnapshotStore } from '../store.ts';
4
6
  import { NS_ANTIGRAVITY } from './locales.ts';
5
7
  type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_ANTIGRAVITY> & {
6
8
  directory: SnapshotStore<ModelDirectoryState>;
7
9
  loadModelDirectory: () => void;
8
10
  };
9
- export declare function AntigravityComposerQuota({ directory, loadModelDirectory }: Props): React.JSX.Element | null;
11
+ /**
12
+ * The bucket this badge should speak for, or null when it cannot speak for one.
13
+ *
14
+ * The service reports the same allowances under separate model groups, and a
15
+ * bucket the service never measured must not be published as "0% left". So the
16
+ * badge skips it and takes the next measured one in the group, and shows nothing
17
+ * at all when the group has none. Falling back to another group's numbers would
18
+ * label one allowance with another's reading.
19
+ *
20
+ * Exported for its own regression test; the badge is its only caller.
21
+ */
22
+ export declare function selectQuotaBucketForModel(groups: AntigravityQuotaGroup[], modelId?: string): {
23
+ groupName: string;
24
+ bucketName: string;
25
+ remainingPercent: number;
26
+ resetTime: string | undefined;
27
+ } | null;
28
+ /** The allowance the selected model actually draws on, as the badge's facts. */
29
+ export declare function selectBadgeFacts(status: AntigravityWebStatus | null, modelId?: string): ComposerQuotaFacts;
30
+ export declare function AntigravityComposerQuota({ directory, loadModelDirectory, t }: Props): React.JSX.Element | null;
10
31
  export {};
11
32
  //# sourceMappingURL=AntigravityComposerQuota.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AntigravityComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/AntigravityComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AAEjF,OAAO,KAAK,EAAE,aAAa,EAAE,M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M,EAAE,oBAAoB,GAAG,IAAI,EAAE,OAAO,CAAC,EAAE,MAAM,GAAG,kBAAkB,CAS1G;AAED,wBAAgB,wBAAwB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAW9G"}
@@ -3,8 +3,6 @@ interface Props {
3
3
  onModelChange?: () => void;
4
4
  loadModelDirectory?: () => void;
5
5
  }
6
- export declare function parsePositiveCapacity(value: string): number | null;
7
- export declare function formatCapacity(value: number): string;
8
6
  export declare function AntigravitySection({ onModelChange, loadModelDirectory }: Props): React.ReactElement;
9
7
  export {};
10
8
  //# sourceMappingURL=AntigravitySection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"AntigravitySection.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/AntigravitySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAYvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAiBD,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AAoCD,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAslBnG"}
1
+ {"version":3,"file":"AntigravitySection.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/AntigravitySection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AAgBvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAED,wBAAgB,kBAAkB,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAwfnG"}
@@ -21,21 +21,14 @@ export declare const zh: {
21
21
  plan: string;
22
22
  accountId: string;
23
23
  expires: string;
24
- storage: string;
25
- storageNotice: string;
26
24
  signInAgain: string;
27
25
  refreshToken: string;
28
26
  signOut: string;
29
27
  signIn: string;
30
28
  signingIn: string;
31
29
  connection: string;
32
- provider: string;
33
- providerValue: string;
34
- connectionState: string;
35
- connected: string;
36
- untested: string;
37
- enableProvider: string;
38
30
  modelsHint: string;
31
+ modelsSection: string;
39
32
  selectAll: string;
40
33
  unselectAll: string;
41
34
  enhanced: string;
@@ -73,6 +66,15 @@ export declare const zh: {
73
66
  relogin: string;
74
67
  email: string;
75
68
  lastUsed: string;
69
+ accountQuota: string;
70
+ quotaNone: string;
71
+ quotaSnapshot: string;
72
+ quotaResets: string;
73
+ quotaExhausted: string;
74
+ quotaWindow: string;
75
+ quotaUsed: string;
76
+ quotaFactsScope: string;
77
+ composerLabel: string;
76
78
  };
77
79
  export declare const en: Record<keyof typeof zh, string>;
78
80
  export declare const dictionaries: {
@@ -98,21 +100,14 @@ export declare const dictionaries: {
98
100
  plan: string;
99
101
  accountId: string;
100
102
  expires: string;
101
- storage: string;
102
- storageNotice: string;
103
103
  signInAgain: string;
104
104
  refreshToken: string;
105
105
  signOut: string;
106
106
  signIn: string;
107
107
  signingIn: string;
108
108
  connection: string;
109
- provider: string;
110
- providerValue: string;
111
- connectionState: string;
112
- connected: string;
113
- untested: string;
114
- enableProvider: string;
115
109
  modelsHint: string;
110
+ modelsSection: string;
116
111
  selectAll: string;
117
112
  unselectAll: string;
118
113
  enhanced: string;
@@ -150,6 +145,15 @@ export declare const dictionaries: {
150
145
  relogin: string;
151
146
  email: string;
152
147
  lastUsed: string;
148
+ accountQuota: string;
149
+ quotaNone: string;
150
+ quotaSnapshot: string;
151
+ quotaResets: string;
152
+ quotaExhausted: string;
153
+ quotaWindow: string;
154
+ quotaUsed: string;
155
+ quotaFactsScope: string;
156
+ composerLabel: string;
153
157
  };
154
158
  'zh-CN': {
155
159
  title: string;
@@ -173,21 +177,14 @@ export declare const dictionaries: {
173
177
  plan: string;
174
178
  accountId: string;
175
179
  expires: string;
176
- storage: string;
177
- storageNotice: string;
178
180
  signInAgain: string;
179
181
  refreshToken: string;
180
182
  signOut: string;
181
183
  signIn: string;
182
184
  signingIn: string;
183
185
  connection: string;
184
- provider: string;
185
- providerValue: string;
186
- connectionState: string;
187
- connected: string;
188
- untested: string;
189
- enableProvider: string;
190
186
  modelsHint: string;
187
+ modelsSection: string;
191
188
  selectAll: string;
192
189
  unselectAll: string;
193
190
  enhanced: string;
@@ -225,8 +222,18 @@ export declare const dictionaries: {
225
222
  relogin: string;
226
223
  email: string;
227
224
  lastUsed: string;
225
+ accountQuota: string;
226
+ quotaNone: string;
227
+ quotaSnapshot: string;
228
+ quotaResets: string;
229
+ quotaExhausted: string;
230
+ quotaWindow: string;
231
+ quotaUsed: string;
232
+ quotaFactsScope: string;
233
+ composerLabel: string;
228
234
  };
229
- en: Record<"account" | "storage" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "pageDesc" | "signingIn" | "providerValue" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
230
- 'en-US': Record<"account" | "storage" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "pageDesc" | "signingIn" | "providerValue" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
235
+ en: Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "plan" | "accountId" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
236
+ 'en-US': Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "plan" | "accountId" | "expires" | "signIn" | "signInAgain" | "signOut" | "refreshToken" | "loading" | "connection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saved" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "googleValidation" | "resetPrefix" | "resetUnavailable" | "resetNow" | "timeDayHour" | "timeHourMin" | "timeMin" | "updatedAt" | "loginFailed", string>;
231
237
  };
238
+ export type AntigravityLocaleKey = keyof typeof zh;
232
239
  //# sourceMappingURL=locales.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAI/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAsEd,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAqE9C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/locales.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,cAAc,oBAAoB,CAAA;AAI/C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+Dd,CAAA;AAED,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CA8D9C,CAAA;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,oBAAoB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,mCAAmC,CAAA;AAExD,wBAAgB,wBAAwB,IAAI,IAAI,CA4E/C"}
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/antigravity/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,mCAAmC,CAAA;AAExD,wBAAgB,wBAAwB,IAAI,IAAI,CAsE/C"}
@@ -1,17 +1,13 @@
1
1
  import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
2
2
  import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
3
3
  import type { ClaudeWebStatus } from '../../shared/claude-contracts.ts';
4
+ import { type ComposerQuotaFacts } from '../common/ComposerQuotaBadge.tsx';
4
5
  import type { SnapshotStore } from '../store.ts';
5
6
  import { NS_CLAUDE } from './locales.ts';
6
7
  type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_CLAUDE> & {
7
8
  directory: SnapshotStore<ModelDirectoryState>;
8
9
  loadModelDirectory: () => void;
9
10
  };
10
- interface BadgeFacts {
11
- text: string;
12
- tooltip: string;
13
- level: 'normal' | 'warning' | 'danger';
14
- }
15
11
  /**
16
12
  * Pick the most meaningful number for the badge.
17
13
  *
@@ -27,7 +23,7 @@ interface BadgeFacts {
27
23
  * remaining is 100 - used. A window at 0% used is the normal empty state and
28
24
  * grades as 'normal', not as an error.
29
25
  */
30
- export declare function selectBadgeFacts(status: ClaudeWebStatus | null): BadgeFacts | null;
31
- export declare function ClaudeComposerQuota({ directory, loadModelDirectory }: Props): React.JSX.Element | null;
26
+ export declare function selectBadgeFacts(status: ClaudeWebStatus | null): ComposerQuotaFacts | null;
27
+ export declare function ClaudeComposerQuota({ directory, loadModelDirectory, t }: Props): React.JSX.Element | null;
32
28
  export {};
33
29
  //# sourceMappingURL=ClaudeComposerQuota.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClaudeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeComposerQuota.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAmBxC,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GACnD,WAAW,CAAC,OAAO,SAAS,CAAC,GAAG;IAC9B,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAEH,UAAU,UAAU;IAClB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;IACf,KAAK,EAAE,QAAQ,GAAG,SAAS,GAAG,QAAQ,CAAA;CACvC;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,UAAU,GAAG,IAAI,CA2BlF;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAkEtG"}
1
+ {"version":3,"file":"ClaudeComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeComposerQuota.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,kCAAkC,CAAA;AACvE,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAE1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAA;AAIxC,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,SAAS,CAAC,GAAG;IACtF,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,eAAe,GAAG,IAAI,GAAG,kBAAkB,GAAG,IAAI,CA2B1F;AAED,wBAAgB,mBAAmB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAWzG"}
@@ -1,11 +1,12 @@
1
+ /**
2
+ * The Claude subscription settings card.
3
+ *
4
+ * Markup only: every piece of state, every effect and every request this card
5
+ * makes lives in 'useClaudeSection.ts', which returns one named shape the JSX
6
+ * below reads. The two files are the split of a single 900-line component — the
7
+ * behaviour is unchanged, and this one should stay render-shaped.
8
+ */
1
9
  import React from 'react';
2
- interface Props {
3
- onModelChange?: () => void;
4
- loadModelDirectory?: () => void;
5
- }
6
- /** Parse "1M", "512K", "200000" into a positive integer token count. */
7
- export declare function parsePositiveCapacity(value: string): number | null;
8
- export declare function formatCapacity(value: number): string;
9
- export declare function ClaudeSection({ onModelChange, loadModelDirectory }: Props): React.ReactElement;
10
- export {};
10
+ import { type ClaudeSectionProps } from './useClaudeSection.ts';
11
+ export declare function ClaudeSection({ onModelChange, loadModelDirectory }: ClaudeSectionProps): React.ReactElement;
11
12
  //# sourceMappingURL=ClaudeSection.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ClaudeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeSection.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmD,MAAM,OAAO,CAAA;AA4BvE,UAAU,KAAK;IACb,aAAa,CAAC,EAAE,MAAM,IAAI,CAAA;IAC1B,kBAAkB,CAAC,EAAE,MAAM,IAAI,CAAA;CAChC;AAoBD,wEAAwE;AACxE,wBAAgB,qBAAqB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAOlE;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM,CAIpD;AA+ED,wBAAgB,aAAa,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,YAAY,CAq7B9F"}
1
+ {"version":3,"file":"ClaudeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/ClaudeSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AAYzB,OAAO,EAAoB,KAAK,kBAAkB,EAAE,MAAM,uBAAuB,CAAA;AAmCjF,wBAAgB,aAAa,CAAC,EAAE,aAAa,EAAE,kBAAkB,EAAE,EAAE,kBAAkB,GAAG,KAAK,CAAC,YAAY,CAsa3G"}
@@ -20,9 +20,6 @@ export declare const zh: {
20
20
  readonly sourceManaged: "本插件登录";
21
21
  readonly sourceClaudeCode: "本机 Claude Code";
22
22
  readonly adoptedBadge: "导入的快照";
23
- readonly snapshotPath: "来源文件";
24
- readonly storage: "凭据存储";
25
- readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/claude-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
26
23
  readonly signIn: "登录 Claude 账号";
27
24
  readonly signInSection: "登录授权";
28
25
  readonly signInAgain: "重新登录";
@@ -50,12 +47,6 @@ export declare const zh: {
50
47
  readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
51
48
  readonly importSearched: "查找位置:{paths}";
52
49
  readonly connection: "连接";
53
- readonly provider: "Provider";
54
- readonly providerValue: "Anthropic Claude 订阅 · claude-subscription";
55
- readonly enableProvider: "启用此供应商";
56
- readonly connectionState: "连接状态";
57
- readonly connected: "已连接";
58
- readonly untested: "未测试";
59
50
  readonly testConnection: "测试连接";
60
51
  readonly testingConnection: "测试中...";
61
52
  readonly testSuccess: "连接正常";
@@ -153,6 +144,15 @@ export declare const zh: {
153
144
  readonly expires: string;
154
145
  readonly lastUsed: string;
155
146
  readonly accountId: string;
147
+ readonly accountQuota: string;
148
+ readonly quotaNone: string;
149
+ readonly quotaSnapshot: string;
150
+ readonly quotaResets: string;
151
+ readonly quotaExhausted: string;
152
+ readonly quotaWindow: string;
153
+ readonly quotaUsed: string;
154
+ readonly quotaFactsScope: string;
155
+ readonly composerLabel: string;
156
156
  };
157
157
  export declare const en: Record<keyof typeof zh, string>;
158
158
  export declare const dictionaries: {
@@ -170,9 +170,6 @@ export declare const dictionaries: {
170
170
  readonly sourceManaged: "本插件登录";
171
171
  readonly sourceClaudeCode: "本机 Claude Code";
172
172
  readonly adoptedBadge: "导入的快照";
173
- readonly snapshotPath: "来源文件";
174
- readonly storage: "凭据存储";
175
- readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/claude-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
176
173
  readonly signIn: "登录 Claude 账号";
177
174
  readonly signInSection: "登录授权";
178
175
  readonly signInAgain: "重新登录";
@@ -200,12 +197,6 @@ export declare const dictionaries: {
200
197
  readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
201
198
  readonly importSearched: "查找位置:{paths}";
202
199
  readonly connection: "连接";
203
- readonly provider: "Provider";
204
- readonly providerValue: "Anthropic Claude 订阅 · claude-subscription";
205
- readonly enableProvider: "启用此供应商";
206
- readonly connectionState: "连接状态";
207
- readonly connected: "已连接";
208
- readonly untested: "未测试";
209
200
  readonly testConnection: "测试连接";
210
201
  readonly testingConnection: "测试中...";
211
202
  readonly testSuccess: "连接正常";
@@ -303,6 +294,15 @@ export declare const dictionaries: {
303
294
  readonly expires: string;
304
295
  readonly lastUsed: string;
305
296
  readonly accountId: string;
297
+ readonly accountQuota: string;
298
+ readonly quotaNone: string;
299
+ readonly quotaSnapshot: string;
300
+ readonly quotaResets: string;
301
+ readonly quotaExhausted: string;
302
+ readonly quotaWindow: string;
303
+ readonly quotaUsed: string;
304
+ readonly quotaFactsScope: string;
305
+ readonly composerLabel: string;
306
306
  };
307
307
  'zh-CN': {
308
308
  readonly title: "Claude(订阅)";
@@ -318,9 +318,6 @@ export declare const dictionaries: {
318
318
  readonly sourceManaged: "本插件登录";
319
319
  readonly sourceClaudeCode: "本机 Claude Code";
320
320
  readonly adoptedBadge: "导入的快照";
321
- readonly snapshotPath: "来源文件";
322
- readonly storage: "凭据存储";
323
- readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/claude-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
324
321
  readonly signIn: "登录 Claude 账号";
325
322
  readonly signInSection: "登录授权";
326
323
  readonly signInAgain: "重新登录";
@@ -348,12 +345,6 @@ export declare const dictionaries: {
348
345
  readonly importUnavailable: "未找到可导入的本机 Claude Code 登录态。";
349
346
  readonly importSearched: "查找位置:{paths}";
350
347
  readonly connection: "连接";
351
- readonly provider: "Provider";
352
- readonly providerValue: "Anthropic Claude 订阅 · claude-subscription";
353
- readonly enableProvider: "启用此供应商";
354
- readonly connectionState: "连接状态";
355
- readonly connected: "已连接";
356
- readonly untested: "未测试";
357
348
  readonly testConnection: "测试连接";
358
349
  readonly testingConnection: "测试中...";
359
350
  readonly testSuccess: "连接正常";
@@ -451,9 +442,18 @@ export declare const dictionaries: {
451
442
  readonly expires: string;
452
443
  readonly lastUsed: string;
453
444
  readonly accountId: string;
445
+ readonly accountQuota: string;
446
+ readonly quotaNone: string;
447
+ readonly quotaSnapshot: string;
448
+ readonly quotaResets: string;
449
+ readonly quotaExhausted: string;
450
+ readonly quotaWindow: string;
451
+ readonly quotaUsed: string;
452
+ readonly quotaFactsScope: string;
453
+ readonly composerLabel: string;
454
454
  };
455
- en: Record<"account" | "storage" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "testConnection" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "source" | "pageDesc" | "signingIn" | "providerValue" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "snapshotPath" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "modelsSection" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
456
- 'en-US': Record<"account" | "storage" | "quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "signedOut" | "signedIn" | "plan" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "provider" | "connectionState" | "connected" | "untested" | "testConnection" | "enableProvider" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "storageNotice" | "email" | "lastUsed" | "source" | "pageDesc" | "signingIn" | "providerValue" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "snapshotPath" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "modelsSection" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
455
+ en: Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "plan" | "accountId" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "source" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaRefreshing" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
456
+ 'en-US': Record<"tokens" | "title" | "account" | "signedOut" | "signedIn" | "plan" | "accountId" | "expires" | "signIn" | "signInAgain" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowInvalid" | "contextWindowReset" | "contextWindowResetAll" | "contextWindowResetAllConfirm" | "save" | "refreshQuota" | "quotaSignedOut" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "clearCooldown" | "needsRelogin" | "relogin" | "rotationStrategy" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "pageDesc" | "signingIn" | "modelsSection" | "enhanced" | "defaultReasoningEffort" | "defaultReasoningEffortHint" | "defaultEffortAuto" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "quotaSection" | "quotaDesc" | "refreshingQuota" | "quotaEmpty" | "updatedAt" | "loginFailed" | "now" | "planUnknown" | "subscriptionType" | "source" | "sourceManaged" | "sourceClaudeCode" | "adoptedBadge" | "signInSection" | "cancelSignIn" | "openAuthorizeUrl" | "authorizeUrl" | "redirectUri" | "loginModeManual" | "loginModeLoopback" | "loginFallbackReason" | "loginWaiting" | "loginExchanging" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "importClaudeCode" | "importing" | "stopImporting" | "importHint" | "importUnavailable" | "importSearched" | "testingConnection" | "testSuccess" | "testLatency" | "testFailed" | "testRetryable" | "testNotRetryable" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "capImage" | "capNoImage" | "capThinkingOff" | "thinkingModeMidConvo" | "thinkingModeAdaptive" | "thinkingModeBudget" | "thinkingModeNone" | "cacheTtl" | "cacheTtlHint" | "cacheTtlSubscription" | "cacheTtl1h" | "cacheTtl5m" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "modelLadders" | "modelLadderNone" | "quotaRefreshing" | "quotaUnknown" | "quotaUnknownHint" | "usedLabel" | "remainingLabel" | "left" | "resetAt" | "resetUnknown" | "observedAt" | "quotaError" | "extraUsage" | "extraUsageEnabled" | "extraUsageDisabled" | "extraUsageLimit" | "sourceUsage" | "sourceHeaders" | "quotaStatus" | "quotaRepresentative" | "copy" | "copied", string>;
457
457
  };
458
458
  export type ClaudeLocaleKey = keyof typeof zh;
459
459
  //# sourceMappingURL=locales.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/locales.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAkJL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CAyIrC,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,EAAE,CAAA"}
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/locales.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,eAAe,CAAA;AAErC,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIL,CAAA;AAEV,eAAO,MAAM,EAAE,EAAE,MAAM,CAAC,MAAM,OAAO,EAAE,EAAE,MAAM,CA+HrC,CAAA;AAEV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,eAAe,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -0,0 +1,93 @@
1
+ import type { AccountRotationStrategy } from '../../shared/account-pool-contracts.ts';
2
+ import type { ClaudeAccountQuota, ClaudeAccountSummaryDto, ClaudeCacheTtl, ClaudeConnectionDto, ClaudeLoginFlowDto, ClaudeModelOption, ClaudeQuotaWindow, ClaudeReasoningEffort, ClaudeWebStatus } from '../../shared/claude-contracts.ts';
3
+ import { zh } from './locales.ts';
4
+ /** The seats the settings hub hands the card; both optional, so a bare render works. */
5
+ export interface ClaudeSectionProps {
6
+ onModelChange?: () => void;
7
+ loadModelDirectory?: () => void;
8
+ }
9
+ /**
10
+ * Everything the card's view consumes, grouped by kind.
11
+ *
12
+ * Returned as one named shape instead of one status blob: a reader can see at a
13
+ * glance what the hook tracks, what it computes from a status answer, and what
14
+ * the view is allowed to ask it to do.
15
+ */
16
+ export interface ClaudeSectionView {
17
+ /** Values that change as the card runs. */
18
+ state: {
19
+ /** Last status answer; null until the first read lands. */
20
+ status: ClaudeWebStatus | null;
21
+ /** True until the first status read settles, whatever its outcome. */
22
+ loading: boolean;
23
+ /** Id of the action in flight, or null; every disabled control reads it. */
24
+ busy: string | null;
25
+ /** The failure the card's error strip shows. */
26
+ error: string | null;
27
+ /** The sign-in flow being polled, when one is running. */
28
+ flow: ClaudeLoginFlowDto | null;
29
+ /** Result of the last explicit connection test. */
30
+ connection: ClaudeConnectionDto | null;
31
+ /** What the user has typed into the manual-paste box. */
32
+ pasteValue: string;
33
+ /** One free-text capacity draft per model, keyed by model id. */
34
+ contextDrafts: Record<string, string>;
35
+ /** Model id whose context-window save or restore is in flight. */
36
+ savingModel: string | null;
37
+ };
38
+ /** Facts read straight off the current status answer. */
39
+ derived: {
40
+ /** Every account row the shared pool card lists. */
41
+ accounts: ClaudeAccountSummaryDto[];
42
+ /** Whether any row is a snapshot of a sign-in this plugin does not own. */
43
+ hasAdopted: boolean;
44
+ /** Models the context-window editor offers: the enabled ones only. */
45
+ contextModels: ClaudeModelOption[];
46
+ /** How many stored overrides exist, whether or not a row still shows them. */
47
+ overrideCount: number;
48
+ /** The displayed account's quota snapshot, when the host has one. */
49
+ quota: ClaudeAccountQuota | null | undefined;
50
+ /** Windows of that snapshot, shortest first. */
51
+ windows: ClaudeQuotaWindow[];
52
+ /**
53
+ * The line's dictionary, handed to the shared pool card as one object.
54
+ *
55
+ * The hook already owns it for its own sentences, so the view takes the same
56
+ * object from here rather than reaching for a second import.
57
+ */
58
+ poolLabels: typeof zh;
59
+ };
60
+ /** Everything the view can trigger. */
61
+ actions: {
62
+ /** Start a sign-in; opens the authorize page when the flow carries one. */
63
+ login(): Promise<void>;
64
+ cancelLogin(): Promise<void>;
65
+ /** Finish a manual-mode sign-in with the pasted code. */
66
+ submitPaste(): Promise<void>;
67
+ /** Add the local Claude Code sign-in as a snapshot. */
68
+ adopt(): Promise<void>;
69
+ /** Forget every imported snapshot, or one of them. */
70
+ stopImporting(accountId?: string): Promise<void>;
71
+ /** One account-level action on the shared pool card. */
72
+ accountAction(action: 'set-primary' | 'delete' | 'clear-cooldown', accountId: string): Promise<void>;
73
+ setStrategy(strategy: AccountRotationStrategy): Promise<void>;
74
+ /** Re-authorize ONE account; the returned flow starts the polling above. */
75
+ relogin(accountId: string): void;
76
+ refreshQuota(): Promise<void>;
77
+ refreshCatalog(): Promise<void>;
78
+ testConnection(): Promise<void>;
79
+ toggleModel(modelId: string, checked: boolean): void;
80
+ setAllModels(selectAll: boolean): void;
81
+ updateEffort(effort: ClaudeReasoningEffort | null): Promise<void>;
82
+ updateCacheTtl(ttl: ClaudeCacheTtl | null): Promise<void>;
83
+ saveContextWindow(modelId: string): Promise<void>;
84
+ resetContextWindow(modelId: string): Promise<void>;
85
+ resetAllContextWindows(): Promise<void>;
86
+ /** Edit one capacity draft mid-typing; the editor never parses it. */
87
+ updateContextDraft(modelId: string, draft: string): void;
88
+ /** Edit the manual-paste box. */
89
+ setPasteValue(value: string): void;
90
+ };
91
+ }
92
+ export declare function useClaudeSection({ onModelChange, loadModelDirectory }: ClaudeSectionProps): ClaudeSectionView;
93
+ //# sourceMappingURL=useClaudeSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useClaudeSection.d.ts","sourceRoot":"","sources":["../../../../src/client/claude/useClaudeSection.ts"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AACrF,OAAO,KAAK,EACV,kBAAkB,EAClB,uBAAuB,EACvB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,iBAAiB,EACjB,iBAAiB,EACjB,qBAAqB,EACrB,eAAe,EAChB,MAAM,kCAAkC,CAAA;AAKzC,OAAO,EAAE,EAAE,EAAE,MAAM,cAAc,CAAA;AAcjC,wFAAwF;AACxF,MAAM,WAAW,kBAAkB;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