@eddyskywalker/dsh-chatgpt-subscription 0.12.1 → 0.12.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (54) hide show
  1. package/CHANGELOG.md +619 -787
  2. package/lib/client.js +16 -1
  3. package/lib/client.js.map +1 -1
  4. package/lib/index.js +2671 -1577
  5. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -1
  6. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -1
  7. package/lib/types/client/kimi-code/locales.d.ts +11 -2
  8. package/lib/types/client/kimi-code/locales.d.ts.map +1 -1
  9. package/lib/types/client/kimi-code/styles.d.ts.map +1 -1
  10. package/lib/types/host/common/idle-watchdog.d.ts +10 -0
  11. package/lib/types/host/common/idle-watchdog.d.ts.map +1 -1
  12. package/lib/types/host/common/prompt-estimate.d.ts +22 -0
  13. package/lib/types/host/common/prompt-estimate.d.ts.map +1 -0
  14. package/lib/types/host/common/request-images.d.ts +130 -0
  15. package/lib/types/host/common/request-images.d.ts.map +1 -0
  16. package/lib/types/host/common/tool-schema.d.ts +27 -0
  17. package/lib/types/host/common/tool-schema.d.ts.map +1 -0
  18. package/lib/types/host/common/video-request.d.ts +81 -0
  19. package/lib/types/host/common/video-request.d.ts.map +1 -0
  20. package/lib/types/host/common/video.d.ts +90 -0
  21. package/lib/types/host/common/video.d.ts.map +1 -0
  22. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -1
  23. package/lib/types/host/kimi-code/cache-hint.d.ts +76 -0
  24. package/lib/types/host/kimi-code/cache-hint.d.ts.map +1 -0
  25. package/lib/types/host/kimi-code/client.d.ts +36 -1
  26. package/lib/types/host/kimi-code/client.d.ts.map +1 -1
  27. package/lib/types/host/kimi-code/mapper.d.ts +118 -145
  28. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -1
  29. package/lib/types/host/kimi-code/modalities.d.ts +9 -80
  30. package/lib/types/host/kimi-code/modalities.d.ts.map +1 -1
  31. package/lib/types/host/kimi-code/routes.d.ts +8 -0
  32. package/lib/types/host/kimi-code/routes.d.ts.map +1 -1
  33. package/lib/types/host/kimi-code/token-store.d.ts +30 -1
  34. package/lib/types/host/kimi-code/token-store.d.ts.map +1 -1
  35. package/lib/types/host/kimi-code/video-store.d.ts.map +1 -1
  36. package/lib/types/host/minimax-code/adapter.d.ts +8 -1
  37. package/lib/types/host/minimax-code/adapter.d.ts.map +1 -1
  38. package/lib/types/host/minimax-code/files-api.d.ts +117 -0
  39. package/lib/types/host/minimax-code/files-api.d.ts.map +1 -0
  40. package/lib/types/host/minimax-code/mapper.d.ts +50 -25
  41. package/lib/types/host/minimax-code/mapper.d.ts.map +1 -1
  42. package/lib/types/host/minimax-code/modalities.d.ts +20 -0
  43. package/lib/types/host/minimax-code/modalities.d.ts.map +1 -0
  44. package/lib/types/host/minimax-code/model-catalog.d.ts +27 -11
  45. package/lib/types/host/minimax-code/model-catalog.d.ts.map +1 -1
  46. package/lib/types/host/minimax-code/types.d.ts +10 -0
  47. package/lib/types/host/minimax-code/types.d.ts.map +1 -1
  48. package/lib/types/host/reasoning-collapse-guard/index.d.ts +42 -10
  49. package/lib/types/host/reasoning-collapse-guard/index.d.ts.map +1 -1
  50. package/lib/types/index.d.ts +1 -1
  51. package/lib/types/index.d.ts.map +1 -1
  52. package/lib/types/shared/kimi-code-contracts.d.ts +65 -0
  53. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -1
  54. package/package.json +1 -1
