@eddyskywalker/dsh-chatgpt-subscription 0.32.0 → 0.34.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 (116) hide show
  1. package/CHANGELOG.md +81 -0
  2. package/README.md +100 -111
  3. package/lib/client.js +4731 -1239
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +11514 -3162
  6. package/lib/types/client/common/format.d.ts +10 -0
  7. package/lib/types/client/common/format.d.ts.map +1 -1
  8. package/lib/types/client/hub/brand-icons.d.ts +18 -2
  9. package/lib/types/client/hub/brand-icons.d.ts.map +1 -1
  10. package/lib/types/client/hub/hub-styles.d.ts.map +1 -1
  11. package/lib/types/client/hub/providers.d.ts.map +1 -1
  12. package/lib/types/client/index.d.ts +4 -0
  13. package/lib/types/client/index.d.ts.map +1 -1
  14. package/lib/types/client/minimax-code/VideoFormDialog.d.ts +46 -50
  15. package/lib/types/client/minimax-code/VideoFormDialog.d.ts.map +1 -1
  16. package/lib/types/client/minimax-code/locales.d.ts +80 -20
  17. package/lib/types/client/minimax-code/locales.d.ts.map +1 -1
  18. package/lib/types/client/minimax-code/styles.d.ts.map +1 -1
  19. package/lib/types/client/minimax-code/video-command-host.d.ts +17 -11
  20. package/lib/types/client/minimax-code/video-command-host.d.ts.map +1 -1
  21. package/lib/types/client/minimax-code/video-command-icon.d.ts +38 -0
  22. package/lib/types/client/minimax-code/video-command-icon.d.ts.map +1 -0
  23. package/lib/types/client/minimax-code/video-command.d.ts +53 -59
  24. package/lib/types/client/minimax-code/video-command.d.ts.map +1 -1
  25. package/lib/types/client/minimax-code/video-media-dropzone.d.ts +57 -0
  26. package/lib/types/client/minimax-code/video-media-dropzone.d.ts.map +1 -0
  27. package/lib/types/client/minimax-code/video-media-input.d.ts +173 -0
  28. package/lib/types/client/minimax-code/video-media-input.d.ts.map +1 -0
  29. package/lib/types/client/minimax-code/video-presets.d.ts +67 -0
  30. package/lib/types/client/minimax-code/video-presets.d.ts.map +1 -0
  31. package/lib/types/client/minimax-code/video-workspace.d.ts +41 -0
  32. package/lib/types/client/minimax-code/video-workspace.d.ts.map +1 -0
  33. package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts +20 -0
  34. package/lib/types/client/opendesign/OpenDesignComposerQuota.d.ts.map +1 -0
  35. package/lib/types/client/opendesign/OpenDesignSection.d.ts +18 -0
  36. package/lib/types/client/opendesign/OpenDesignSection.d.ts.map +1 -0
  37. package/lib/types/client/opendesign/api.d.ts +45 -0
  38. package/lib/types/client/opendesign/api.d.ts.map +1 -0
  39. package/lib/types/client/opendesign/locales.d.ts +689 -0
  40. package/lib/types/client/opendesign/locales.d.ts.map +1 -0
  41. package/lib/types/client/opendesign/styles.d.ts +11 -0
  42. package/lib/types/client/opendesign/styles.d.ts.map +1 -0
  43. package/lib/types/client/qoder/QoderComposerQuota.d.ts +41 -0
  44. package/lib/types/client/qoder/QoderComposerQuota.d.ts.map +1 -0
  45. package/lib/types/client/qoder/QoderSection.d.ts +36 -0
  46. package/lib/types/client/qoder/QoderSection.d.ts.map +1 -0
  47. package/lib/types/client/qoder/api.d.ts +4 -0
  48. package/lib/types/client/qoder/api.d.ts.map +1 -0
  49. package/lib/types/client/qoder/locales.d.ts +316 -0
  50. package/lib/types/client/qoder/locales.d.ts.map +1 -0
  51. package/lib/types/client/qoder/styles.d.ts +16 -0
  52. package/lib/types/client/qoder/styles.d.ts.map +1 -0
  53. package/lib/types/client/qoder/useQoderSection.d.ts +97 -0
  54. package/lib/types/client/qoder/useQoderSection.d.ts.map +1 -0
  55. package/lib/types/host/common/model-request-control.d.ts +1 -1
  56. package/lib/types/host/common/model-request-control.d.ts.map +1 -1
  57. package/lib/types/host/common/request-diagnostics.d.ts +1 -1
  58. package/lib/types/host/common/request-diagnostics.d.ts.map +1 -1
  59. package/lib/types/host/kimi-code/adapter.d.ts +34 -1
  60. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  61. package/lib/types/host/kimi-code/mapper.d.ts +8 -0
  62. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  63. package/lib/types/host/kimi-code/types.d.ts +92 -0
  64. package/lib/types/host/kimi-code/types.d.ts.map +1 -1
  65. package/lib/types/host/opendesign/account-pool.d.ts +54 -0
  66. package/lib/types/host/opendesign/account-pool.d.ts.map +1 -0
  67. package/lib/types/host/opendesign/adapter.d.ts +69 -0
  68. package/lib/types/host/opendesign/adapter.d.ts.map +1 -0
  69. package/lib/types/host/opendesign/catalog.d.ts +44 -0
  70. package/lib/types/host/opendesign/catalog.d.ts.map +1 -0
  71. package/lib/types/host/opendesign/client.d.ts +148 -0
  72. package/lib/types/host/opendesign/client.d.ts.map +1 -0
  73. package/lib/types/host/opendesign/line.d.ts +49 -0
  74. package/lib/types/host/opendesign/line.d.ts.map +1 -0
  75. package/lib/types/host/opendesign/mapper.d.ts +128 -0
  76. package/lib/types/host/opendesign/mapper.d.ts.map +1 -0
  77. package/lib/types/host/opendesign/oauth.d.ts +105 -0
  78. package/lib/types/host/opendesign/oauth.d.ts.map +1 -0
  79. package/lib/types/host/opendesign/routes.d.ts +74 -0
  80. package/lib/types/host/opendesign/routes.d.ts.map +1 -0
  81. package/lib/types/host/opendesign/token-store.d.ts +154 -0
  82. package/lib/types/host/opendesign/token-store.d.ts.map +1 -0
  83. package/lib/types/host/opendesign/types.d.ts +180 -0
  84. package/lib/types/host/opendesign/types.d.ts.map +1 -0
  85. package/lib/types/host/qoder/account-pool.d.ts +137 -0
  86. package/lib/types/host/qoder/account-pool.d.ts.map +1 -0
  87. package/lib/types/host/qoder/adapter.d.ts +158 -0
  88. package/lib/types/host/qoder/adapter.d.ts.map +1 -0
  89. package/lib/types/host/qoder/adopt.d.ts +146 -0
  90. package/lib/types/host/qoder/adopt.d.ts.map +1 -0
  91. package/lib/types/host/qoder/client.d.ts +301 -0
  92. package/lib/types/host/qoder/client.d.ts.map +1 -0
  93. package/lib/types/host/qoder/cosy.d.ts +173 -0
  94. package/lib/types/host/qoder/cosy.d.ts.map +1 -0
  95. package/lib/types/host/qoder/mapper.d.ts +235 -0
  96. package/lib/types/host/qoder/mapper.d.ts.map +1 -0
  97. package/lib/types/host/qoder/model-catalog.d.ts +231 -0
  98. package/lib/types/host/qoder/model-catalog.d.ts.map +1 -0
  99. package/lib/types/host/qoder/oauth.d.ts +134 -0
  100. package/lib/types/host/qoder/oauth.d.ts.map +1 -0
  101. package/lib/types/host/qoder/routes.d.ts +119 -0
  102. package/lib/types/host/qoder/routes.d.ts.map +1 -0
  103. package/lib/types/host/qoder/token-store.d.ts +280 -0
  104. package/lib/types/host/qoder/token-store.d.ts.map +1 -0
  105. package/lib/types/host/qoder/types.d.ts +257 -0
  106. package/lib/types/host/qoder/types.d.ts.map +1 -0
  107. package/lib/types/host/workbuddy/adapter.d.ts.map +1 -1
  108. package/lib/types/host/workbuddy/mapper.d.ts +1 -0
  109. package/lib/types/host/workbuddy/mapper.d.ts.map +1 -1
  110. package/lib/types/index.d.ts +15 -0
  111. package/lib/types/index.d.ts.map +1 -1
  112. package/lib/types/shared/opendesign-contracts.d.ts +159 -0
  113. package/lib/types/shared/opendesign-contracts.d.ts.map +1 -0
  114. package/lib/types/shared/qoder-contracts.d.ts +332 -0
  115. package/lib/types/shared/qoder-contracts.d.ts.map +1 -0
  116. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/locales.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,mBAAmB,CAAA;AAE7C,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA+FL,CAAA;AAEV,eAAO,MAAM,EAAE;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA6FL,CAAA;AAIV,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKxB,CAAA;AAED,MAAM,MAAM,mBAAmB,GAAG,MAAM,OAAO,EAAE,CAAA"}
