@eddyskywalker/dsh-chatgpt-subscription 0.2.21 → 0.3.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 (74) hide show
  1. package/CHANGELOG.md +74 -0
  2. package/README.md +115 -1
  3. package/lib/client.js +2825 -512
  4. package/lib/client.js.map +1 -1
  5. package/lib/index.js +8630 -389
  6. package/lib/types/client/ProviderHubSection.d.ts +15 -0
  7. package/lib/types/client/ProviderHubSection.d.ts.map +1 -0
  8. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts +24 -0
  9. package/lib/types/client/command-code/CommandCodeComposerQuota.d.ts.map +1 -0
  10. package/lib/types/client/command-code/CommandCodeSection.d.ts +11 -0
  11. package/lib/types/client/command-code/CommandCodeSection.d.ts.map +1 -0
  12. package/lib/types/client/command-code/locales.d.ts +401 -0
  13. package/lib/types/client/command-code/locales.d.ts.map +1 -0
  14. package/lib/types/client/index.d.ts +2 -0
  15. package/lib/types/client/index.d.ts.map +1 -1
  16. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts +25 -0
  17. package/lib/types/client/kimi-code/KimiCodeComposerQuota.d.ts.map +1 -0
  18. package/lib/types/client/kimi-code/KimiCodeSection.d.ts +11 -0
  19. package/lib/types/client/kimi-code/KimiCodeSection.d.ts.map +1 -0
  20. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts +16 -0
  21. package/lib/types/client/kimi-code/KimiModelCapabilities.d.ts.map +1 -0
  22. package/lib/types/client/kimi-code/locales.d.ts +665 -0
  23. package/lib/types/client/kimi-code/locales.d.ts.map +1 -0
  24. package/lib/types/client/kimi-code/styles.d.ts +4 -0
  25. package/lib/types/client/kimi-code/styles.d.ts.map +1 -0
  26. package/lib/types/client/locales.d.ts +3 -1
  27. package/lib/types/client/locales.d.ts.map +1 -1
  28. package/lib/types/client/styles.d.ts.map +1 -1
  29. package/lib/types/host/command-code/adapter.d.ts +34 -0
  30. package/lib/types/host/command-code/adapter.d.ts.map +1 -0
  31. package/lib/types/host/command-code/client.d.ts +99 -0
  32. package/lib/types/host/command-code/client.d.ts.map +1 -0
  33. package/lib/types/host/command-code/mapper.d.ts +102 -0
  34. package/lib/types/host/command-code/mapper.d.ts.map +1 -0
  35. package/lib/types/host/command-code/model-catalog.d.ts +31 -0
  36. package/lib/types/host/command-code/model-catalog.d.ts.map +1 -0
  37. package/lib/types/host/command-code/oauth.d.ts +89 -0
  38. package/lib/types/host/command-code/oauth.d.ts.map +1 -0
  39. package/lib/types/host/command-code/plans.d.ts +40 -0
  40. package/lib/types/host/command-code/plans.d.ts.map +1 -0
  41. package/lib/types/host/command-code/routes.d.ts +27 -0
  42. package/lib/types/host/command-code/routes.d.ts.map +1 -0
  43. package/lib/types/host/command-code/token-store.d.ts +88 -0
  44. package/lib/types/host/command-code/token-store.d.ts.map +1 -0
  45. package/lib/types/host/command-code/types.d.ts +138 -0
  46. package/lib/types/host/command-code/types.d.ts.map +1 -0
  47. package/lib/types/host/kimi-code/adapter.d.ts +112 -0
  48. package/lib/types/host/kimi-code/adapter.d.ts.map +1 -0
  49. package/lib/types/host/kimi-code/client.d.ts +161 -0
  50. package/lib/types/host/kimi-code/client.d.ts.map +1 -0
  51. package/lib/types/host/kimi-code/mapper.d.ts +334 -0
  52. package/lib/types/host/kimi-code/mapper.d.ts.map +1 -0
  53. package/lib/types/host/kimi-code/modalities.d.ts +94 -0
  54. package/lib/types/host/kimi-code/modalities.d.ts.map +1 -0
  55. package/lib/types/host/kimi-code/model-catalog.d.ts +77 -0
  56. package/lib/types/host/kimi-code/model-catalog.d.ts.map +1 -0
  57. package/lib/types/host/kimi-code/oauth.d.ts +133 -0
  58. package/lib/types/host/kimi-code/oauth.d.ts.map +1 -0
  59. package/lib/types/host/kimi-code/routes.d.ts +26 -0
  60. package/lib/types/host/kimi-code/routes.d.ts.map +1 -0
  61. package/lib/types/host/kimi-code/token-store.d.ts +135 -0
  62. package/lib/types/host/kimi-code/token-store.d.ts.map +1 -0
  63. package/lib/types/host/kimi-code/types.d.ts +174 -0
  64. package/lib/types/host/kimi-code/types.d.ts.map +1 -0
  65. package/lib/types/host/relay-probe.d.ts +161 -0
  66. package/lib/types/host/relay-probe.d.ts.map +1 -0
  67. package/lib/types/host/responses-client.d.ts.map +1 -1
  68. package/lib/types/index.d.ts +13 -0
  69. package/lib/types/index.d.ts.map +1 -1
  70. package/lib/types/shared/command-code-contracts.d.ts +119 -0
  71. package/lib/types/shared/command-code-contracts.d.ts.map +1 -0
  72. package/lib/types/shared/kimi-code-contracts.d.ts +203 -0
  73. package/lib/types/shared/kimi-code-contracts.d.ts.map +1 -0
  74. package/package.json +1 -1
