codeep 2.15.0 → 2.17.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 (41) hide show
  1. package/README.md +41 -7
  2. package/dist/acp/serverHandlers.js +1 -1
  3. package/dist/acp/session.js +22 -1
  4. package/dist/config/index.js +20 -4
  5. package/dist/config/providers.d.ts +3 -2
  6. package/dist/config/providers.js +163 -69
  7. package/dist/renderer/App.d.ts +89 -0
  8. package/dist/renderer/App.js +637 -43
  9. package/dist/renderer/Screen.d.ts +1 -0
  10. package/dist/renderer/Screen.js +8 -3
  11. package/dist/renderer/commands/helpers.d.ts +189 -0
  12. package/dist/renderer/commands/helpers.js +345 -0
  13. package/dist/renderer/commands/registry.js +2 -1
  14. package/dist/renderer/commands.js +218 -267
  15. package/dist/renderer/components/AgentTimeline.d.ts +44 -0
  16. package/dist/renderer/components/AgentTimeline.js +157 -0
  17. package/dist/renderer/components/Autocomplete.d.ts +25 -0
  18. package/dist/renderer/components/Autocomplete.js +35 -0
  19. package/dist/renderer/components/Status.d.ts +2 -0
  20. package/dist/renderer/layout.d.ts +5 -1
  21. package/dist/renderer/layout.js +12 -0
  22. package/dist/renderer/main.js +110 -30
  23. package/dist/utils/agent.js +1 -1
  24. package/dist/utils/agents.d.ts +1 -1
  25. package/dist/utils/agents.js +1 -1
  26. package/dist/utils/checkpoints.d.ts +1 -1
  27. package/dist/utils/checkpoints.js +1 -1
  28. package/dist/utils/diffPreview.d.ts +31 -0
  29. package/dist/utils/diffPreview.js +102 -0
  30. package/dist/utils/git.d.ts +28 -0
  31. package/dist/utils/git.js +111 -1
  32. package/dist/utils/mentions.d.ts +195 -0
  33. package/dist/utils/mentions.js +672 -0
  34. package/dist/utils/resourceImpact.d.ts +25 -0
  35. package/dist/utils/resourceImpact.js +54 -0
  36. package/dist/utils/tokenTracker.js +52 -37
  37. package/dist/utils/webFetch.d.ts +101 -0
  38. package/dist/utils/webFetch.js +375 -0
  39. package/dist/version.d.ts +1 -1
  40. package/dist/version.js +1 -1
  41. package/package.json +2 -1
@@ -18,11 +18,12 @@ export const PROVIDERS = {
18
18
  },
19
19
  },
20
20
  models: [
21
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model, available to all users' },
21
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
22
22
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant, available to all users' },
23
23
  ],
24
24
  defaultModel: 'glm-5.2',
25
25
  defaultProtocol: 'openai',
26
+ maxOutputTokens: 131_072,
26
27
  envKey: 'ZAI_API_KEY',
27
28
  subscribeUrl: 'https://z.ai/subscribe?ic=NXYNXZOV14',
28
29
  groupLabel: 'Z.AI — Subscription (GLM Coding Plan)',
@@ -44,11 +45,12 @@ export const PROVIDERS = {
44
45
  },
45
46
  },
46
47
  models: [
47
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model' },
48
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
48
49
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant' },
49
50
  ],
50
51
  defaultModel: 'glm-5.2',
51
52
  defaultProtocol: 'openai',
53
+ maxOutputTokens: 131_072,
52
54
  envKey: 'ZAI_API_KEY',
53
55
  subscribeUrl: 'https://api.z.ai',
54
56
  groupLabel: 'Z.AI — API (pay-per-use)',
@@ -70,11 +72,12 @@ export const PROVIDERS = {
70
72
  },
71
73
  },
72
74
  models: [
73
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model, available to all users' },
75
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
74
76
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant, available to all users' },
75
77
  ],
76
78
  defaultModel: 'glm-5.2',
77
79
  defaultProtocol: 'openai',
80
+ maxOutputTokens: 131_072,
78
81
  envKey: 'ZAI_CN_API_KEY',
79
82
  subscribeUrl: 'https://open.bigmodel.cn/glm-coding',
80
83
  groupLabel: 'Z.AI China — Subscription (GLM Coding Plan)',
@@ -96,11 +99,12 @@ export const PROVIDERS = {
96
99
  },
97
100
  },