@@ -0,0 +1,11 @@
1
+ /**
2
+ * OpenDesign's own prefixed classes only: the key form and the advanced
3
+ * controls, which the shared `.dsha-*` vocabulary has no expression for.
4
+ * Everything else on the tab reuses the shared card.
5
+ *
6
+ * `.dshod-input` mirrors the input styling another line declares under an
7
+ * unprefixed name on purpose: that class is that line's own, and a prefix of
8
+ * ours keeps this card's look from drifting with someone else's sheet.
9
+ */
10
+ export declare function installOpenDesignStyles(): void;
11
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/opendesign/styles.ts"],"names":[],"mappings":"AAEA;;;;;;;;GAQG;AACH,wBAAgB,uBAAuB,IAAI,IAAI,CA0B9C"}
@@ -0,0 +1,41 @@
1
+ /**
2
+ * Qoder(订阅)在输入框右侧的额度胶囊。
3
+ *
4
+ * 与兄弟线路的胶囊同款:胶囊是唯一一眼能看到数字的地方,所以点一下要走强制刷新;
5
+ * 而「显示哪一个数字」是每条线路唯一值得自己写的部分,因此单独导出一个纯函数
6
+ * selectBadgeFacts 供测试直接调用。
7
+ *
8
+ * 挑选口径:**只按有总额的桶选已用比例最高的那只**(个人 / 加购 / 组织包),
9
+ * 显示它的剩余百分比。桶是绝对量,而百分比需要 total 这个分母——没有 total 或
10
+ * total 为 0 的桶不参与选择(「上游没报」与「一点都不剩」必须长得不一样);
11
+ * 一只可计量的桶都没有时返回 null,即**不渲染胶囊**:装一个占位数字比不显示更像坏了。
12
+ */
13
+ import type { ModelDirectoryState } from '@deepseek-ai/dsh-client-ui-model-selection/client';
14
+ import type { PropsLocale, PropsRuntime } from '@deepseek-ai/dsh-client-ui-slots';
15
+ import { type QoderStatusDto } from '../../shared/qoder-contracts.ts';
16
+ import { type ComposerQuotaFacts } from '../common/ComposerQuotaBadge.tsx';
17
+ import type { SnapshotStore } from '../store.ts';
18
+ import { NS_QODER, type QoderLocaleKey } from './locales.ts';
19
+ type Props = PropsRuntime<'conversation.input.right'> & PropsLocale<typeof NS_QODER> & {
20
+ directory: SnapshotStore<ModelDirectoryState>;
21
+ loadModelDirectory: () => void;
22
+ };
23
+ /**
24
+ * 胶囊显示「最紧的那只桶」的剩余百分比。
25
+ *
26
+ * 多只桶互相独立地消耗,用户当下真正被卡住的是**已用比例最高**的那一只:
27
+ * 另外那只可能还剩一大半。所以这里不平均、不取最小剩余,而是取最大已用比例。
28
+ * 没有快照、没有桶、或全部桶都没有总额时返回 null(见文件头)。
29
+ */
30
+ export declare function selectBadgeFacts(status: QoderStatusDto | null, lookup?: (key: QoderLocaleKey) => string): ComposerQuotaFacts | null;
31
+ /**
32
+ * 输入框右侧的额度胶囊本体。
33
+ *
34
+ * **槽位号由波次 4 注册,本文件不注册任何槽位**:conversation.input.right 现有
35
+ * 35–44(codex → … → step-code → cline-pass),本线路取下一个号 45,id 沿用命名习惯
36
+ * 'qoder-quota',locale 为 NS_QODER。顺延而不是插号:给新线路重排既有号会让
37
+ * 已上线线路的槽位位置无谓地变一次。
38
+ */
39
+ export declare function QoderComposerQuota({ directory, loadModelDirectory, t }: Props): React.JSX.Element | null;
40
+ export {};
41
+ //# sourceMappingURL=QoderComposerQuota.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QoderComposerQuota.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/QoderComposerQuota.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,mDAAmD,CAAA;AAC5F,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,kCAAkC,CAAA;AACjF,OAAO,EAEL,KAAK,cAAc,EACpB,MAAM,iCAAiC,CAAA;AACxC,OAAO,EAAkC,KAAK,kBAAkB,EAAE,MAAM,kCAAkC,CAAA;AAC1G,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,aAAa,CAAA;AAEhD,OAAO,EAAE,QAAQ,EAAuB,KAAK,cAAc,EAAE,MAAM,cAAc,CAAA;AAEjF,KAAK,KAAK,GAAG,YAAY,CAAC,0BAA0B,CAAC,GAAG,WAAW,CAAC,OAAO,QAAQ,CAAC,GAAG;IACrF,SAAS,EAAE,aAAa,CAAC,mBAAmB,CAAC,CAAA;IAC7C,kBAAkB,EAAE,MAAM,IAAI,CAAA;CAC/B,CAAA;AAED;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAC9B,MAAM,EAAE,cAAc,GAAG,IAAI,EAC7B,MAAM,GAAE,CAAC,GAAG,EAAE,cAAc,KAAK,MAAyB,GACzD,kBAAkB,GAAG,IAAI,CAqB3B;AAED;;;;;;;GAOG;AACH,wBAAgB,kBAAkB,CAAC,EAAE,SAAS,EAAE,kBAAkB,EAAE,CAAC,EAAE,EAAE,KAAK,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,IAAI,CAYxG"}
@@ -0,0 +1,36 @@
1
+ /**
2
+ * Qoder(订阅)设置卡片。
3
+ *
4
+ * 纯渲染:状态、副作用与请求都在 'useQoderSection.ts',两者之间只通过一个具名结构
5
+ * 交接(GLM / WorkBuddy / Step Code 同款分工)。
6
+ *
7
+ * 本文件没有新建任何 UI 组件:进入入口(hub 卡片)在 hub/providers.tsx,账号池与它的
8
+ * 配额条在 AccountPoolSection,模型勾选在 ModelChecklist,上下文窗口在
9
+ * ContextWindowEditor,输入框胶囊在 QoderComposerQuota.tsx。
10
+ *
11
+ * 两条它自己负责的渲染规则:
12
+ *
13
+ * 1. **能力只画契约里的字段**:图片输入、思考档位、上下文窗口、输出预算全部来自
14
+ * DTO 字段(`supportsImages` / `reasoningEfforts` / `contextWindow` /
15
+ * `defaultMaxTokens`),客户端不按模型名推断任何一项;同一事实只呈现一次;
16
+ * 2. **额度画绝对量,缓存画 token 维度**:额度是三只桶的总量/已用/剩余(上游自述的
17
+ * 单位),缺桶不画;缓存只有读入/写入/样本,没数据就是占位符;单价未公开,
18
+ * 整页不出现任何金额。
19
+ *
20
+ * 版面纪律(全卡适用):**每个分组标题下最多留一行说明**,其余原句收进 .dshq-details
21
+ * 折叠区(moreNotes 辅助函数),阅读顺序因此固定为「标题 → 一句话 → 控件 → 折叠的补充
22
+ * 说明」。
23
+ */
24
+ import React from 'react';
25
+ import { type QoderModelOption } from '../../shared/qoder-contracts.ts';
26
+ import { type QoderSectionProps } from './useQoderSection.ts';
27
+ /**
28
+ * 一行模型的能力摘要:`1M · text+image · 档位 low/high/max · 输出 131k`。
29
+ *
30
+ * 全部取自契约字段(窗口、`supportsImages`、`reasoningEfforts`、
31
+ * `defaultMaxTokens`),客户端不按模型名推断任何一项。与 OpenDesign 卡同一写法:
32
+ * 数据一行,散文进折叠区。
33
+ */
34
+ export declare function qoderModelRowHint(model: QoderModelOption): string;
35
+ export declare function QoderSection({ onModelChange }?: QoderSectionProps): React.JSX.Element;
36
+ //# sourceMappingURL=QoderSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"QoderSection.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/QoderSection.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;GAsBG;AACH,OAAO,KAAK,MAAM,OAAO,CAAA;AACzB,OAAO,EAIL,KAAK,gBAAgB,EAGtB,MAAM,iCAAiC,CAAA;AAYxC,OAAO,EAAmB,KAAK,iBAAiB,EAAE,MAAM,sBAAsB,CAAA;AA4D9E;;;;;;GAMG;AACH,wBAAgB,iBAAiB,CAAC,KAAK,EAAE,gBAAgB,GAAG,MAAM,CAQjE;AAED,wBAAgB,YAAY,CAAC,EAAE,aAAa,EAAE,GAAE,iBAAsB,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,CAydzF"}
@@ -0,0 +1,4 @@
1
+ export declare const get: <T>(path: string) => Promise<T>;
2
+ export declare const post: <T>(path: string, body?: object) => Promise<T>;
3
+ export declare function messageOf(cause: unknown): string;
4
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/api.ts"],"names":[],"mappings":"AA8BA,eAAO,MAAM,GAAG,iCAAU,CAAA;AAC1B,eAAO,MAAM,IAAI,gDAAW,CAAA;AAE5B,wBAAgB,SAAS,CAAC,KAAK,EAAE,OAAO,GAAG,MAAM,CAEhD"}
@@ -0,0 +1,316 @@
1
+ import type { QoderAdoptResultDto, QoderQuotaBucketKind, QoderRegion } from '../../shared/qoder-contracts.ts';
2
+ /**
3
+ * Qoder(订阅)线路的客户端命名空间。
4
+ *
5
+ * 与其余每条线路一个命名空间:卡片渲染自己的字典,不复用 hub 挂在
6
+ * 'settings.section' 上的那张座位(那张座绑定的是 ChatGPT 的键集)。
7
+ */
8
+ export declare const NS_QODER = "dsh-qoder";
9
+ export declare const zh: {
10
+ title: string;
11
+ pageDesc: string;
12
+ loading: string;
13
+ /** 折叠区的标题:标题下只留一句,其余原句收在这里(折叠不是删除)。 */
14
+ moreNotes: string;
15
+ region: string;
16
+ regionGlobal: string;
17
+ regionCn: string;
18
+ regionHint: string;
19
+ regionHintExtra: string;
20
+ authorizing: string;
21
+ loginIdle: string;
22
+ /** idle 不是「你没登录」:host 的流程状态是进程内变量,重启后回到 idle 而号池里的账号还在。 */
23
+ loginHaveAccounts: string;
24
+ loginPending: string;
25
+ loginComplete: string;
26
+ loginCompletedAt: string;
27
+ loginCompleteNoAccount: string;
28
+ loginError: string;
29
+ loginRetryable: string;
30
+ loginNotRetryable: string;
31
+ authorizeUrl: string;
32
+ openAuthorizeUrl: string;
33
+ pollEvery: string;
34
+ loginExpiresAt: string;
35
+ progress: string;
36
+ cancelLogin: string;
37
+ cancelLoginBusy: string;
38
+ adopt: string;
39
+ adopting: string;
40
+ adoptAdopted: string;
41
+ adoptNoAttempt: string;
42
+ adoptFallback: string;
43
+ adoptNoCredentialsFile: string;
44
+ adoptInvalidCredentials: string;
45
+ adoptUnsupportedShape: string;
46
+ adoptNotAQoderLogin: string;
47
+ adoptRegionUnresolved: string;
48
+ dismiss: string;
49
+ manualPasteSection: string;
50
+ manualPasteHint: string;
51
+ manualPastePlaceholder: string;
52
+ manualPasteSubmit: string;
53
+ manualPasteSubmitting: string;
54
+ manualPasteEmpty: string;
55
+ connection: string;
56
+ routeOwned: string;
57
+ routeConflict: string;
58
+ testConnection: string;
59
+ testingConnection: string;
60
+ testSuccess: string;
61
+ testLatency: string;
62
+ testFailedDetail: string;
63
+ modelsSection: string;
64
+ modelsHint: string;
65
+ modelsHintExtra: string;
66
+ modelsUnavailable: string;
67
+ refreshCatalog: string;
68
+ refreshingCatalog: string;
69
+ selectAll: string;
70
+ unselectAll: string;
71
+ modelChecklistCount: string;
72
+ enabledModelIdsSemantics: string;
73
+ defaultEffort: string;
74
+ defaultEffortHint: string;
75
+ defaultEffortHintExtra: string;
76
+ defaultEffortModel: string;
77
+ effortMinimal: string;
78
+ effortLow: string;
79
+ effortMedium: string;
80
+ effortHigh: string;
81
+ effortXHigh: string;
82
+ effortMax: string;
83
+ contextWindowSection: string;
84
+ contextWindowHint: string;
85
+ contextWindowHintExtra: string;
86
+ contextWindowReset: string;
87
+ contextWindowResetAll: string;
88
+ contextWindowNoneEnabled: string;
89
+ tokens: string;
90
+ save: string;
91
+ saving: string;
92
+ invalidCapacity: string;
93
+ quotaSection: string;
94
+ quotaDesc: string;
95
+ quotaBucketPersonal: string;
96
+ quotaBucketAddOn: string;
97
+ quotaBucketOrg: string;
98
+ quotaRemaining: string;
99
+ quotaUsed: string;
100
+ quotaTotal: string;
101
+ quotaExpiresAt: string;
102
+ quotaReadAt: string;
103
+ quotaRegion: string;
104
+ quotaRefresh: string;
105
+ quotaRefreshing: string;
106
+ quotaRefreshingNote: string;
107
+ quotaEmpty: string;
108
+ quotaSignedOut: string;
109
+ quotaErrorLabel: string;
110
+ quotaNoUnit: string;
111
+ cacheSection: string;
112
+ cacheStatScope: string;
113
+ cacheDesc: string;
114
+ cacheEmpty: string;
115
+ cacheHitRatio: string;
116
+ cacheHitRatioUnavailable: string;
117
+ cacheReadTokens: string;
118
+ cacheMissedTokens: string;
119
+ cacheWriteTokens: string;
120
+ cacheRequests: string;
121
+ composerLabel: string;
122
+ quotaWindow: string;
123
+ accountPool: string;
124
+ addAccount: string;
125
+ accountCount: string;
126
+ primaryAccount: string;
127
+ activeAccount: string;
128
+ setPrimary: string;
129
+ deleteAccount: string;
130
+ cooling: string;
131
+ cooldownLeft: string;
132
+ cooldownRemaining: string;
133
+ cooldownRemainingSeconds: string;
134
+ modelCooldown: string;
135
+ clearCooldown: string;
136
+ needsRelogin: string;
137
+ relogin: string;
138
+ rotationStrategy: string;
139
+ strategySequential: string;
140
+ strategyRoundRobin: string;
141
+ strategySticky: string;
142
+ noAccounts: string;
143
+ email: string;
144
+ expires: string;
145
+ lastUsed: string;
146
+ accountId: string;
147
+ accountQuota: string;
148
+ quotaNone: string;
149
+ quotaSnapshot: string;
150
+ quotaResets: string;
151
+ quotaExhausted: string;
152
+ quotaFactsScope: string;
153
+ modelRowEfforts: string;
154
+ modelRowNoEfforts: string;
155
+ modelRowOutput: string;
156
+ };
157
+ export type QoderLocaleKey = keyof typeof zh;
158
+ export declare const en: Record<QoderLocaleKey, string>;
159
+ /** 两套字典。 */
160
+ export declare const dictionaries: {
161
+ zh: {
162
+ title: string;
163
+ pageDesc: string;
164
+ loading: string;
165
+ /** 折叠区的标题:标题下只留一句,其余原句收在这里(折叠不是删除)。 */
166
+ moreNotes: string;
167
+ region: string;
168
+ regionGlobal: string;
169
+ regionCn: string;
170
+ regionHint: string;
171
+ regionHintExtra: string;
172
+ authorizing: string;
173
+ loginIdle: string;
174
+ /** idle 不是「你没登录」:host 的流程状态是进程内变量,重启后回到 idle 而号池里的账号还在。 */
175
+ loginHaveAccounts: string;
176
+ loginPending: string;
177
+ loginComplete: string;
178
+ loginCompletedAt: string;
179
+ loginCompleteNoAccount: string;
180
+ loginError: string;
181
+ loginRetryable: string;
182
+ loginNotRetryable: string;
183
+ authorizeUrl: string;
184
+ openAuthorizeUrl: string;
185
+ pollEvery: string;
186
+ loginExpiresAt: string;
187
+ progress: string;
188
+ cancelLogin: string;
189
+ cancelLoginBusy: string;
190
+ adopt: string;
191
+ adopting: string;
192
+ adoptAdopted: string;
193
+ adoptNoAttempt: string;
194
+ adoptFallback: string;
195
+ adoptNoCredentialsFile: string;
196
+ adoptInvalidCredentials: string;
197
+ adoptUnsupportedShape: string;
198
+ adoptNotAQoderLogin: string;
199
+ adoptRegionUnresolved: string;
200
+ dismiss: string;
201
+ manualPasteSection: string;
202
+ manualPasteHint: string;
203
+ manualPastePlaceholder: string;
204
+ manualPasteSubmit: string;
205
+ manualPasteSubmitting: string;
206
+ manualPasteEmpty: string;
207
+ connection: string;
208
+ routeOwned: string;
209
+ routeConflict: string;
210
+ testConnection: string;
211
+ testingConnection: string;
212
+ testSuccess: string;
213
+ testLatency: string;
214
+ testFailedDetail: string;
215
+ modelsSection: string;
216
+ modelsHint: string;
217
+ modelsHintExtra: string;
218
+ modelsUnavailable: string;
219
+ refreshCatalog: string;
220
+ refreshingCatalog: string;
221
+ selectAll: string;
222
+ unselectAll: string;
223
+ modelChecklistCount: string;
224
+ enabledModelIdsSemantics: string;
225
+ defaultEffort: string;
226
+ defaultEffortHint: string;
227
+ defaultEffortHintExtra: string;
228
+ defaultEffortModel: string;
229
+ effortMinimal: string;
230
+ effortLow: string;
231
+ effortMedium: string;
232
+ effortHigh: string;
233
+ effortXHigh: string;
234
+ effortMax: string;
235
+ contextWindowSection: string;
236
+ contextWindowHint: string;
237
+ contextWindowHintExtra: string;
238
+ contextWindowReset: string;
239
+ contextWindowResetAll: string;
240
+ contextWindowNoneEnabled: string;
241
+ tokens: string;
242
+ save: string;
243
+ saving: string;
244
+ invalidCapacity: string;
245
+ quotaSection: string;
246
+ quotaDesc: string;
247
+ quotaBucketPersonal: string;
248
+ quotaBucketAddOn: string;
249
+ quotaBucketOrg: string;
250
+ quotaRemaining: string;
251
+ quotaUsed: string;
252
+ quotaTotal: string;
253
+ quotaExpiresAt: string;
254
+ quotaReadAt: string;
255
+ quotaRegion: string;
256
+ quotaRefresh: string;
257
+ quotaRefreshing: string;
258
+ quotaRefreshingNote: string;
259
+ quotaEmpty: string;
260
+ quotaSignedOut: string;
261
+ quotaErrorLabel: string;
262
+ quotaNoUnit: string;
263
+ cacheSection: string;
264
+ cacheStatScope: string;
265
+ cacheDesc: string;
266
+ cacheEmpty: string;
267
+ cacheHitRatio: string;
268
+ cacheHitRatioUnavailable: string;
269
+ cacheReadTokens: string;
270
+ cacheMissedTokens: string;
271
+ cacheWriteTokens: string;
272
+ cacheRequests: string;
273
+ composerLabel: string;
274
+ quotaWindow: string;
275
+ accountPool: string;
276
+ addAccount: string;
277
+ accountCount: string;
278
+ primaryAccount: string;
279
+ activeAccount: string;
280
+ setPrimary: string;
281
+ deleteAccount: string;
282
+ cooling: string;
283
+ cooldownLeft: string;
284
+ cooldownRemaining: string;
285
+ cooldownRemainingSeconds: string;
286
+ modelCooldown: string;
287
+ clearCooldown: string;
288
+ needsRelogin: string;
289
+ relogin: string;
290
+ rotationStrategy: string;
291
+ strategySequential: string;
292
+ strategyRoundRobin: string;
293
+ strategySticky: string;
294
+ noAccounts: string;
295
+ email: string;
296
+ expires: string;
297
+ lastUsed: string;
298
+ accountId: string;
299
+ accountQuota: string;
300
+ quotaNone: string;
301
+ quotaSnapshot: string;
302
+ quotaResets: string;
303
+ quotaExhausted: string;
304
+ quotaFactsScope: string;
305
+ modelRowEfforts: string;
306
+ modelRowNoEfforts: string;
307
+ modelRowOutput: string;
308
+ };
309
+ en: Record<"quotaRefreshing" | "rotationStrategy" | "accountId" | "relogin" | "tokens" | "title" | "expires" | "loading" | "connection" | "testConnection" | "selectAll" | "unselectAll" | "modelsHint" | "contextWindowReset" | "contextWindowResetAll" | "save" | "quotaSignedOut" | "modelChecklistCount" | "accountPool" | "addAccount" | "accountCount" | "primaryAccount" | "activeAccount" | "setPrimary" | "deleteAccount" | "cooling" | "cooldownLeft" | "cooldownRemaining" | "cooldownRemainingSeconds" | "modelCooldown" | "clearCooldown" | "needsRelogin" | "strategySequential" | "strategyRoundRobin" | "strategySticky" | "noAccounts" | "email" | "lastUsed" | "accountQuota" | "quotaNone" | "quotaSnapshot" | "quotaResets" | "quotaExhausted" | "quotaWindow" | "quotaUsed" | "quotaFactsScope" | "composerLabel" | "progress" | "pageDesc" | "modelsSection" | "contextWindowSection" | "contextWindowHint" | "contextWindowNoneEnabled" | "saving" | "cacheSection" | "cacheDesc" | "cacheEmpty" | "cacheHitRatio" | "cacheRequests" | "quotaSection" | "quotaDesc" | "quotaEmpty" | "openAuthorizeUrl" | "authorizeUrl" | "loginComplete" | "manualPasteSection" | "manualPasteHint" | "manualPastePlaceholder" | "manualPasteSubmit" | "manualPasteSubmitting" | "testingConnection" | "testSuccess" | "testLatency" | "routeOwned" | "routeConflict" | "refreshCatalog" | "refreshingCatalog" | "effortLow" | "effortMedium" | "effortHigh" | "effortXHigh" | "effortMax" | "adopt" | "region" | "regionCn" | "regionHint" | "authorizing" | "loginIdle" | "loginHaveAccounts" | "loginPending" | "loginCompletedAt" | "loginCompleteNoAccount" | "loginError" | "loginRetryable" | "loginNotRetryable" | "pollEvery" | "loginExpiresAt" | "cancelLogin" | "cancelLoginBusy" | "manualPasteEmpty" | "adopting" | "adoptAdopted" | "adoptNoAttempt" | "adoptNoCredentialsFile" | "adoptFallback" | "testFailedDetail" | "modelsUnavailable" | "dismiss" | "invalidCapacity" | "quotaRefresh" | "quotaReadAt" | "quotaRefreshingNote" | "quotaErrorLabel" | "regionGlobal" | "moreNotes" | "adoptInvalidCredentials" | "adoptUnsupportedShape" | "modelsHintExtra" | "enabledModelIdsSemantics" | "defaultEffort" | "defaultEffortHint" | "defaultEffortHintExtra" | "defaultEffortModel" | "effortMinimal" | "contextWindowHintExtra" | "quotaRegion" | "cacheStatScope" | "cacheReadTokens" | "cacheMissedTokens" | "cacheHitRatioUnavailable" | "quotaRemaining" | "regionHintExtra" | "adoptNotAQoderLogin" | "adoptRegionUnresolved" | "quotaBucketPersonal" | "quotaBucketAddOn" | "quotaBucketOrg" | "quotaTotal" | "quotaExpiresAt" | "quotaNoUnit" | "cacheWriteTokens" | "modelRowEfforts" | "modelRowNoEfforts" | "modelRowOutput", string>;
310
+ };
311
+ /** adopt 的失败原因(冻结契约的联合)。 */
312
+ export type AdoptReason = NonNullable<QoderAdoptResultDto['reason']>;
313
+ export declare function adoptReasonText(reason: AdoptReason, dictionary: Record<QoderLocaleKey, string>): string;
314
+ export declare function regionText(region: QoderRegion, dictionary: Record<QoderLocaleKey, string>): string;
315
+ export declare function quotaBucketText(kind: QoderQuotaBucketKind, dictionary: Record<QoderLocaleKey, string>): string;
316
+ //# sourceMappingURL=locales.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"locales.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/locales.ts"],"names":[],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0,0 +1,16 @@
1
+ export declare const STYLE_ID = "dsh-qoder-settings-style";
2
+ /**
3
+ * Qoder(订阅)卡片独有的样式。
4
+ *
5
+ * 共享样式一律不重复声明:模型清单(.dsh-mcl-*)由 common/model-checklist-styles.ts
6
+ * 负责,账号卡与其配额条(.dsha-account-*)由 common/styles.ts 负责,基础控件
7
+ * (.dsha-page / .dsha-group / .dsha-row / 计量条 .dsha-meter-* 等)由兄弟线路的安装器
8
+ * 负责;本卡直接用它们,不在这里再写一遍。
9
+ *
10
+ * 本文件只声明别处没有的三样:登录流程块(临时内容)、兜底入口行与 PAT 粘贴面板、
11
+ * 等宽文本与额度桶列表。
12
+ *
13
+ * 前缀统一 .dshq-(Qoder),不与任何兄弟线路的选择器相撞。
14
+ */
15
+ export declare function installQoderStyles(): void;
16
+ //# sourceMappingURL=styles.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/styles.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,QAAQ,6BAA6B,CAAA;AAElD;;;;;;;;;;;;GAYG;AACH,wBAAgB,kBAAkB,IAAI,IAAI,CAoCzC"}
@@ -0,0 +1,97 @@
1
+ import type { AccountRotationStrategy } from '../../shared/account-pool-contracts.ts';
2
+ import { type QoderAccountSummaryDto, type QoderAdoptResultDto, type QoderConnectionDto, type QoderLoginFlowStatus, type QoderModelOption, type QoderReasoningEffort, type QoderRegion, type QoderStatusDto } from '../../shared/qoder-contracts.ts';
3
+ import type { AccountPoolLabels } from '../common/AccountPoolSection.tsx';
4
+ import { zh } from './locales.ts';
5
+ /** 卡片渲染的键。与兄弟卡片一样用自己的字典。 */
6
+ export type Translate = (key: keyof typeof zh) => string;
7
+ /** 本卡片的字典;身份稳定,依赖它的 effect 才不会每次渲染重建。 */
8
+ export declare const fallbackTranslate: Translate;
9
+ /**
10
+ * 本线路的缓存统计(本机自报,token 维度)。
11
+ *
12
+ * 三个数都是 token,没有金额:Qoder 订阅没有公开的 token 单价(计划 §5),
13
+ * 拿编的费率算出「省了 N 元」是撒谎。
14
+ */
15
+ export interface QoderCacheStats {
16
+ cacheReadTokens: number;
17
+ missedInputTokens: number;
18
+ cacheWriteTokens: number;
19
+ /** 这些数字覆盖了几次请求;没有它就不知道样本有多大。 */
20
+ requests: number | null;
21
+ }
22
+ /**
23
+ * 从一份 status 里取缓存统计;取不到返回 null。
24
+ *
25
+ * 返回 null 而不是零值对象,是因为「上游没报」与「报了个 0」在卡片上必须长得不一样:
26
+ * 前者显示占位符,后者显示真实的 0%。
27
+ */
28
+ export declare function readCacheStats(status: QoderStatusDto | null): QoderCacheStats | null;
29
+ /**
30
+ * 缓存命中率 = 缓存读入 /(缓存读入 + 未命中输入)。
31
+ *
32
+ * 分母为 0 时返回 **null**,卡片据此画占位符:把「没有样本」写成 0% 是谎报。
33
+ */
34
+ export declare function cacheHitRatio(stats: QoderCacheStats | null): number | null;
35
+ export interface QoderSectionProps {
36
+ onModelChange?: () => void;
37
+ }
38
+ /** 账号卡片上的一个动作。 */
39
+ export type QoderAccountAction = 'set-primary' | 'delete' | 'clear-cooldown' | 'relogin';
40
+ /** 视图可以消费的全部内容,按「会变的事实 / 从答案派生的 / 能触发的」分组。 */
41
+ export interface QoderSectionView {
42
+ state: {
43
+ status: QoderStatusDto | null;
44
+ loading: boolean;
45
+ busy: string | null;
46
+ error: string | null;
47
+ connection: QoderConnectionDto | null;
48
+ adoptResult: QoderAdoptResultDto | null;
49
+ /** 手工粘贴的 PAT;提交后立即清空,只在这一行的受控输入里存在。 */
50
+ pasteValue: string;
51
+ /** 下一次浏览器登录 / PAT 粘贴按哪个区域发起。 */
52
+ region: QoderRegion;
53
+ /** 手工粘贴兜底是否展开(没有进行中的流程时默认收起)。 */
54
+ pasteOpen: boolean;
55
+ contextDrafts: Record<string, string>;
56
+ savingModel: string | null;
57
+ };
58
+ derived: {
59
+ accounts: QoderAccountSummaryDto[];
60
+ models: QoderModelOption[];
61
+ /** 上下文窗口编辑器的行:只有勾选了的模型才有可覆盖的窗口。 */
62
+ contextModels: QoderModelOption[];
63
+ overrideCount: number;
64
+ login: QoderLoginFlowStatus | null;
65
+ quota: QoderStatusDto['quota'];
66
+ authenticated: boolean;
67
+ poolLabels: AccountPoolLabels;
68
+ /** 缓存统计;host 未下发时为 null(卡片显示占位而不是 0%)。 */
69
+ cache: QoderCacheStats | null;
70
+ /** 缓存命中率;没有样本时为 null。 */
71
+ cacheHitRatio: number | null;
72
+ };
73
+ actions: {
74
+ setRegion(region: QoderRegion): void;
75
+ login(region: QoderRegion): Promise<void>;
76
+ cancelLogin(): Promise<void>;
77
+ submitPaste(): Promise<void>;
78
+ setPasteValue(value: string): void;
79
+ togglePaste(): void;
80
+ adopt(): Promise<void>;
81
+ clearAdoptResult(): void;
82
+ accountAction(action: QoderAccountAction, accountId: string): Promise<void>;
83
+ setStrategy(strategy: AccountRotationStrategy): Promise<void>;
84
+ toggleModel(modelId: string, enabled: boolean): void;
85
+ setAllModels(enabled: boolean): void;
86
+ saveContextWindow(modelId: string): Promise<void>;
87
+ resetContextWindow(modelId: string): Promise<void>;
88
+ resetAllContextWindows(): Promise<void>;
89
+ updateContextDraft(modelId: string, draft: string): void;
90
+ setDefaultReasoningEffort(effort: QoderReasoningEffort | null): Promise<void>;
91
+ refreshQuota(): Promise<void>;
92
+ refreshCatalog(): Promise<void>;
93
+ testConnection(): Promise<void>;
94
+ };
95
+ }
96
+ export declare function useQoderSection({ onModelChange }?: QoderSectionProps): QoderSectionView;
97
+ //# sourceMappingURL=useQoderSection.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useQoderSection.d.ts","sourceRoot":"","sources":["../../../../src/client/qoder/useQoderSection.ts"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAA;AACrF,OAAO,EAEL,KAAK,sBAAsB,EAC3B,KAAK,mBAAmB,EACxB,KAAK,kBAAkB,EACvB,KAAK,oBAA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AI,CAAC,CAAA;QAC3E,WAAW,CAAC,QAAQ,EAAE,uBAAuB,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC7D,WAAW,CAAC,OAAO,EAAE,MAAM,EAAE,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;QACpD,YAAY,CAAC,OAAO,EAAE,OAAO,GAAG,IAAI,CAAA;QACpC,iBAAiB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QACjD,kBAAkB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAClD,sBAAsB,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QACvC,kBAAkB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;QACxD,yBAAyB,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAA;QAC7E,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QAC7B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;QAC/B,cAAc,IAAI,OAAO,CAAC,IAAI,CAAC,CAAA;KAChC,CAAA;CACF;AAED,wBAAgB,eAAe,CAAC,EAAE,aAAa,EAAE,GAAE,iBAAsB,GAAG,gBAAgB,CAua3F"}
@@ -1,5 +1,5 @@
1
1
  import { ConcurrencyGate } from './concurrency-gate.ts';