@@ -0,0 +1,665 @@
1
+ export declare const NS_KIMI_CODE = "dsh-kimi-code";
2
+ export declare const zh: {
3
+ readonly title: "Kimi Code";
4
+ readonly pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。";
5
+ readonly account: "账号";
6
+ readonly signedIn: "已登录";
7
+ readonly signedOut: "未登录";
8
+ readonly nickname: "昵称";
9
+ readonly email: "邮箱";
10
+ readonly plan: "套餐";
11
+ readonly planUnknown: "—";
12
+ readonly region: "区域";
13
+ readonly regionMainland: "中国大陆 (kimi.com)";
14
+ readonly regionGlobal: "国际 (kimi.ai)";
15
+ readonly authenticatedAt: "登录时间";
16
+ readonly storage: "凭据存储";
17
+ readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/kimi-code-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
18
+ readonly refreshRejected: "刷新令牌已被拒绝,请重新登录。";
19
+ readonly signIn: "设备码登录";
20
+ readonly signInAgain: "重新登录";
21
+ readonly signingIn: "登录中...";
22
+ readonly signOut: "注销";
23
+ readonly cancelSignIn: "取消登录";
24
+ readonly deviceCodeSection: "设备码授权";
25
+ readonly deviceCodeHint: "在浏览器中打开下方链接(已自动填充用户码),确认后用同一账号授权。";
26
+ readonly openSignInPage: "打开授权页面";
27
+ readonly copyCode: "复制用户码";
28
+ readonly copied: "已复制";
29
+ readonly userCode: "用户码";
30
+ readonly codeExpires: "有效期至";
31
+ readonly waitingAuthorization: "等待浏览器授权...";
32
+ readonly requestingCode: "正在申请设备码...";
33
+ readonly connection: "连接";
34
+ readonly provider: "Provider";
35
+ readonly providerValue: "Kimi Code · kimi-code";
36
+ readonly oauthHost: "OAuth 主机";
37
+ readonly codingEndpoint: "模型接口";
38
+ readonly connectionState: "连接状态";
39
+ readonly connected: "已连接";
40
+ readonly untested: "未测试";
41
+ readonly testConnection: "测试连接";
42
+ readonly testingConnection: "测试中...";
43
+ readonly testSuccess: "连接正常";
44
+ readonly testFailed: "连接失败:Kimi Code 未接受当前凭据";
45
+ readonly routeOwned: "模型路由由本插件提供";
46
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
47
+ readonly modelsSection: "模型";
48
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
49
+ readonly refreshCatalog: "刷新模型目录";
50
+ readonly refreshingCatalog: "刷新中...";
51
+ readonly selectAll: "全选";
52
+ readonly unselectAll: "全不选";
53
+ readonly wireAnthropic: "Anthropic";
54
+ readonly wireOpenai: "OpenAI";
55
+ readonly capVideo: "视频";
56
+ readonly capDynamicTools: "动态工具";
57
+ readonly capImageOnly: "仅图片";
58
+ readonly capNone: "—";
59
+ readonly capabilitiesTitle: "模型能力";
60
+ readonly capColMedia: "多模态";
61
+ readonly capColTools: "动态工具";
62
+ readonly capColNotes: "说明";
63
+ readonly capPlan: "需要套餐:{plan}";
64
+ readonly speedRegular: "标准";
65
+ readonly speedHighspeed: "高速 (约 6×)";
66
+ readonly quotaCost: "额度倍率";
67
+ readonly minimumPlan: "所需套餐";
68
+ readonly enhanced: "思考设置";
69
+ readonly defaultReasoningEffort: "默认思考档位";
70
+ readonly defaultReasoningEffortHint: "Kimi Code 只接受 low / high / max 三档;none 表示关闭思考。切换档位会使上下文缓存失效,建议在同一会话中保持一致。";
71
+ readonly defaultEffortAuto: "使用模型默认值";
72
+ readonly effortLow: "低 (low)";
73
+ readonly effortHigh: "高 (high)";
74
+ readonly effortMax: "最高 (max)";
75
+ readonly effortNone: "关闭思考";
76
+ readonly contextWindowSection: "模型上下文窗口";
77
+ readonly contextWindowHint: "默认取模型目录的上下文长度。k3 的 1M 上下文需要 Allegretto 及以上套餐,因此默认按 256K 计算;如已升级可在此覆盖为 1M。";
78
+ readonly contextWindowPlan: "完整上下文需要 {plan} 套餐";
79
+ readonly save: "保存";
80
+ readonly saved: "已保存";
81
+ readonly saving: "保存中...";
82
+ readonly cacheSection: "缓存与 K3 调优";
83
+ readonly cacheDesc: "Kimi 的前缀缓存按请求内容自动命中,无需也无法手动声明,因此这里用读缓存比例反映实际效果。";
84
+ readonly cacheEmpty: "本进程还没有带用量回报的请求。";
85
+ readonly cacheHitRatio: "缓存命中率";
86
+ readonly cacheCached: "命中 tokens";
87
+ readonly cacheFresh: "新处理 tokens";
88
+ readonly cacheOutput: "输出 tokens";
89
+ readonly cacheRequests: "请求数";
90
+ readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
91
+ readonly preserveThinking: "保留思考 (Preserved Thinking)";
92
+ readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
93
+ readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
94
+ readonly outputCap: "输出上限跟随上下文窗口,长思考不会被 32K 截断";
95
+ readonly quotaSection: "用量与额度";
96
+ readonly quotaDesc: "数据来自 Kimi Code 账户接口,页面可见时最多每 60 秒刷新一次。";
97
+ readonly refreshQuota: "刷新用量";
98
+ readonly refreshingQuota: "刷新中...";
99
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
100
+ readonly quotaPlan: "当前套餐";
101
+ readonly quotaWallet: "加油包余额";
102
+ readonly quotaWalletLimit: "月度上限";
103
+ readonly quotaWalletUsed: "本月已用";
104
+ readonly quotaUnlimited: "不限量";
105
+ readonly updatedAt: "更新时间:{time}";
106
+ readonly resetAt: "重置:{time}";
107
+ readonly loading: "加载中...";
108
+ readonly loginFailed: "登录失败";
109
+ readonly requests: "次请求";
110
+ readonly tokens: "tokens";
111
+ };
112
+ export declare const en: {
113
+ readonly title: "Kimi Code";
114
+ readonly pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.";
115
+ readonly account: "Account";
116
+ readonly signedIn: "Signed in";
117
+ readonly signedOut: "Not signed in";
118
+ readonly nickname: "Nickname";
119
+ readonly email: "Email";
120
+ readonly plan: "Plan";
121
+ readonly planUnknown: "—";
122
+ readonly region: "Region";
123
+ readonly regionMainland: "Mainland China (kimi.com)";
124
+ readonly regionGlobal: "Global (kimi.ai)";
125
+ readonly authenticatedAt: "Signed in at";
126
+ readonly storage: "Credential storage";
127
+ readonly storageNotice: "The OAuth credential is stored locally by the Host ($DSH_HOME/storages/kimi-code-credentials.json) and never reaches the browser. Access tokens refresh automatically.";
128
+ readonly refreshRejected: "The refresh token was rejected — sign in again.";
129
+ readonly signIn: "Sign in with device code";
130
+ readonly signInAgain: "Sign in again";
131
+ readonly signingIn: "Signing in...";
132
+ readonly signOut: "Sign out";
133
+ readonly cancelSignIn: "Cancel";
134
+ readonly deviceCodeSection: "Device authorization";
135
+ readonly deviceCodeHint: "Open the link below in a browser (the user code is pre-filled) and approve it with the same account.";
136
+ readonly openSignInPage: "Open the sign-in page";
137
+ readonly copyCode: "Copy user code";
138
+ readonly copied: "Copied";
139
+ readonly userCode: "User code";
140
+ readonly codeExpires: "Expires at";
141
+ readonly waitingAuthorization: "Waiting for browser authorization...";
142
+ readonly requestingCode: "Requesting a device code...";
143
+ readonly connection: "Connection";
144
+ readonly provider: "Provider";
145
+ readonly providerValue: "Kimi Code · kimi-code";
146
+ readonly oauthHost: "OAuth host";
147
+ readonly codingEndpoint: "Model endpoint";
148
+ readonly connectionState: "Connection state";
149
+ readonly connected: "Connected";
150
+ readonly untested: "Untested";
151
+ readonly testConnection: "Test connection";
152
+ readonly testingConnection: "Testing...";
153
+ readonly testSuccess: "Connection OK";
154
+ readonly testFailed: "Connection failed: Kimi Code did not accept the stored credential";
155
+ readonly routeOwned: "This plugin serves the model route";
156
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
157
+ readonly modelsSection: "Models";
158
+ readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
159
+ readonly refreshCatalog: "Refresh catalog";
160
+ readonly refreshingCatalog: "Refreshing...";
161
+ readonly selectAll: "Select all";
162
+ readonly unselectAll: "Deselect all";
163
+ readonly wireAnthropic: "Anthropic";
164
+ readonly wireOpenai: "OpenAI";
165
+ readonly capVideo: "Video";
166
+ readonly capDynamicTools: "Dynamic tools";
167
+ readonly capImageOnly: "Images";
168
+ readonly capNone: "—";
169
+ readonly capabilitiesTitle: "Capabilities";
170
+ readonly capColMedia: "Multimodal";
171
+ readonly capColTools: "Dynamic tools";
172
+ readonly capColNotes: "Notes";
173
+ readonly capPlan: "Requires plan: {plan}";
174
+ readonly speedRegular: "Regular";
175
+ readonly speedHighspeed: "HighSpeed (~6x)";
176
+ readonly quotaCost: "Quota cost";
177
+ readonly minimumPlan: "Required plan";
178
+ readonly enhanced: "Thinking";
179
+ readonly defaultReasoningEffort: "Default thinking level";
180
+ readonly defaultReasoningEffortHint: "Kimi Code accepts only low / high / max; none disables thinking. Switching the level invalidates the context cache, so keep it steady within a session.";
181
+ readonly defaultEffortAuto: "Use the model default";
182
+ readonly effortLow: "Low";
183
+ readonly effortHigh: "High";
184
+ readonly effortMax: "Max";
185
+ readonly effortNone: "Thinking off";
186
+ readonly contextWindowSection: "Model context window";
187
+ readonly contextWindowHint: "Defaults to the catalog context length. k3 reaches 1M only on Allegretto and above, so it defaults to 256K; raise the override here after upgrading.";
188
+ readonly contextWindowPlan: "Full context requires the {plan} plan";
189
+ readonly save: "Save";
190
+ readonly saved: "Saved";
191
+ readonly saving: "Saving...";
192
+ readonly cacheSection: "Cache & K3 tuning";
193
+ readonly 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.";
194
+ readonly cacheEmpty: "No request in this process has reported usage yet.";
195
+ readonly cacheHitRatio: "Cache hit ratio";
196
+ readonly cacheCached: "Cached tokens";
197
+ readonly cacheFresh: "Fresh tokens";
198
+ readonly cacheOutput: "Output tokens";
199
+ readonly cacheRequests: "Requests";
200
+ readonly cacheHint: "Within one session: any change to the system prompt or the tool list invalidates the whole prefix cache, so keep the tool set stable and append new material at the tail for the best hit rate.";
201
+ readonly preserveThinking: "Preserved Thinking";
202
+ readonly preserveOn: "On (the official default): reasoning_content is retained across turns, which keeps multi-step tool use coherent — its tokens are billed as output.";
203
+ readonly preserveOff: "Off: the service is not asked to return reasoning. Set DSH_KIMI_CODE_PRESERVE_THINKING=0 to disable.";
204
+ readonly outputCap: "Output cap follows the context window, so long reasoning is not cut off at 32K";
205
+ readonly quotaSection: "Usage & quota";
206
+ readonly quotaDesc: "Read from the Kimi Code account endpoints; refreshes at most once every 60 seconds while visible.";
207
+ readonly refreshQuota: "Refresh quota";
208
+ readonly refreshingQuota: "Refreshing...";
209
+ readonly quotaEmpty: "No quota data yet — use \"Refresh quota\" to retry.";
210
+ readonly quotaPlan: "Current plan";
211
+ readonly quotaWallet: "Booster wallet";
212
+ readonly quotaWalletLimit: "Monthly cap";
213
+ readonly quotaWalletUsed: "Used this month";
214
+ readonly quotaUnlimited: "Unlimited";
215
+ readonly updatedAt: "Updated at: {time}";
216
+ readonly resetAt: "Reset: {time}";
217
+ readonly loading: "Loading...";
218
+ readonly loginFailed: "Sign-in failed";
219
+ readonly requests: "requests";
220
+ readonly tokens: "tokens";
221
+ };
222
+ export declare const dictionaries: {
223
+ zh: {
224
+ readonly title: "Kimi Code";
225
+ readonly pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。";
226
+ readonly account: "账号";
227
+ readonly signedIn: "已登录";
228
+ readonly signedOut: "未登录";
229
+ readonly nickname: "昵称";
230
+ readonly email: "邮箱";
231
+ readonly plan: "套餐";
232
+ readonly planUnknown: "—";
233
+ readonly region: "区域";
234
+ readonly regionMainland: "中国大陆 (kimi.com)";
235
+ readonly regionGlobal: "国际 (kimi.ai)";
236
+ readonly authenticatedAt: "登录时间";
237
+ readonly storage: "凭据存储";
238
+ readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/kimi-code-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
239
+ readonly refreshRejected: "刷新令牌已被拒绝,请重新登录。";
240
+ readonly signIn: "设备码登录";
241
+ readonly signInAgain: "重新登录";
242
+ readonly signingIn: "登录中...";
243
+ readonly signOut: "注销";
244
+ readonly cancelSignIn: "取消登录";
245
+ readonly deviceCodeSection: "设备码授权";
246
+ readonly deviceCodeHint: "在浏览器中打开下方链接(已自动填充用户码),确认后用同一账号授权。";
247
+ readonly openSignInPage: "打开授权页面";
248
+ readonly copyCode: "复制用户码";
249
+ readonly copied: "已复制";
250
+ readonly userCode: "用户码";
251
+ readonly codeExpires: "有效期至";
252
+ readonly waitingAuthorization: "等待浏览器授权...";
253
+ readonly requestingCode: "正在申请设备码...";
254
+ readonly connection: "连接";
255
+ readonly provider: "Provider";
256
+ readonly providerValue: "Kimi Code · kimi-code";
257
+ readonly oauthHost: "OAuth 主机";
258
+ readonly codingEndpoint: "模型接口";
259
+ readonly connectionState: "连接状态";
260
+ readonly connected: "已连接";
261
+ readonly untested: "未测试";
262
+ readonly testConnection: "测试连接";
263
+ readonly testingConnection: "测试中...";
264
+ readonly testSuccess: "连接正常";
265
+ readonly testFailed: "连接失败:Kimi Code 未接受当前凭据";
266
+ readonly routeOwned: "模型路由由本插件提供";
267
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
268
+ readonly modelsSection: "模型";
269
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
270
+ readonly refreshCatalog: "刷新模型目录";
271
+ readonly refreshingCatalog: "刷新中...";
272
+ readonly selectAll: "全选";
273
+ readonly unselectAll: "全不选";
274
+ readonly wireAnthropic: "Anthropic";
275
+ readonly wireOpenai: "OpenAI";
276
+ readonly capVideo: "视频";
277
+ readonly capDynamicTools: "动态工具";
278
+ readonly capImageOnly: "仅图片";
279
+ readonly capNone: "—";
280
+ readonly capabilitiesTitle: "模型能力";
281
+ readonly capColMedia: "多模态";
282
+ readonly capColTools: "动态工具";
283
+ readonly capColNotes: "说明";
284
+ readonly capPlan: "需要套餐:{plan}";
285
+ readonly speedRegular: "标准";
286
+ readonly speedHighspeed: "高速 (约 6×)";
287
+ readonly quotaCost: "额度倍率";
288
+ readonly minimumPlan: "所需套餐";
289
+ readonly enhanced: "思考设置";
290
+ readonly defaultReasoningEffort: "默认思考档位";
291
+ readonly defaultReasoningEffortHint: "Kimi Code 只接受 low / high / max 三档;none 表示关闭思考。切换档位会使上下文缓存失效,建议在同一会话中保持一致。";
292
+ readonly defaultEffortAuto: "使用模型默认值";
293
+ readonly effortLow: "低 (low)";
294
+ readonly effortHigh: "高 (high)";
295
+ readonly effortMax: "最高 (max)";
296
+ readonly effortNone: "关闭思考";
297
+ readonly contextWindowSection: "模型上下文窗口";
298
+ readonly contextWindowHint: "默认取模型目录的上下文长度。k3 的 1M 上下文需要 Allegretto 及以上套餐,因此默认按 256K 计算;如已升级可在此覆盖为 1M。";
299
+ readonly contextWindowPlan: "完整上下文需要 {plan} 套餐";
300
+ readonly save: "保存";
301
+ readonly saved: "已保存";
302
+ readonly saving: "保存中...";
303
+ readonly cacheSection: "缓存与 K3 调优";
304
+ readonly cacheDesc: "Kimi 的前缀缓存按请求内容自动命中,无需也无法手动声明,因此这里用读缓存比例反映实际效果。";
305
+ readonly cacheEmpty: "本进程还没有带用量回报的请求。";
306
+ readonly cacheHitRatio: "缓存命中率";
307
+ readonly cacheCached: "命中 tokens";
308
+ readonly cacheFresh: "新处理 tokens";
309
+ readonly cacheOutput: "输出 tokens";
310
+ readonly cacheRequests: "请求数";
311
+ readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
312
+ readonly preserveThinking: "保留思考 (Preserved Thinking)";
313
+ readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
314
+ readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
315
+ readonly outputCap: "输出上限跟随上下文窗口,长思考不会被 32K 截断";
316
+ readonly quotaSection: "用量与额度";
317
+ readonly quotaDesc: "数据来自 Kimi Code 账户接口,页面可见时最多每 60 秒刷新一次。";
318
+ readonly refreshQuota: "刷新用量";
319
+ readonly refreshingQuota: "刷新中...";
320
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
321
+ readonly quotaPlan: "当前套餐";
322
+ readonly quotaWallet: "加油包余额";
323
+ readonly quotaWalletLimit: "月度上限";
324
+ readonly quotaWalletUsed: "本月已用";
325
+ readonly quotaUnlimited: "不限量";
326
+ readonly updatedAt: "更新时间:{time}";
327
+ readonly resetAt: "重置:{time}";
328
+ readonly loading: "加载中...";
329
+ readonly loginFailed: "登录失败";
330
+ readonly requests: "次请求";
331
+ readonly tokens: "tokens";
332
+ };
333
+ 'zh-CN': {
334
+ readonly title: "Kimi Code";
335
+ readonly pageDesc: "登录 Kimi Code 订阅,管理模型、思考档位、上下文窗口与额度。";
336
+ readonly account: "账号";
337
+ readonly signedIn: "已登录";
338
+ readonly signedOut: "未登录";
339
+ readonly nickname: "昵称";
340
+ readonly email: "邮箱";
341
+ readonly plan: "套餐";
342
+ readonly planUnknown: "—";
343
+ readonly region: "区域";
344
+ readonly regionMainland: "中国大陆 (kimi.com)";
345
+ readonly regionGlobal: "国际 (kimi.ai)";
346
+ readonly authenticatedAt: "登录时间";
347
+ readonly storage: "凭据存储";
348
+ readonly storageNotice: "OAuth 凭据由 Host 保存在本地安全存储 ($DSH_HOME/storages/kimi-code-credentials.json),不会进入浏览器。访问令牌会自动刷新。";
349
+ readonly refreshRejected: "刷新令牌已被拒绝,请重新登录。";
350
+ readonly signIn: "设备码登录";
351
+ readonly signInAgain: "重新登录";
352
+ readonly signingIn: "登录中...";
353
+ readonly signOut: "注销";
354
+ readonly cancelSignIn: "取消登录";
355
+ readonly deviceCodeSection: "设备码授权";
356
+ readonly deviceCodeHint: "在浏览器中打开下方链接(已自动填充用户码),确认后用同一账号授权。";
357
+ readonly openSignInPage: "打开授权页面";
358
+ readonly copyCode: "复制用户码";
359
+ readonly copied: "已复制";
360
+ readonly userCode: "用户码";
361
+ readonly codeExpires: "有效期至";
362
+ readonly waitingAuthorization: "等待浏览器授权...";
363
+ readonly requestingCode: "正在申请设备码...";
364
+ readonly connection: "连接";
365
+ readonly provider: "Provider";
366
+ readonly providerValue: "Kimi Code · kimi-code";
367
+ readonly oauthHost: "OAuth 主机";
368
+ readonly codingEndpoint: "模型接口";
369
+ readonly connectionState: "连接状态";
370
+ readonly connected: "已连接";
371
+ readonly untested: "未测试";
372
+ readonly testConnection: "测试连接";
373
+ readonly testingConnection: "测试中...";
374
+ readonly testSuccess: "连接正常";
375
+ readonly testFailed: "连接失败:Kimi Code 未接受当前凭据";
376
+ readonly routeOwned: "模型路由由本插件提供";
377
+ readonly routeConflict: "模型路由已被其他 Provider 占用:{detail}。请在 DSH 设置中移除重复的 Provider 配置后重试。";
378
+ readonly modelsSection: "模型";
379
+ readonly modelsHint: "勾选后模型才会出现在对话页的模型选择列表中;至少保留一个。";
380
+ readonly refreshCatalog: "刷新模型目录";
381
+ readonly refreshingCatalog: "刷新中...";
382
+ readonly selectAll: "全选";
383
+ readonly unselectAll: "全不选";
384
+ readonly wireAnthropic: "Anthropic";
385
+ readonly wireOpenai: "OpenAI";
386
+ readonly capVideo: "视频";
387
+ readonly capDynamicTools: "动态工具";
388
+ readonly capImageOnly: "仅图片";
389
+ readonly capNone: "—";
390
+ readonly capabilitiesTitle: "模型能力";
391
+ readonly capColMedia: "多模态";
392
+ readonly capColTools: "动态工具";
393
+ readonly capColNotes: "说明";
394
+ readonly capPlan: "需要套餐:{plan}";
395
+ readonly speedRegular: "标准";
396
+ readonly speedHighspeed: "高速 (约 6×)";
397
+ readonly quotaCost: "额度倍率";
398
+ readonly minimumPlan: "所需套餐";
399
+ readonly enhanced: "思考设置";
400
+ readonly defaultReasoningEffort: "默认思考档位";
401
+ readonly defaultReasoningEffortHint: "Kimi Code 只接受 low / high / max 三档;none 表示关闭思考。切换档位会使上下文缓存失效,建议在同一会话中保持一致。";
402
+ readonly defaultEffortAuto: "使用模型默认值";
403
+ readonly effortLow: "低 (low)";
404
+ readonly effortHigh: "高 (high)";
405
+ readonly effortMax: "最高 (max)";
406
+ readonly effortNone: "关闭思考";
407
+ readonly contextWindowSection: "模型上下文窗口";
408
+ readonly contextWindowHint: "默认取模型目录的上下文长度。k3 的 1M 上下文需要 Allegretto 及以上套餐,因此默认按 256K 计算;如已升级可在此覆盖为 1M。";
409
+ readonly contextWindowPlan: "完整上下文需要 {plan} 套餐";
410
+ readonly save: "保存";
411
+ readonly saved: "已保存";
412
+ readonly saving: "保存中...";
413
+ readonly cacheSection: "缓存与 K3 调优";
414
+ readonly cacheDesc: "Kimi 的前缀缓存按请求内容自动命中,无需也无法手动声明,因此这里用读缓存比例反映实际效果。";
415
+ readonly cacheEmpty: "本进程还没有带用量回报的请求。";
416
+ readonly cacheHitRatio: "缓存命中率";
417
+ readonly cacheCached: "命中 tokens";
418
+ readonly cacheFresh: "新处理 tokens";
419
+ readonly cacheOutput: "输出 tokens";
420
+ readonly cacheRequests: "请求数";
421
+ readonly cacheHint: "同一会话内:系统提示与工具列表一旦变化会使缓存整体失效,因此保持工具集合稳定、把新增内容追加在末尾,命中率最高。";
422
+ readonly preserveThinking: "保留思考 (Preserved Thinking)";
423
+ readonly preserveOn: "已开启(官方默认):跨轮保留 reasoning_content,多轮工具调用更连贯,但思考 token 也计入输出。";
424
+ readonly preserveOff: "已关闭:不要求服务回传推理内容。可设置 DSH_KIMI_CODE_PRESERVE_THINKING=0 关闭。";
425
+ readonly outputCap: "输出上限跟随上下文窗口,长思考不会被 32K 截断";
426
+ readonly quotaSection: "用量与额度";
427
+ readonly quotaDesc: "数据来自 Kimi Code 账户接口,页面可见时最多每 60 秒刷新一次。";
428
+ readonly refreshQuota: "刷新用量";
429
+ readonly refreshingQuota: "刷新中...";
430
+ readonly quotaEmpty: "暂无配额数据,点击「刷新用量」重试。";
431
+ readonly quotaPlan: "当前套餐";
432
+ readonly quotaWallet: "加油包余额";
433
+ readonly quotaWalletLimit: "月度上限";
434
+ readonly quotaWalletUsed: "本月已用";
435
+ readonly quotaUnlimited: "不限量";
436
+ readonly updatedAt: "更新时间:{time}";
437
+ readonly resetAt: "重置:{time}";
438
+ readonly loading: "加载中...";
439
+ readonly loginFailed: "登录失败";
440
+ readonly requests: "次请求";
441
+ readonly tokens: "tokens";
442
+ };
443
+ en: {
444
+ readonly title: "Kimi Code";
445
+ readonly pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.";
446
+ readonly account: "Account";
447
+ readonly signedIn: "Signed in";
448
+ readonly signedOut: "Not signed in";
449
+ readonly nickname: "Nickname";
450
+ readonly email: "Email";
451
+ readonly plan: "Plan";
452
+ readonly planUnknown: "—";
453
+ readonly region: "Region";
454
+ readonly regionMainland: "Mainland China (kimi.com)";
455
+ readonly regionGlobal: "Global (kimi.ai)";
456
+ readonly authenticatedAt: "Signed in at";
457
+ readonly storage: "Credential storage";
458
+ readonly storageNotice: "The OAuth credential is stored locally by the Host ($DSH_HOME/storages/kimi-code-credentials.json) and never reaches the browser. Access tokens refresh automatically.";
459
+ readonly refreshRejected: "The refresh token was rejected — sign in again.";
460
+ readonly signIn: "Sign in with device code";
461
+ readonly signInAgain: "Sign in again";
462
+ readonly signingIn: "Signing in...";
463
+ readonly signOut: "Sign out";
464
+ readonly cancelSignIn: "Cancel";
465
+ readonly deviceCodeSection: "Device authorization";
466
+ readonly deviceCodeHint: "Open the link below in a browser (the user code is pre-filled) and approve it with the same account.";
467
+ readonly openSignInPage: "Open the sign-in page";
468
+ readonly copyCode: "Copy user code";
469
+ readonly copied: "Copied";
470
+ readonly userCode: "User code";
471
+ readonly codeExpires: "Expires at";
472
+ readonly waitingAuthorization: "Waiting for browser authorization...";
473
+ readonly requestingCode: "Requesting a device code...";
474
+ readonly connection: "Connection";
475
+ readonly provider: "Provider";
476
+ readonly providerValue: "Kimi Code · kimi-code";
477
+ readonly oauthHost: "OAuth host";
478
+ readonly codingEndpoint: "Model endpoint";
479
+ readonly connectionState: "Connection state";
480
+ readonly connected: "Connected";
481
+ readonly untested: "Untested";
482
+ readonly testConnection: "Test connection";
483
+ readonly testingConnection: "Testing...";
484
+ readonly testSuccess: "Connection OK";
485
+ readonly testFailed: "Connection failed: Kimi Code did not accept the stored credential";
486
+ readonly routeOwned: "This plugin serves the model route";
487
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
488
+ readonly modelsSection: "Models";
489
+ readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
490
+ readonly refreshCatalog: "Refresh catalog";
491
+ readonly refreshingCatalog: "Refreshing...";
492
+ readonly selectAll: "Select all";
493
+ readonly unselectAll: "Deselect all";
494
+ readonly wireAnthropic: "Anthropic";
495
+ readonly wireOpenai: "OpenAI";
496
+ readonly capVideo: "Video";
497
+ readonly capDynamicTools: "Dynamic tools";
498
+ readonly capImageOnly: "Images";
499
+ readonly capNone: "—";
500
+ readonly capabilitiesTitle: "Capabilities";
501
+ readonly capColMedia: "Multimodal";
502
+ readonly capColTools: "Dynamic tools";
503
+ readonly capColNotes: "Notes";
504
+ readonly capPlan: "Requires plan: {plan}";
505
+ readonly speedRegular: "Regular";
506
+ readonly speedHighspeed: "HighSpeed (~6x)";
507
+ readonly quotaCost: "Quota cost";
508
+ readonly minimumPlan: "Required plan";
509
+ readonly enhanced: "Thinking";
510
+ readonly defaultReasoningEffort: "Default thinking level";
511
+ readonly defaultReasoningEffortHint: "Kimi Code accepts only low / high / max; none disables thinking. Switching the level invalidates the context cache, so keep it steady within a session.";
512
+ readonly defaultEffortAuto: "Use the model default";
513
+ readonly effortLow: "Low";
514
+ readonly effortHigh: "High";
515
+ readonly effortMax: "Max";
516
+ readonly effortNone: "Thinking off";
517
+ readonly contextWindowSection: "Model context window";
518
+ readonly contextWindowHint: "Defaults to the catalog context length. k3 reaches 1M only on Allegretto and above, so it defaults to 256K; raise the override here after upgrading.";
519
+ readonly contextWindowPlan: "Full context requires the {plan} plan";
520
+ readonly save: "Save";
521
+ readonly saved: "Saved";
522
+ readonly saving: "Saving...";
523
+ readonly cacheSection: "Cache & K3 tuning";
524
+ readonly 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.";
525
+ readonly cacheEmpty: "No request in this process has reported usage yet.";
526
+ readonly cacheHitRatio: "Cache hit ratio";
527
+ readonly cacheCached: "Cached tokens";
528
+ readonly cacheFresh: "Fresh tokens";
529
+ readonly cacheOutput: "Output tokens";
530
+ readonly cacheRequests: "Requests";
531
+ readonly cacheHint: "Within one session: any change to the system prompt or the tool list invalidates the whole prefix cache, so keep the tool set stable and append new material at the tail for the best hit rate.";
532
+ readonly preserveThinking: "Preserved Thinking";
533
+ readonly preserveOn: "On (the official default): reasoning_content is retained across turns, which keeps multi-step tool use coherent — its tokens are billed as output.";
534
+ readonly preserveOff: "Off: the service is not asked to return reasoning. Set DSH_KIMI_CODE_PRESERVE_THINKING=0 to disable.";
535
+ readonly outputCap: "Output cap follows the context window, so long reasoning is not cut off at 32K";
536
+ readonly quotaSection: "Usage & quota";
537
+ readonly quotaDesc: "Read from the Kimi Code account endpoints; refreshes at most once every 60 seconds while visible.";
538
+ readonly refreshQuota: "Refresh quota";
539
+ readonly refreshingQuota: "Refreshing...";
540
+ readonly quotaEmpty: "No quota data yet — use \"Refresh quota\" to retry.";
541
+ readonly quotaPlan: "Current plan";
542
+ readonly quotaWallet: "Booster wallet";
543
+ readonly quotaWalletLimit: "Monthly cap";
544
+ readonly quotaWalletUsed: "Used this month";
545
+ readonly quotaUnlimited: "Unlimited";
546
+ readonly updatedAt: "Updated at: {time}";
547
+ readonly resetAt: "Reset: {time}";
548
+ readonly loading: "Loading...";
549
+ readonly loginFailed: "Sign-in failed";
550
+ readonly requests: "requests";
551
+ readonly tokens: "tokens";
552
+ };
553
+ 'en-US': {
554
+ readonly title: "Kimi Code";
555
+ readonly pageDesc: "Sign in to the Kimi Code subscription and manage models, thinking level, context windows, and quota.";
556
+ readonly account: "Account";
557
+ readonly signedIn: "Signed in";
558
+ readonly signedOut: "Not signed in";
559
+ readonly nickname: "Nickname";
560
+ readonly email: "Email";
561
+ readonly plan: "Plan";
562
+ readonly planUnknown: "—";
563
+ readonly region: "Region";
564
+ readonly regionMainland: "Mainland China (kimi.com)";
565
+ readonly regionGlobal: "Global (kimi.ai)";
566
+ readonly authenticatedAt: "Signed in at";
567
+ readonly storage: "Credential storage";
568
+ readonly storageNotice: "The OAuth credential is stored locally by the Host ($DSH_HOME/storages/kimi-code-credentials.json) and never reaches the browser. Access tokens refresh automatically.";
569
+ readonly refreshRejected: "The refresh token was rejected — sign in again.";
570
+ readonly signIn: "Sign in with device code";
571
+ readonly signInAgain: "Sign in again";
572
+ readonly signingIn: "Signing in...";
573
+ readonly signOut: "Sign out";
574
+ readonly cancelSignIn: "Cancel";
575
+ readonly deviceCodeSection: "Device authorization";
576
+ readonly deviceCodeHint: "Open the link below in a browser (the user code is pre-filled) and approve it with the same account.";
577
+ readonly openSignInPage: "Open the sign-in page";
578
+ readonly copyCode: "Copy user code";
579
+ readonly copied: "Copied";
580
+ readonly userCode: "User code";
581
+ readonly codeExpires: "Expires at";
582
+ readonly waitingAuthorization: "Waiting for browser authorization...";
583
+ readonly requestingCode: "Requesting a device code...";
584
+ readonly connection: "Connection";
585
+ readonly provider: "Provider";
586
+ readonly providerValue: "Kimi Code · kimi-code";
587
+ readonly oauthHost: "OAuth host";
588
+ readonly codingEndpoint: "Model endpoint";
589
+ readonly connectionState: "Connection state";
590
+ readonly connected: "Connected";
591
+ readonly untested: "Untested";
592
+ readonly testConnection: "Test connection";
593
+ readonly testingConnection: "Testing...";
594
+ readonly testSuccess: "Connection OK";
595
+ readonly testFailed: "Connection failed: Kimi Code did not accept the stored credential";
596
+ readonly routeOwned: "This plugin serves the model route";
597
+ readonly routeConflict: "Another provider already owns the model route: {detail}. Remove the duplicate provider configuration in DSH settings and reload.";
598
+ readonly modelsSection: "Models";
599
+ readonly modelsHint: "Checked models appear in the DSH conversation model list; keep at least one.";
600
+ readonly refreshCatalog: "Refresh catalog";
601
+ readonly refreshingCatalog: "Refreshing...";
602
+ readonly selectAll: "Select all";
603
+ readonly unselectAll: "Deselect all";
604
+ readonly wireAnthropic: "Anthropic";
605
+ readonly wireOpenai: "OpenAI";
606
+ readonly capVideo: "Video";
607
+ readonly capDynamicTools: "Dynamic tools";
608
+ readonly capImageOnly: "Images";
609
+ readonly capNone: "—";
610
+ readonly capabilitiesTitle: "Capabilities";
611
+ readonly capColMedia: "Multimodal";
612
+ readonly capColTools: "Dynamic tools";
613
+ readonly capColNotes: "Notes";
614
+ readonly capPlan: "Requires plan: {plan}";
615
+ readonly speedRegular: "Regular";
616
+ readonly speedHighspeed: "HighSpeed (~6x)";
617
+ readonly quotaCost: "Quota cost";
618
+ readonly minimumPlan: "Required plan";
619
+ readonly enhanced: "Thinking";
620
+ readonly defaultReasoningEffort: "Default thinking level";
621
+ readonly defaultReasoningEffortHint: "Kimi Code accepts only low / high / max; none disables thinking. Switching the level invalidates the context cache, so keep it steady within a session.";
622
+ readonly defaultEffortAuto: "Use the model default";
623
+ readonly effortLow: "Low";
624
+ readonly effortHigh: "High";
625
+ readonly effortMax: "Max";
626
+ readonly effortNone: "Thinking off";
627
+ readonly contextWindowSection: "Model context window";
628
+ readonly contextWindowHint: "Defaults to the catalog context length. k3 reaches 1M only on Allegretto and above, so it defaults to 256K; raise the override here after upgrading.";
629
+ readonly contextWindowPlan: "Full context requires the {plan} plan";
630
+ readonly save: "Save";
631
+ readonly saved: "Saved";
632
+ readonly saving: "Saving...";
633
+ readonly cacheSection: "Cache & K3 tuning";
634
+ readonly 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.";
635
+ readonly cacheEmpty: "No request in this process has reported usage yet.";
636
+ readonly cacheHitRatio: "Cache hit ratio";
637
+ readonly cacheCached: "Cached tokens";
638
+ readonly cacheFresh: "Fresh tokens";
639
+ readonly cacheOutput: "Output tokens";
640
+ readonly cacheRequests: "Requests";
641
+ readonly cacheHint: "Within one session: any change to the system prompt or the tool list invalidates the whole prefix cache, so keep the tool set stable and append new material at the tail for the best hit rate.";
642
+ readonly preserveThinking: "Preserved Thinking";
643
+ readonly preserveOn: "On (the official default): reasoning_content is retained across turns, which keeps multi-step tool use coherent — its tokens are billed as output.";
644
+ readonly preserveOff: "Off: the service is not asked to return reasoning. Set DSH_KIMI_CODE_PRESERVE_THINKING=0 to disable.";
645
+ readonly outputCap: "Output cap follows the context window, so long reasoning is not cut off at 32K";
646
+ readonly quotaSection: "Usage & quota";
647
+ readonly quotaDesc: "Read from the Kimi Code account endpoints; refreshes at most once every 60 seconds while visible.";
648
+ readonly refreshQuota: "Refresh quota";
649
+ readonly refreshingQuota: "Refreshing...";
650
+ readonly quotaEmpty: "No quota data yet — use \"Refresh quota\" to retry.";
651
+ readonly quotaPlan: "Current plan";
652
+ readonly quotaWallet: "Booster wallet";
653
+ readonly quotaWalletLimit: "Monthly cap";
654
+ readonly quotaWalletUsed: "Used this month";
655
+ readonly quotaUnlimited: "Unlimited";
656
+ readonly updatedAt: "Updated at: {time}";
657
+ readonly resetAt: "Reset: {time}";
658
+ readonly loading: "Loading...";
659
+ readonly loginFailed: "Sign-in failed";
660
+ readonly requests: "requests";
661
+ readonly tokens: "tokens";
662
+ };
663
+ };
664
+ export type KimiCodeLocaleKey = keyof typeof zh;
665
+ //# sourceMappingURL=locales.d.ts.map