98
101
  models: [
99
- { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest GLM model' },
102
+ { id: 'glm-5.2', name: 'GLM-5.2', description: 'Latest flagship for project-scale engineering (1M context)' },
100
103
  { id: 'glm-5-turbo', name: 'GLM-5 Turbo', description: 'Fast GLM-5 variant' },
101
104
  ],
102
105
  defaultModel: 'glm-5.2',
103
106
  defaultProtocol: 'openai',
107
+ maxOutputTokens: 131_072,
104
108
  envKey: 'ZAI_CN_API_KEY',
105
109
  subscribeUrl: 'https://open.bigmodel.cn',
106
110
  groupLabel: 'Z.AI China — API (pay-per-use)',
@@ -205,9 +209,9 @@ export const PROVIDERS = {
205
209
  },
206
210
  // ── Kimi (Moonshot AI) ────────────────────────────────────────────
207
211
  // Subscription (Kimi Code) mirrors the Z.AI GLM-Coding-Plan shape: a
208
- // dedicated coding base URL + a separate key, model id ALWAYS
209
- // `kimi-for-coding` (a backend alias). OpenAI-compatible is the
210
- // battle-tested path so we don't expose the Anthropic surface here.
212
+ // dedicated coding base URL + a separate key. Model availability depends
213
+ // on the user's plan, so the picker labels the restricted K3/high-speed ids
214
+ // instead of pretending every subscription includes them.
211
215
  'kimi': {
212
216
  name: 'Kimi (Moonshot) — Coding Plan',
213
217
  description: 'Kimi Code subscription',
@@ -215,7 +219,10 @@ export const PROVIDERS = {
215
219
  openai: { baseUrl: 'https://api.kimi.com/coding/v1', authHeader: 'Bearer', supportsNativeTools: true },
216
220
  },
217
221
  models: [
218
- { id: 'kimi-for-coding', name: 'Kimi Code', description: 'Subscription alias — auto-maps to the latest Kimi coding model (K2.7 Code)' },
222
+ { id: 'kimi-for-coding', name: 'Kimi Code', description: 'Available on every Kimi Code plan — maps to K2.7 Code' },
223
+ { id: 'k3', name: 'Kimi K3', description: '1M-context flagship — Moderato plan or higher' },
224
+ { id: 'k3-256k', name: 'Kimi K3 (256K)', description: 'K3 with a smaller context window — Moderato plan or higher' },
225
+ { id: 'kimi-for-coding-highspeed', name: 'Kimi Code (High-Speed)', description: 'Low-latency K2.7 Code — Allegretto plan or higher' },
219
226
  ],
220
227
  defaultModel: 'kimi-for-coding',
221
228
  defaultProtocol: 'openai',
@@ -232,18 +239,18 @@ export const PROVIDERS = {
232
239
  openai: { baseUrl: 'https://api.moonshot.ai/v1', authHeader: 'Bearer', supportsNativeTools: true },
233
240
  },
234
241
  models: [
235
- { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Flagship agentic coding model (256K context)' },
242
+ { id: 'kimi-k3', name: 'Kimi K3', description: 'Latest flagship for software engineering and deep reasoning (1M context)' },
243
+ { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Coding-specialized model (256K context)' },
236
244
  { id: 'kimi-k2.7-code-highspeed', name: 'Kimi K2.7 Code (High-Speed)', description: 'Throughput-tuned K2.7 Code for latency-sensitive loops' },
237
- { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'Previous-gen multimodal reasoning model' },
238
- { id: 'kimi-k2.5', name: 'Kimi K2.5', description: 'Older general-purpose model (cheaper)' },
245
+ { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'General-purpose multimodal reasoning model' },
239
246
  ],
240
- defaultModel: 'kimi-k2.7-code',
247
+ defaultModel: 'kimi-k3',
241
248
  defaultProtocol: 'openai',
242
- maxOutputTokens: 32_768,
249
+ maxOutputTokens: 131_072,
243
250
  envKey: 'MOONSHOT_API_KEY',
244
251
  subscribeUrl: 'https://platform.kimi.ai/console/api-keys',
245
252
  groupLabel: 'Kimi — API (pay-per-use)',
246
- hint: 'Pay-per-use via Moonshot API key (platform.kimi.ai).',
253
+ hint: 'Pay-per-use via Moonshot API key (platform.kimi.ai). Kimi K3 supports 1M context and graded reasoning.',
247
254
  },
248
255
  'kimi-cn': {
249
256
  name: 'Kimi China (Moonshot)',
@@ -252,18 +259,18 @@ export const PROVIDERS = {
252
259
  openai: { baseUrl: 'https://api.moonshot.cn/v1', authHeader: 'Bearer', supportsNativeTools: true },
253
260
  },
254
261
  models: [
255
- { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Flagship agentic coding model (256K context)' },
262
+ { id: 'kimi-k3', name: 'Kimi K3', description: 'Latest flagship for software engineering and deep reasoning (1M context)' },
263
+ { id: 'kimi-k2.7-code', name: 'Kimi K2.7 Code', description: 'Coding-specialized model (256K context)' },
256
264
  { id: 'kimi-k2.7-code-highspeed', name: 'Kimi K2.7 Code (High-Speed)', description: 'Throughput-tuned K2.7 Code' },
257
- { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'Previous-gen multimodal reasoning model' },
258
- { id: 'kimi-k2.5', name: 'Kimi K2.5', description: 'Older general-purpose model' },
265
+ { id: 'kimi-k2.6', name: 'Kimi K2.6', description: 'General-purpose multimodal reasoning model' },
259
266
  ],
260
- defaultModel: 'kimi-k2.7-code',
267
+ defaultModel: 'kimi-k3',
261
268
  defaultProtocol: 'openai',
262
- maxOutputTokens: 32_768,
269
+ maxOutputTokens: 131_072,
263
270
  envKey: 'MOONSHOT_CN_API_KEY',
264
271
  subscribeUrl: 'https://platform.moonshot.cn/console/api-keys',
265
272
  groupLabel: 'Kimi China — API (pay-per-use)',
266
- hint: 'Pay-per-use via Moonshot China API key (platform.moonshot.cn).',
273
+ hint: 'Pay-per-use via Moonshot China API key (platform.moonshot.cn). Kimi K3 supports 1M context.',
267
274
  },
268
275
  // ── Grok (xAI) ────────────────────────────────────────────────────
269
276
  // Pay-per-use today (console.x.ai key). The SuperGrok / X Premium+
@@ -279,8 +286,6 @@ export const PROVIDERS = {
279
286
  { id: 'grok-4.5', name: 'Grok 4.5', description: 'Flagship reasoning model — highest quality, 500K context' },
280
287
  { id: 'grok-build-0.1', name: 'Grok Build 0.1', description: 'Agentic coding model — fast, 256K context' },
281
288
  { id: 'grok-4.3', name: 'Grok 4.3', description: 'Previous flagship, 1M context' },
282
- { id: 'grok-code-fast-1', name: 'Grok Code Fast 1', description: 'Low-cost speed-first coder (alias of Build 0.1)' },
283
- { id: 'grok-4-fast-reasoning', name: 'Grok 4 Fast (reasoning)', description: 'Cheap reasoning model, very large context' },
284
289
  ],
285
290
  defaultModel: 'grok-build-0.1',
286
291
  defaultProtocol: 'openai',
@@ -301,11 +306,11 @@ export const PROVIDERS = {
301
306
  openai: { baseUrl: 'https://coding-intl.dashscope.aliyuncs.com/v1', authHeader: 'Bearer', supportsNativeTools: true },
302
307
  },
303
308
  models: [
304
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
305
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
306
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model (code + reasoning)' },
309
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Recommended current model for coding, reasoning, and vision' },
310
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
311
+ { id: 'qwen3.5-plus', name: 'Qwen3.5-Plus', description: 'Efficient general-purpose Coding Plan model' },
307
312
  ],
308
- defaultModel: 'qwen3-coder-plus',
313
+ defaultModel: 'qwen3.7-plus',
309
314
  defaultProtocol: 'openai',
310
315
  maxOutputTokens: 65_536,
311
316
  noStreamWithTools: true,
@@ -321,12 +326,11 @@ export const PROVIDERS = {
321
326
  openai: { baseUrl: 'https://dashscope-intl.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
322
327
  },
323
328
  models: [
324
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model (256K, up to 1M)' },
325
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
326
- { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
327
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
329
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Latest flagship for complex coding and reasoning' },
330
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality, speed, and price (1M context)' },
331
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, low-cost multimodal model' },
328
332
  ],
329
- defaultModel: 'qwen3-coder-plus',
333
+ defaultModel: 'qwen3.7-max',
330
334
  defaultProtocol: 'openai',
331
335
  maxOutputTokens: 65_536,
332
336
  noStreamWithTools: true,
@@ -335,6 +339,28 @@ export const PROVIDERS = {
335
339
  groupLabel: 'Qwen — API (pay-per-use)',
336
340
  hint: 'Pay-per-use via Alibaba Model Studio key (DASHSCOPE_API_KEY).',
337
341
  },
342
+ 'qwen-token-plan': {
343
+ name: 'Qwen (Alibaba) — Token Plan',
344
+ description: 'Qwen Token Plan subscription (international)',
345
+ protocols: {
346
+ openai: { baseUrl: 'https://token-plan.ap-southeast-1.maas.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
347
+ },
348
+ models: [
349
+ { id: 'qwen3.8-max-preview', name: 'Qwen3.8-Max Preview', description: 'Newest Token Plan flagship for complex agentic work' },
350
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Production flagship for complex coding and reasoning' },
351
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality and throughput' },
352
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
353
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, credit-efficient model' },
354
+ ],
355
+ defaultModel: 'qwen3.8-max-preview',
356
+ defaultProtocol: 'openai',
357
+ maxOutputTokens: 131_072,
358
+ noStreamWithTools: true,
359
+ envKey: 'BAILIAN_TOKEN_PLAN_API_KEY',
360
+ subscribeUrl: 'https://modelstudio.console.alibabacloud.com/',
361
+ groupLabel: 'Qwen — Subscription (Token Plan)',
362
+ hint: 'Uses monthly Token Plan credits. Requires a separate sk-sp-… Token Plan key.',
363
+ },
338
364
  'qwen-cn': {
339
365
  name: 'Qwen China — Coding Plan',
340
366
  description: 'Qwen Coding Plan subscription (China)',
@@ -342,11 +368,11 @@ export const PROVIDERS = {
342
368
  openai: { baseUrl: 'https://coding.dashscope.aliyuncs.com/v1', authHeader: 'Bearer', supportsNativeTools: true },
343
369
  },
344
370
  models: [
345
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model — best quality' },
346
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
347
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
371
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Recommended current model for coding, reasoning, and vision' },
372
+ { id: 'qwen3.6-plus', name: 'Qwen3.6-Plus', description: 'Fast multimodal model with a 1M context window' },
373
+ { id: 'qwen3.5-plus', name: 'Qwen3.5-Plus', description: 'Efficient general-purpose Coding Plan model' },
348
374
  ],
349
- defaultModel: 'qwen3-coder-plus',
375
+ defaultModel: 'qwen3.7-plus',
350
376
  defaultProtocol: 'openai',
351
377
  maxOutputTokens: 65_536,
352
378
  noStreamWithTools: true,
@@ -362,12 +388,11 @@ export const PROVIDERS = {
362
388
  openai: { baseUrl: 'https://dashscope.aliyuncs.com/compatible-mode/v1', authHeader: 'Bearer', supportsNativeTools: true },
363
389
  },
364
390
  models: [
365
- { id: 'qwen3-coder-plus', name: 'Qwen3-Coder Plus', description: 'Flagship coding model' },
366
- { id: 'qwen3-coder-next', name: 'Qwen3-Coder Next', description: 'Balanced quality/speed/cost' },
367
- { id: 'qwen3-coder-flash', name: 'Qwen3-Coder Flash', description: 'Fast/cheap coder' },
368
- { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Flagship general model' },
391
+ { id: 'qwen3.7-max', name: 'Qwen3.7-Max', description: 'Latest flagship for complex coding and reasoning' },
392
+ { id: 'qwen3.7-plus', name: 'Qwen3.7-Plus', description: 'Balanced quality, speed, and price (1M context)' },
393
+ { id: 'qwen3.6-flash', name: 'Qwen3.6-Flash', description: 'Low-latency, low-cost multimodal model' },
369
394
  ],
370
- defaultModel: 'qwen3-coder-plus',
395
+ defaultModel: 'qwen3.7-max',
371
396
  defaultProtocol: 'openai',
372
397
  maxOutputTokens: 65_536,
373
398
  noStreamWithTools: true,
@@ -378,21 +403,22 @@ export const PROVIDERS = {
378
403
  },
379
404
  'modelscope': {
380
405
  name: 'ModelScope (free Qwen)',
381
- description: 'Free Qwen3-Coder inference via ModelScope',
406
+ description: 'Live free-model catalog via ModelScope',
382
407
  protocols: {
383
408
  openai: { baseUrl: 'https://api-inference.modelscope.cn/v1', authHeader: 'Bearer', supportsNativeTools: true },
384
409
  },
385
410
  models: [
386
- { id: 'Qwen/Qwen3-Coder-480B-A35B-Instruct', name: 'Qwen3-Coder 480B', description: 'Open MoE coder — free tier (~2000 req/day)' },
411
+ { id: 'Qwen/Qwen3-Coder-480B-A35B-Instruct', name: 'Qwen3-Coder 480B', description: 'Fallback model shown until the live catalog loads' },
387
412
  ],
388
413
  defaultModel: 'Qwen/Qwen3-Coder-480B-A35B-Instruct',
389
414
  defaultProtocol: 'openai',
390
415
  maxOutputTokens: 65_536,
391
416
  noStreamWithTools: true,
417
+ dynamicModels: true,
392
418
  envKey: 'MODELSCOPE_API_KEY',
393
419
  subscribeUrl: 'https://modelscope.cn/my/myaccesstoken',
394
420
  groupLabel: 'ModelScope — Free (Qwen)',
395
- hint: 'Free tier (~2000 req/day) via ModelScope token (modelscope.cn). Needs a bound Aliyun account.',
421
+ hint: 'Fetches the live free catalog for your ModelScope token; availability and limits vary by account.',
396
422
  },
397
423
  'openai': {
398
424
  name: 'OpenAI',
@@ -408,9 +434,6 @@ export const PROVIDERS = {
408
434
  { id: 'gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'Most capable GPT — best for coding & agentic work' },
409
435
  { id: 'gpt-5.6-terra', name: 'GPT-5.6 Terra', description: 'Balanced — GPT-5.5 quality at about half the price' },
410
436
  { id: 'gpt-5.6-luna', name: 'GPT-5.6 Luna', description: 'Fast and cheap — high-volume workloads' },
411
- { id: 'gpt-5.5', name: 'GPT-5.5', description: 'Previous flagship GPT' },
412
- { id: 'gpt-5.4', name: 'GPT-5.4', description: 'Older generation GPT' },
413
- { id: 'gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'Faster and cheaper GPT-5.4' },
414
437
  ],
415
438
  defaultModel: 'gpt-5.6-sol',
416
439
  defaultProtocol: 'openai',
@@ -433,11 +456,11 @@ export const PROVIDERS = {
433
456
  },
434
457
  models: [
435
458
  { id: 'claude-fable-5', name: 'Claude Fable 5', description: 'Most capable — hardest reasoning & long-horizon agentic work' },
436
- { id: 'claude-opus-4-8', name: 'Claude Opus 4.8', description: 'Most capable Opus model' },
459
+ { id: 'claude-opus-5', name: 'Claude Opus 5', description: 'Complex agentic coding & deep reasoning — the Opus workhorse' },
437
460
  { id: 'claude-sonnet-5', name: 'Claude Sonnet 5', description: 'Best balance of speed and intelligence' },
438
461
  { id: 'claude-haiku-4-5-20251001', name: 'Claude Haiku', description: 'Fastest and most affordable' },
439
462
  ],
440
- defaultModel: 'claude-opus-4-8',
463
+ defaultModel: 'claude-opus-5',
441
464
  defaultProtocol: 'anthropic',
442
465
  envKey: 'ANTHROPIC_API_KEY',
443
466
  groupLabel: 'Anthropic',
@@ -455,8 +478,9 @@ export const PROVIDERS = {
455
478
  },
456
479
  models: [
457
480
  { id: 'gemini-3.1-pro-preview', name: 'Gemini 3.1 Pro', description: 'Most capable Gemini model' },
458
- { id: 'gemini-3.5-flash', name: 'Gemini 3.5 Flash', description: 'Pro-level intelligence at Flash speed' },
459
- { id: 'gemini-3.1-flash-lite', name: 'Gemini 3.1 Flash-Lite', description: 'Low-latency, low-cost workhorse (1M context)' },
481
+ { id: 'gemini-3.6-flash', name: 'Gemini 3.6 Flash', description: 'Latest production Flash model' },
482
+ { id: 'gemini-3.5-flash', name: 'Gemini 3.5 Flash', description: 'Stable frontier Flash model for coding and long agentic tasks' },
483
+ { id: 'gemini-3.5-flash-lite', name: 'Gemini 3.5 Flash-Lite', description: 'Latest low-latency, low-cost workhorse' },
460
484
  ],
461
485
  defaultModel: 'gemini-3.1-pro-preview',
462
486
  defaultProtocol: 'openai',
@@ -482,19 +506,17 @@ export const PROVIDERS = {
482
506
  models: [
483
507
  { id: 'openrouter/auto', name: 'Auto-route', description: 'OpenRouter picks the best model for the task' },
484
508
  { id: 'anthropic/claude-fable-5', name: 'Claude Fable 5', description: 'Anthropic — most capable' },
485
- { id: 'anthropic/claude-opus-4', name: 'Claude Opus 4', description: 'Anthropic — Opus tier' },
509
+ { id: 'anthropic/claude-opus-5', name: 'Claude Opus 5', description: 'Anthropic — flagship Opus tier' },
486
510
  { id: 'anthropic/claude-sonnet-5', name: 'Claude Sonnet 5', description: 'Anthropic — balanced' },
487
511
  { id: 'openai/gpt-5.6-sol', name: 'GPT-5.6 Sol', description: 'OpenAI — flagship' },
488
- { id: 'openai/gpt-5.4-mini', name: 'GPT-5.4 Mini', description: 'OpenAI — fast/cheap' },
489
- { id: 'google/gemini-3.1-pro', name: 'Gemini 3.1 Pro', description: 'Google — multimodal' },
490
- { id: 'meta-llama/llama-3.1-405b-instruct', name: 'Llama 3.1 405B', description: 'Meta — open weights, largest' },
491
- { id: 'meta-llama/llama-3.1-70b-instruct', name: 'Llama 3.1 70B', description: 'Meta — open weights, fast' },
492
- { id: 'deepseek/deepseek-v4', name: 'DeepSeek V4', description: 'DeepSeek via OpenRouter' },
493
- { id: 'mistralai/mistral-large', name: 'Mistral Large', description: 'Mistral — flagship' },
494
- { id: 'qwen/qwen-2.5-coder-32b-instruct', name: 'Qwen 2.5 Coder 32B', description: 'Alibaba — coding-tuned' },
512
+ { id: 'openai/gpt-5.6-luna', name: 'GPT-5.6 Luna', description: 'OpenAI — fast/efficient' },
513
+ { id: 'google/gemini-3.6-flash', name: 'Gemini 3.6 Flash', description: 'Google — latest production Flash' },
514
+ { id: 'deepseek/deepseek-v4-pro', name: 'DeepSeek V4 Pro', description: 'DeepSeek — flagship agentic model' },
515
+ { id: 'moonshotai/kimi-k3', name: 'Kimi K3', description: 'Moonshot — long-horizon coding' },
516
+ { id: 'qwen/qwen3.8-max', name: 'Qwen 3.8 Max', description: 'Alibaba — latest flagship' },
495
517
  { id: 'x-ai/grok-4.5', name: 'Grok 4.5', description: 'xAI — flagship reasoning' },
496
518
  ],
497
- defaultModel: 'anthropic/claude-opus-4',
519
+ defaultModel: 'openrouter/auto',
498
520
  defaultProtocol: 'openai',
499
521
  envKey: 'OPENROUTER_API_KEY',
500
522
  subscribeUrl: 'https://openrouter.ai/keys',
@@ -544,6 +566,65 @@ export const PROVIDERS = {
544
566
  export function getProvider(id) {
545
567
  return PROVIDERS[id] || null;
546
568
  }
569
+ /**
570
+ * Exact migrations for curated model ids that vendors replaced.
571
+ *
572
+ * Keep this deliberately narrower than the provider catalogue. Dynamic
573
+ * OpenRouter/Ollama/custom ids are user-controlled and must never be rewritten.
574
+ */
575
+ const RETIRED_MODEL_REPLACEMENTS = {
576
+ 'z.ai': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
577
+ 'z.ai-api': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
578
+ 'z.ai-cn': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
579
+ 'z.ai-cn-api': { 'glm-5.1': 'glm-5.2', 'glm-5': 'glm-5.2' },
580
+ google: {
581
+ 'gemini-3.1-flash-lite': 'gemini-3.5-flash-lite',
582
+ },
583
+ grok: {
584
+ 'grok-code-fast-1': 'grok-build-0.1',
585
+ 'grok-4-fast-reasoning': 'grok-4.3',
586
+ },
587
+ openai: {
588
+ 'gpt-5.5': 'gpt-5.6-sol',
589
+ 'gpt-5.4': 'gpt-5.6-terra',
590
+ 'gpt-5.4-mini': 'gpt-5.6-luna',
591
+ },
592
+ 'kimi-api': {
593
+ 'kimi-k3-code': 'kimi-k3',
594
+ 'kimi-k3-code-highspeed': 'kimi-k3',
595
+ 'kimi-k3-thinking': 'kimi-k3',
596
+ 'kimi-k2.5': 'kimi-k2.6',
597
+ },
598
+ 'kimi-cn': {
599
+ 'kimi-k3-code': 'kimi-k3',
600
+ 'kimi-k3-code-highspeed': 'kimi-k3',
601
+ 'kimi-k3-thinking': 'kimi-k3',
602
+ 'kimi-k2.5': 'kimi-k2.6',
603
+ },
604
+ qwen: {
605
+ 'qwen3-coder-plus': 'qwen3.7-plus',
606
+ 'qwen3-coder-next': 'qwen3.7-plus',
607
+ 'qwen3.7-max': 'qwen3.7-plus',
608
+ },
609
+ 'qwen-api': {
610
+ 'qwen3-coder-plus': 'qwen3.7-max',
611
+ 'qwen3-coder-next': 'qwen3.7-max',
612
+ 'qwen3-coder-flash': 'qwen3.6-flash',
613
+ },
614
+ 'qwen-cn': {
615
+ 'qwen3-coder-plus': 'qwen3.7-plus',
616
+ 'qwen3-coder-next': 'qwen3.7-plus',
617
+ 'qwen3.7-max': 'qwen3.7-plus',
618
+ },
619
+ 'qwen-cn-api': {
620
+ 'qwen3-coder-plus': 'qwen3.7-max',
621
+ 'qwen3-coder-next': 'qwen3.7-max',
622
+ 'qwen3-coder-flash': 'qwen3.6-flash',
623
+ },
624
+ };
625
+ export function replacementModelFor(providerId, modelId) {
626
+ return RETIRED_MODEL_REPLACEMENTS[providerId]?.[modelId];
627
+ }
547
628
  /**
548
629
  * Curated display order for the first-run login flow + `/provider` /
549
630
  * `/login` pickers. Headline / popular providers float to the top so
@@ -561,6 +642,7 @@ const DISPLAY_ORDER = [
561
642
  'kimi',
562
643
  'kimi-api',
563
644
  'qwen',
645
+ 'qwen-token-plan',
564
646
  'qwen-api',
565
647
  'grok',
566
648
  'deepseek',
@@ -666,8 +748,8 @@ export function providerNoStreamWithTools(providerId) {
666
748
  * internally and 400 on any custom value, so they're here too.
667
749
  */
668
750
  const SAMPLING_PARAMS_REJECTED = [
669
- 'claude-fable-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5',
670
- 'kimi-k2.7-code', 'kimi-for-coding',
751
+ 'claude-fable-5', 'claude-opus-5', 'claude-opus-4-8', 'claude-opus-4-7', 'claude-sonnet-5',
752
+ 'kimi-k3', 'kimi-k2.7-code', 'kimi-for-coding', 'k3',
671
753
  ];
672
754
  export function modelRejectsSamplingParams(model) {
673
755
  return SAMPLING_PARAMS_REJECTED.some(id => model === id || model.startsWith(`${id}-`));
@@ -709,10 +791,10 @@ export function modelSupportsReasoningEffort(providerId, model) {
709
791
  const id = canonicalModelId(model);
710
792
  switch (providerId) {
711
793
  case 'anthropic':
712
- // Effort is GA on Opus 4.5+, Sonnet 4.6/5, Fable 5 — NOT Haiku or Sonnet 4.5.
794
+ // Effort is GA on Opus 5, Opus 4.5+, Sonnet 4.6/5, Fable 5 — NOT Haiku or Sonnet 4.5.
713
795
  if (idMatches(id, 'claude-haiku-4-5') || idMatches(id, 'claude-sonnet-4-5'))
714
796
  return false;
715
- return /^claude-(opus-4-([5-9]|\d\d)|sonnet-(4-6|5)|fable-5)/.test(id);
797
+ return /^claude-(opus-5|opus-4-([5-9]|\d\d)|sonnet-(4-6|5)|fable-5)/.test(id);
716
798
  case 'openai':
717
799
  // GPT-5.x are reasoning models — reasoning_effort across the family (incl. mini).
718
800
  return id.startsWith('gpt-5');
@@ -725,9 +807,13 @@ export function modelSupportsReasoningEffort(providerId, model) {
725
807
  case 'z.ai-api':
726
808
  case 'z.ai-cn':
727
809
  case 'z.ai-cn-api':
728
- // GLM-5.2 added graded High/Max effort. glm-5-turbo is a plain thinking
729
- // toggle (no graded levels) so it stays out.
810
+ // GLM-5.2 exposes graded High/Max effort; Turbo is a plain toggle.
730
811
  return idMatches(id, 'glm-5-2');
812
+ case 'kimi':
813
+ return idMatches(id, 'k3');
814
+ case 'kimi-api':
815
+ case 'kimi-cn':
816
+ return idMatches(id, 'kimi-k3');
731
817
  case 'grok':
732
818
  // Grok reasoning models accept reasoning_effort (none/low/medium/high).
733
819
  // The coders (grok-code-fast, grok-build — the default) are NON-reasoning
@@ -737,8 +823,7 @@ export function modelSupportsReasoningEffort(providerId, model) {
737
823
  if (id.startsWith('grok-build') || id.startsWith('grok-code'))
738
824
  return false;
739
825
  return id.startsWith('grok') && !id.includes('non-reasoning');
740
- // Kimi (thinking on/off, not graded) and Qwen coders (non-thinking) have
741
- // no graded knob → fall through to default false.
826
+ // GLM Turbo and Qwen coders expose thinking on/off, not a graded knob.
742
827
  case 'openrouter':
743
828
  // OpenRouter normalizes a unified `reasoning` field and silently ignores
744
829
  // it for non-reasoning models, so the control is always safe to expose.
@@ -778,6 +863,11 @@ export function reasoningParamsFor(providerId, model, tier) {
778
863
  case 'z.ai-cn-api':
779
864
  // Graded thinking depth: high (default) or max. Lower tiers collapse to high.
780
865
  return { reasoning_effort: tier === 'max' ? 'max' : 'high' };
866
+ case 'kimi':
867
+ case 'kimi-api':
868
+ case 'kimi-cn':
869
+ // Kimi K3 accepts low/high/max; collapse our medium tier to high.
870
+ return { reasoning_effort: tier === 'low' ? 'low' : tier === 'max' ? 'max' : 'high' };
781
871
  case 'grok':
782
872
  // none/low/medium/high — no "max"; map our Max → high (the ceiling).
783
873
  return { reasoning_effort: tier === 'max' ? 'high' : tier };
@@ -814,6 +904,10 @@ export function availableReasoningTiers(providerId, model) {
814
904
  case 'z.ai-cn':
815
905
  case 'z.ai-cn-api':
816
906
  return ['auto', 'high', 'max'];
907
+ case 'kimi':
908
+ case 'kimi-api':
909
+ case 'kimi-cn':
910
+ return ['auto', 'low', 'high', 'max'];
817
911
  case 'grok':
818
912
  return ['auto', 'low', 'medium', 'high'];
819
913
  case 'openrouter':
@@ -825,8 +919,8 @@ export function availableReasoningTiers(providerId, model) {
825
919
  /**
826
920
  * Map a (possibly out-of-range) tier to the tier this model actually distinguishes,
827
921
  * for display — the chip + the checked menu row. The effort setting is global, so
828
- * a tier picked on Opus ('low') may not exist on GLM-5.2; we show the level GLM
829
- * will really run (its 'low' clamps to 'high'). Picks the available tier whose
922
+ * a tier picked on Opus ('medium') may not exist on Kimi K3; we show the level
923
+ * Kimi will really run (its 'medium' clamps to 'high'). Picks the tier whose
830
924
  * effective param equals the requested one. 'auto' (or unsupported) → 'auto'.
831
925
  */
832
926
  export function resolveReasoningTier(providerId, model, tier) {
@@ -20,6 +20,37 @@ export interface ConfirmOptions {
20
20
  onConfirm: () => void;
21
21
  onCancel?: () => void;
22
22
  }
23
+ /**
24
+ * One hunk in the interactive `/apply --interactive` picker.
25
+ * `lines` are already-formatted diff lines (e.g. `+ added`, `- removed`).
26
+ */
27
+ export interface HunkPickerItem {
28
+ /** File path this hunk belongs to. */
29
+ path: string;
30
+ /** 0-based hunk index within the file diff. */
31
+ hunkIndex: number;
32
+ /** Human-readable hunk header, e.g. `@@ -12,3 +12,5 @@`. */
33
+ header: string;
34
+ /** Pre-formatted diff lines to display. */
35
+ lines: string[];
36
+ }
37
+ /**
38
+ * Options for the interactive hunk picker. The picker walks the user
39
+ * through `items` one at a time; for each they accept (`y`/Enter) or
40
+ * skip (`n`). `a` accepts all remaining, `q`/Esc quits.
41
+ *
42
+ * `onComplete` fires once with the set of accepted `[path, hunkIndex]`
43
+ * pairs (possibly empty) so the caller can apply them via
44
+ * `applyHunksToFiles`.
45
+ */
46
+ export interface HunkPickerOptions {
47
+ title: string;
48
+ items: HunkPickerItem[];
49
+ onComplete: (accepted: Array<{
50
+ path: string;
51
+ hunkIndex: number;
52
+ }>) => void;
53
+ }
23
54
  export interface AppOptions {
24
55
  onSubmit: (message: string) => Promise<void>;
25
56
  onCommand: (command: string, args: string[]) => void;
@@ -29,6 +60,8 @@ export interface AppOptions {
29
60
  getStatus: () => StatusInfo;
30
61
  hasWriteAccess?: () => boolean;
31
62
  hasProjectContext?: () => boolean;
63
+ /** Project root for `@mention` autocomplete suggestions. Falls back to cwd. */
64
+ getProjectRoot?: () => string;
32
65
  }
33
66
  export declare class App {
34
67
  private screen;
@@ -56,6 +89,10 @@ export declare class App {
56
89
  private agentThinking;
57
90
  private agentWaitingForAI;
58
91
  private agentLog;
92
+ /** Process uptime shown in the persistent footer. */
93
+ private appStartedAt;
94
+ /** Start of the current agent run; unlike app uptime, resets per task. */
95
+ private agentStartedAt;
59
96
  private pasteInfo;
60
97
  private pasteInfoOpen;
61
98
  private codeBlockCounter;
@@ -67,9 +104,19 @@ export declare class App {
67
104
  private showAutocomplete;
68
105
  private autocompleteIndex;
69
106
  private autocompleteItems;
107
+ private showMentionAutocomplete;
108
+ private mentionIndex;
109
+ private mentionItems;
110
+ private mentionAtStart;
111
+ /** Project root for resolving `suggestMentions`. Cached per update. */
112
+ private mentionRoot;
70
113
  private confirmOpen;
71
114
  private confirmOptions;
72
115
  private confirmSelection;
116
+ private hunkPickerOpen;
117
+ private hunkPickerOptions;
118
+ private hunkPickerIndex;
119
+ private hunkPickerAccepted;
73
120
  private menuOpen;
74
121
  private menuTitle;
75
122
  /** Filtered view shown to the user; derived from `menuItemsAll` + `menuFilter`. */
@@ -231,6 +278,11 @@ export declare class App {
231
278
  * Show confirmation dialog
232
279
  */
233
280
  showConfirm(options: ConfirmOptions): void;
281
+ /**
282
+ * Show the interactive hunk picker (`/apply --interactive`).
283
+ * The caller passes pre-built items + an `onComplete` callback.
284
+ */
285
+ showHunkPicker(options: HunkPickerOptions): void;
234
286
  /**
235
287
  * Show permission dialog (inline, below status bar)
236
288
  */
@@ -314,6 +366,13 @@ export declare class App {
314
366
  * Update autocomplete suggestions
315
367
  */
316
368
  private updateAutocomplete;
369
+ /**
370
+ * Replace the in-progress `@query` (from `mentionAtStart` to the
371
+ * cursor) with the selected mention's path. Keeps the `@` prefix and
372
+ * positions the cursor right after the inserted path so the user can
373
+ * keep typing the rest of the message.
374
+ */
375
+ private applyMentionSelection;
317
376
  /**
318
377
  * Handle inline status keys
319
378
  */
@@ -352,6 +411,15 @@ export declare class App {
352
411
  private handleInlinePermissionKey;
353
412
  private handleInlineSessionPickerKey;
354
413
  private handleInlineConfirmKey;
414
+ /**
415
+ * Handle keys in the interactive hunk picker.
416
+ * y / Enter / → accept this hunk, advance
417
+ * n / ← skip this hunk, advance
418
+ * a accept this + all remaining, finish
419
+ * q / Esc finish without accepting this hunk
420
+ * ↑ / ↓ navigate (preview only — no decision)
421
+ */
422
+ private handleHunkPickerKey;
355
423
  /**
356
424
  * Submit the current input buffer (used by Enter and Escape-in-multiline)
357
425
  */
@@ -369,10 +437,23 @@ export declare class App {
369
437
  * Render chat screen
370
438
  */
371
439
  private renderChat;
440
+ private shouldRenderAgentTimeline;
441
+ private renderPersistentHeader;
442
+ private renderAgentTimelineScreen;
443
+ private renderAgentContextRail;
444
+ private renderAgentKeyHints;
445
+ private timelineStatusStyle;
446
+ private currentActionType;
447
+ private currentAgentTask;
372
448
  /**
373
449
  * Render inline confirmation dialog below status bar
374
450
  */
375
451
  private renderInlineConfirm;
452
+ /**
453
+ * Render inline hunk picker (`/apply --interactive`).
454
+ * Shows the current hunk's diff + the y/n/a/q key legend.
455
+ */
456
+ private renderInlineHunkPicker;
376
457
  /**
377
458
  * Render input line
378
459
  */
@@ -394,6 +475,14 @@ export declare class App {
394
475
  * Render inline autocomplete below status bar
395
476
  */
396
477
  private renderInlineAutocomplete;
478
+ /**
479
+ * Render inline `@mention` file picker below the status bar.
480
+ *
481
+ * Mirrors the layout of `renderInlineAutocomplete` (separator → title →
482
+ * items → footer) but shows file paths with their parent directory as
483
+ * the description, and a `@` prefix instead of `/`.
484
+ */
485
+ private renderInlineMentionPicker;
397
486
  /**
398
487
  * Render inline permission dialog
399
488
  */