2
- export declare const CONTROLLED_PROVIDERS: readonly ["codex-chatgpt", "claude", "antigravity", "kimi-code", "minimax-code", "command-code", "workbuddy", "ollama", "glm-coding-plan", "step-code", "cline-pass"];
2
+ export declare const CONTROLLED_PROVIDERS: readonly ["codex-chatgpt", "claude", "antigravity", "kimi-code", "minimax-code", "command-code", "workbuddy", "ollama", "glm-coding-plan", "step-code", "cline-pass", "qoder", "opendesign"];
3
3
  export type ControlledProvider = typeof CONTROLLED_PROVIDERS[number];
4
4
  export interface ModelRequestLimits {
5
5
  /** Per credential limits, not guessed subscription entitlements. Zero disables. */
@@ -1 +1 @@
1
- {"version":3,"file":"model-request-control.d.ts","sourceRoot":"","sources":["../../../../src/host/common/model-request-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,eAAO,MAAM,oBAAoB,uKAAwK,CAAA;AACzM,MAAM,MAAM,kBAAkB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AACpE,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAA;IACvD,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,kBAAkB,CAqB/F;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAO9F;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAED,4FAA4F;AAC5F,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAA0B,GAAG,OAAO,KAAK,CAmErH"}
1
+ {"version":3,"file":"model-request-control.d.ts","sourceRoot":"","sources":["../../../../src/host/common/model-request-control.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAA;AAEvD,eAAO,MAAM,oBAAoB,8LAA+L,CAAA;AAChO,MAAM,MAAM,kBAAkB,GAAG,OAAO,oBAAoB,CAAC,MAAM,CAAC,CAAA;AACpE,MAAM,WAAW,kBAAkB;IACjC,mFAAmF;IACnF,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,SAAS,CAAC,EAAE,OAAO,CAAC,MAAM,CAAC,kBAAkB,EAAE,MAAM,CAAC,CAAC,CAAA;IACvD,cAAc,CAAC,EAAE,MAAM,CAAA;CACxB;AAED,gFAAgF;AAChF,wBAAgB,sBAAsB,CAAC,GAAG,GAAE,MAAM,CAAC,UAAwB,GAAG,kBAAkB,CAqB/F;AAED,kGAAkG;AAClG,wBAAgB,cAAc,CAAC,KAAK,EAAE,UAAU,CAAC,OAAO,KAAK,CAAC,CAAC,CAAC,CAAC,EAAE,IAAI,CAAC,EAAE,WAAW,GAAG,OAAO,CAO9F;AAED,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,kBAAkB,CAAA;IAC5B,MAAM,EAAE,kBAAkB,CAAA;IAC1B,IAAI,CAAC,EAAE,eAAe,CAAA;CACvB;AAED,4FAA4F;AAC5F,wBAAgB,0BAA0B,CAAC,SAAS,EAAE,OAAO,KAAK,EAAE,OAAO,EAAE,0BAA0B,GAAG,OAAO,KAAK,CAmErH"}
@@ -13,7 +13,7 @@
13
13
  *
14
14
  * @module dsh-chatgpt-subscription/request-diagnostics
15
15
  */
16
- export declare const DIAGNOSTIC_PROVIDERS: readonly ["codex-chatgpt", "claude-subscription", "antigravity", "kimi-code", "minimax-code", "command-code", "workbuddy-subscription", "ollama", "claude", "workbuddy", "codex", "glm-coding-plan", "step-code", "cline-pass"];
16
+ export declare const DIAGNOSTIC_PROVIDERS: readonly ["codex-chatgpt", "claude-subscription", "antigravity", "kimi-code", "minimax-code", "command-code", "workbuddy-subscription", "ollama", "claude", "workbuddy", "codex", "glm-coding-plan", "step-code", "cline-pass", "qoder", "opendesign"];
17
17
  export type DiagnosticProviderId = (typeof DIAGNOSTIC_PROVIDERS)[number];
18
18
  export declare const KNOWN_WIRE_ENDPOINTS: readonly ["messages", "responses", "chat_completions", "generate_content", "stream_generate_content", "ollama_chat", "ollama_generate", "workbuddy_chat", "unknown"];
19
19
  export type KnownWireEndpoint = (typeof KNOWN_WIRE_ENDPOINTS)[number];
@@ -1 +1 @@
1
- {"version":3,"file":"request-diagnostics.d.ts","sourceRoot":"","sources":["../../../../src/host/common/request-diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;GAcG;AAIH,eAAO,MAAM,oBAAoB,iOAmBvB,CAAA;AAEV,MAAM,MAAM,oBAAoB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAExE,eAAO,MAAM,oBAAoB,sKAUvB,CAAA;AAEV,MAAM,MAAM,iBAAiB,GAAG,CAAC,OAAO,oBAAoB,CAAC,CAAC,MAAM,CAAC,CAAA;AAErE,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,oBAAoB,CAEnF;AAED,wBAAgB,eAAe,CAAC,QAAQ,EAAE,OAAO,GAAG,QAAQ,IAAI,iBAAiB,CAEhF;AAED,MAAM,MAAM,eAAe,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,OAAO,CAAA;AAErE,MAAM,WAAW,aAAa;IAC5B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,WAAW,CAAC,EAAE,MAAM,CAAA;CACrB;AAED,MAAM,WAAW,qBAAqB;IACpC,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,gBAAgB,CAAC,EAAE,MAAM,CAAA;IACzB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,WAAW,CAAC,EAAE,OAAO,C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