package/lib/client.js CHANGED
@@ -5145,6 +5145,8 @@ window.__ModuleLoader__.load({
5145
5145
  capColTools: "动态工具",
5146
5146
  capColNotes: "说明",
5147
5147
  capPlan: "需要套餐:{plan}",
5148
+ capInputCap: "输入上限 {tokens}",
5149
+ capNoTools: "不支持工具",
5148
5150
  speedRegular: "标准",
5149
5151
  speedHighspeed: "高速 (约 6×)",
5150
5152
  quotaCost: "额度倍率",
@@ -5181,6 +5183,7 @@ window.__ModuleLoader__.load({
5181
5183
  cacheOutput: "输出 tokens",
5182
5184
  cacheRequests: "请求数",
5183
5185
  cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。",
5186
+ cacheExpired: "本会话已空闲超过缓存有效期,下一轮将重新处理约 {tokens} 个 token。",
5184
5187
  cacheDrift: "最近前缀状态",
5185
5188
  cacheDriftFirst: "首个请求(缓存为空)",
5186
5189
  cacheDriftStable: "稳定(前缀未变)",
@@ -5274,6 +5277,8 @@ window.__ModuleLoader__.load({
5274
5277
  capColTools: "Dynamic tools",
5275
5278
  capColNotes: "Notes",
5276
5279
  capPlan: "Requires plan: {plan}",
5280
+ capInputCap: "Input cap {tokens}",
5281
+ capNoTools: "No tools",
5277
5282
  speedRegular: "Regular",
5278
5283
  speedHighspeed: "HighSpeed (~6x)",
5279
5284
  quotaCost: "Quota cost",
@@ -5304,6 +5309,7 @@ window.__ModuleLoader__.load({
5304
5309
  cacheSection: "Cache & K3 tuning",
5305
5310
  cacheDesc: "Kimi's prefix cache is automatic and content-hash based — there is no marker to set — so the cache-read ratio is the only evidence it is working.",
5306
5311
  cacheEmpty: "No request in this process has reported usage yet.",
5312
+ cacheExpired: "This conversation sat idle past the cache lifetime, so the next turn reprocesses about {tokens} tokens.",
5307
5313
  cacheHitRatio: "Cache hit ratio",
5308
5314
  cacheCached: "Cached tokens",
5309
5315
  cacheFresh: "Fresh tokens",
@@ -5371,6 +5377,7 @@ window.__ModuleLoader__.load({
5371
5377
  model.id,
5372
5378
  model.wire === "anthropic" ? t.wireAnthropic : t.wireOpenai,
5373
5379
  ...model.defaultReasoningEffort ? [t.defaultReasoningEffort + ": " + model.defaultReasoningEffort] : [],
5380
+ ...model.maxInputTokens === void 0 ? [] : [t.capInputCap.replace("{tokens}", String(model.maxInputTokens))],
5374
5381
  ...model.minimumPlan ? [t.capPlan.replace("{plan}", model.minimumPlan)] : []
5375
5382
  ].join(" · "),
5376
5383
  children: model.name
@@ -5382,9 +5389,12 @@ window.__ModuleLoader__.load({
5382
5389
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", { children: model.supportsDynamicTools ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5383
5390
  className: "dsha-cap-on",
5384
5391
  children: t.capDynamicTools
5385
- }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5392
+ }) : model.supportsToolUse ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5386
5393
  className: "dsha-cap-off",
5387
5394
  children: t.capNone
5395
+ }) : /* @__PURE__ */ (0, react_jsx_runtime.jsx)("span", {
5396
+ className: "dsha-cap-off",
5397
+ children: t.capNoTools
5388
5398
  }) }),
5389
5399
  /* @__PURE__ */ (0, react_jsx_runtime.jsx)("td", {
5390
5400
  className: "dsha-cap-notes",
@@ -6019,6 +6029,10 @@ window.__ModuleLoader__.load({
6019
6029
  className: "dsha-muted",
6020
6030
  children: t.cacheDesc
6021
6031
  }),
6032
+ status?.cacheHint != null && /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6033
+ className: "dsha-warn",
6034
+ children: t.cacheExpired.replace("{tokens}", status.cacheHint.totalTokens.toLocaleString())
6035
+ }),
6022
6036
  status?.cache == null ? /* @__PURE__ */ (0, react_jsx_runtime.jsx)("div", {
6023
6037
  className: "dsha-empty",
6024
6038
  children: t.cacheEmpty
@@ -10696,6 +10710,7 @@ window.__ModuleLoader__.load({
10696
10710
  .dsha-cap-off{color:var(--dsw-alias-label-tertiary)}
10697
10711
  .dsha-cap-notes{line-height:1.5;min-width:200px}
10698
10712
  .dsha-cap-footnote{font-size:11px;line-height:1.55;margin:8px 0 0}
10713
+ .dsha-warn{border:0.5px solid var(--dsw-alias-border-l2);border-radius:6px;line-height:1.55;margin:0 0 10px;padding:8px 10px}
10699
10714
  `;
10700
10715
  /** Kimi-specific rules layered on top of the shared control styles. */
10701
10716
  function installKimiCodeStyles() {