@qwen-code/qwen-code 0.18.0-preview.1 → 0.18.0-preview.2

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 (107) hide show
  1. package/bundled/qc-helper/SKILL.md +1 -2
  2. package/bundled/qc-helper/docs/configuration/settings.md +17 -19
  3. package/bundled/qc-helper/docs/features/_meta.ts +0 -3
  4. package/bundled/qc-helper/docs/features/commands.md +14 -12
  5. package/bundled/qc-helper/docs/features/scheduled-tasks.md +1 -1
  6. package/bundled/qc-helper/docs/features/sub-agents.md +39 -0
  7. package/chunks/{agent-SXS4NQWS.js → agent-QB7TZ4HW.js} +22 -16
  8. package/chunks/agent-headless-APVHH7QM.js +50 -0
  9. package/chunks/{anthropicContentGenerator-4QBVSFSJ.js → anthropicContentGenerator-M45EVVRM.js} +4 -4
  10. package/chunks/{askUserQuestion-NOOLRWCJ.js → askUserQuestion-WM2KHM3K.js} +2 -2
  11. package/chunks/{ca-WRHFBIDH.js → ca-BARBRL6N.js} +48 -1
  12. package/chunks/{chunk-G763GDO6.js → chunk-2ZTWI7KH.js} +15 -3
  13. package/chunks/chunk-64WXLC72.js +98 -0
  14. package/chunks/{chunk-NQZ33PWX.js → chunk-7YKXFA3D.js} +11 -11
  15. package/chunks/chunk-AJIR24J2.js +59 -0
  16. package/chunks/{chunk-ERREX2ES.js → chunk-AVW55ZCO.js} +61 -23
  17. package/chunks/{chunk-SHUT5MQY.js → chunk-CNHFPN7T.js} +1 -1
  18. package/chunks/{chunk-5RNZ2QKF.js → chunk-CNSMKPK6.js} +1 -1
  19. package/chunks/{chunk-BBTV54KB.js → chunk-CWV3SJZS.js} +2 -2
  20. package/chunks/{chunk-GBEPNWYB.js → chunk-GX7VH5JQ.js} +1 -1
  21. package/chunks/chunk-HGJPQK33.js +2231 -0
  22. package/chunks/chunk-HV3ZZ7G4.js +159 -0
  23. package/chunks/{chunk-ZW7GBCRE.js → chunk-HXJE7VOG.js} +20 -31
  24. package/chunks/{chunk-PLYZAP4W.js → chunk-ICOI4E4S.js} +1 -1
  25. package/chunks/{chunk-6VFG3EUJ.js → chunk-JUGRPQAB.js} +1 -1
  26. package/chunks/{chunk-AVLOK27J.js → chunk-JVQOQ3OU.js} +1 -1
  27. package/chunks/{chunk-R5PDRHEF.js → chunk-JXAZUMDW.js} +67 -45
  28. package/chunks/{chunk-UABFCMPA.js → chunk-KC6ZMJ5X.js} +3 -1
  29. package/chunks/chunk-LD2XBG6Z.js +102 -0
  30. package/chunks/{chunk-MVX64PNU.js → chunk-LR62TEET.js} +1 -1
  31. package/chunks/{chunk-JMLIPZUU.js → chunk-MVIVIPCU.js} +3 -3
  32. package/chunks/{chunk-KOA52UTF.js → chunk-NW5QBUYO.js} +6 -6
  33. package/chunks/{chunk-JSYEZAYV.js → chunk-P4J26VDS.js} +2 -2
  34. package/chunks/{chunk-SCHRFI7O.js → chunk-PAEBHDIO.js} +1 -1
  35. package/chunks/{chunk-6KH2Q7XN.js → chunk-QCG6KPNM.js} +3685 -1897
  36. package/chunks/chunk-SKBPNJEW.js +45 -0
  37. package/chunks/{chunk-F5ORN4YO.js → chunk-UAMOBVVW.js} +1 -1
  38. package/chunks/chunk-XBFVXFB2.js +216 -0
  39. package/chunks/{chunk-D46KOV3C.js → chunk-Y7R6H6FT.js} +1 -1
  40. package/chunks/{chunk-F6FLCHCS.js → chunk-ZK4AMNIU.js} +39 -12
  41. package/chunks/{computer-use-CT6MU6P3.js → computer-use-B7VIUI7F.js} +22 -16
  42. package/chunks/contextCommand-63RZ3O5R.js +52 -0
  43. package/chunks/{cron-create-PIPMXQN4.js → cron-create-FI5LJVUS.js} +2 -2
  44. package/chunks/{cron-delete-6Y5XIDMS.js → cron-delete-ZGUXWBTG.js} +2 -2
  45. package/chunks/{cron-list-A4WNRUWZ.js → cron-list-QNNZGMN3.js} +2 -2
  46. package/chunks/{de-M5RPB2NB.js → de-YGKK2BC4.js} +48 -1
  47. package/chunks/{edit-A4YK7AIB.js → edit-6UBTS2J5.js} +23 -17
  48. package/chunks/{en-UMYKQAZE.js → en-HSQQNQUB.js} +73 -2
  49. package/chunks/{enter-worktree-VNEQINLC.js → enter-worktree-NN7LIXCM.js} +22 -16
  50. package/chunks/{exit-worktree-AVSMXC33.js → exit-worktree-GGSS5KIE.js} +22 -16
  51. package/chunks/{exitPlanMode-5SQYVROD.js → exitPlanMode-H323NHB2.js} +22 -16
  52. package/chunks/{fr-MPYXXXPW.js → fr-JXBKPJKQ.js} +48 -1
  53. package/chunks/{geminiContentGenerator-CR2WGARL.js → geminiContentGenerator-I4H2NLJG.js} +4 -4
  54. package/chunks/{glob-5V32KOG5.js → glob-OLCX57MD.js} +22 -16
  55. package/chunks/{grep-PUTEPBR4.js → grep-7HXIMDOW.js} +22 -16
  56. package/chunks/{ja-NFZ32AB3.js → ja-TGPZSP2B.js} +48 -1
  57. package/chunks/{keychain-token-storage-UHGOCDD6.js → keychain-token-storage-LB46DAEK.js} +2 -2
  58. package/chunks/{ls-34DLNYCD.js → ls-6PEZUK6O.js} +3 -3
  59. package/chunks/{lsp-NCDEHH3V.js → lsp-JZSJOVT7.js} +2 -2
  60. package/chunks/{monitor-EJBR5VCR.js → monitor-SQO7MVAV.js} +22 -16
  61. package/chunks/{notebook-edit-DZHGPP2L.js → notebook-edit-72L3EBAL.js} +23 -17
  62. package/chunks/{openaiContentGenerator-4QNV3CHM.js → openaiContentGenerator-FTR7CDWF.js} +12 -11
  63. package/chunks/{pt-BR43FRBA.js → pt-TIBG6BIO.js} +48 -1
  64. package/chunks/{qwenContentGenerator-3XOCEMQO.js → qwenContentGenerator-U5UFQ566.js} +24 -18
  65. package/chunks/{qwenOAuth2-KRJT35QH.js → qwenOAuth2-EFSECGHF.js} +4 -4
  66. package/chunks/{read-file-VZ2SQQIX.js → read-file-UA64EEQC.js} +8 -8
  67. package/chunks/{ripGrep-SBIZCPOL.js → ripGrep-WSYCWZVK.js} +22 -16
  68. package/chunks/{ru-DQCW2KHD.js → ru-JBCHCK4L.js} +48 -1
  69. package/chunks/{scheduler-H32DZVDV.js → scheduler-VBASHOCA.js} +22 -16
  70. package/chunks/send-message-OYJZ5TPG.js +244 -0
  71. package/chunks/{serve-56G4B5W6.js → serve-A7E2OJDR.js} +45 -36
  72. package/chunks/{shell-Q77KNP4N.js → shell-3NFOT6F5.js} +22 -16
  73. package/chunks/{skill-CLWFJYBG.js → skill-RA5YUREY.js} +10 -10
  74. package/chunks/{src-47L2LUOU.js → src-NFCMARMT.js} +182 -23
  75. package/chunks/{syntheticOutput-T5SWX3YF.js → syntheticOutput-DETQ2YM6.js} +3 -3
  76. package/chunks/task-create-Y3ZKTJIG.js +19 -0
  77. package/chunks/task-list-ONXJ3I3A.js +151 -0
  78. package/chunks/{task-stop-3VHAQMYM.js → task-stop-UHDC4N5B.js} +2 -2
  79. package/chunks/task-update-TCNOU3P5.js +397 -0
  80. package/chunks/team-create-6SR4OVRG.js +313 -0
  81. package/chunks/team-delete-EJ4U4DDP.js +114 -0
  82. package/chunks/{todoWrite-EAGJGKO5.js → todoWrite-TEYDRS5L.js} +4 -4
  83. package/chunks/{tool-search-Q75AYDTP.js → tool-search-OD435A3X.js} +8 -8
  84. package/chunks/{web-fetch-SS6IKK6N.js → web-fetch-6W67H5PO.js} +4 -4
  85. package/chunks/workflow-62DHH4EO.js +708 -0
  86. package/chunks/{write-file-RENGC25N.js → write-file-475L5OPP.js} +23 -17
  87. package/chunks/{zh-TW-IQZ4AD5M.js → zh-TW-G3HFHVVT.js} +74 -6
  88. package/chunks/{zh-6VFXOAR5.js → zh-VCLWO26Y.js} +77 -6
  89. package/cli.js +6417 -3115
  90. package/examples/agent/qwen-extension.json +1 -0
  91. package/examples/commands/qwen-extension.json +1 -0
  92. package/examples/context/qwen-extension.json +1 -0
  93. package/examples/mcp-server/qwen-extension.json +1 -0
  94. package/examples/skills/qwen-extension.json +1 -0
  95. package/locales/ca.js +51 -0
  96. package/locales/de.js +51 -0
  97. package/locales/en.js +83 -2
  98. package/locales/fr.js +53 -2
  99. package/locales/ja.js +52 -2
  100. package/locales/pt.js +52 -2
  101. package/locales/ru.js +53 -2
  102. package/locales/zh-TW.js +85 -11
  103. package/locales/zh.js +89 -11
  104. package/package.json +2 -2
  105. package/bundled/qc-helper/docs/features/checkpointing.md +0 -77
  106. package/chunks/contextCommand-YODJQYIV.js +0 -46
  107. package/chunks/send-message-YYF56TS7.js +0 -151
package/locales/zh-TW.js CHANGED
@@ -451,8 +451,6 @@ export default {
451
451
  'Auto Edit': '自動編輯',
452
452
  YOLO: 'YOLO',
453
453
  'toggle vim mode on/off': '切換 vim 模式開關',
454
- 'check session stats. Usage: /stats [model|tools]':
455
- '檢查會話統計信息。用法:/stats [model|tools]',
456
454
  'Show model-specific usage statistics.': '顯示模型相關的使用統計信息',
457
455
  'Show tool-specific usage statistics.': '顯示工具相關的使用統計信息',
458
456
  'exit the cli': '退出命令行界面',
@@ -762,12 +760,10 @@ export default {
762
760
  '請提供指令。用法:/fork <指令>',
763
761
  'Cannot fork while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.':
764
762
  '回應或工具呼叫正在進行時無法分支。請等待其完成或處理待確認的工具呼叫。',
765
- 'Cannot fork before the first conversation turn.':
766
- '首次對話輪次前無法分支。',
763
+ 'Cannot fork before the first conversation turn.': '首次對話輪次前無法分支。',
767
764
  'The /fork command requires the fork feature gate. Set QWEN_CODE_ENABLE_FORK_SUBAGENT=1 to enable it.':
768
765
  '/fork 命令需要啟用 fork 功能開關。設定 QWEN_CODE_ENABLE_FORK_SUBAGENT=1 以啟用。',
769
- 'The agent tool is unavailable; cannot fork.':
770
- 'Agent 工具不可用;無法分支。',
766
+ 'The agent tool is unavailable; cannot fork.': 'Agent 工具不可用;無法分支。',
771
767
  'Failed to launch fork: {{error}}': '啟動分支失敗:{{error}}',
772
768
  'the background agent could not be started.': '背景智能體無法啟動。',
773
769
  'User launched a background fork via /fork: {{directive}}':
@@ -1066,7 +1062,7 @@ export default {
1066
1062
  'Time remaining:': '剩餘時間:',
1067
1063
  'Qwen OAuth Authentication Timeout': 'Qwen OAuth 認證超時',
1068
1064
  'OAuth token expired (over {{seconds}} seconds). Please select authentication method again.':
1069
- 'OAuth 令牌已過期(超過 {{seconds}} 秒)。請重新選擇認證方法',
1065
+ 'OAuth token 已過期(超過 {{seconds}} 秒)。請重新選擇認證方法',
1070
1066
  'Press any key to return to authentication type selection.':
1071
1067
  '按任意鍵返回認證類型選擇',
1072
1068
  'Waiting for Qwen OAuth authentication...': '正在等待 Qwen OAuth 認證...',
@@ -1265,22 +1261,41 @@ export default {
1265
1261
  'Tool Time:': '工具時間:',
1266
1262
  'Session Stats': '會話統計',
1267
1263
  'Model Usage': '模型使用情況',
1268
- Reqs: '請求數',
1269
1264
  'Input Tokens': '輸入 token 數',
1270
1265
  'Output Tokens': '輸出 token 數',
1271
1266
  'Savings Highlight:': '節省亮點:',
1272
1267
  'of input tokens were served from the cache, reducing costs.':
1273
1268
  '從緩存載入 token ,降低了成本',
1274
1269
  'Tip: For a full token breakdown, run `/stats model`.':
1275
- '提示:要查看完整的令牌明細,請運行 `/stats model`',
1270
+ '提示:要查看完整的 token 明細,請運行 `/stats model`',
1276
1271
  'Model Stats For Nerds': '模型統計(技術細節)',
1277
1272
  'Tool Stats For Nerds': '工具統計(技術細節)',
1278
1273
  Metric: '指標',
1279
1274
  API: 'API',
1275
+ Session: '會話',
1276
+ Activity: '概覽',
1277
+ Efficiency: '性能',
1278
+ Success: '成功率',
1279
+ Today: '今天',
1280
+ 'Token Trend': 'Token 趨勢',
1281
+ 'Cache Hit Rate': '緩存命中率',
1282
+ 'Tool Success': '工具成功率',
1283
+ 'Tool Leaderboard': '工具排行',
1284
+ Calls: '調用次數',
1285
+ Time: '耗時',
1286
+ Reqs: '請求',
1287
+ Cache: '緩存',
1288
+ Latency: '延遲',
1289
+ 'In/Out': '輸入/輸出',
1290
+ 'Code Impact': '代碼變更',
1291
+ 'Failed to load stats. Press r to retry.': '載入統計失敗,按 r 重試。',
1292
+ net: '淨增',
1293
+ streak: '連續',
1294
+ best: '最長',
1280
1295
  Requests: '請求數',
1281
1296
  Errors: '錯誤數',
1282
1297
  'Avg Latency': '平均延遲',
1283
- Tokens: '令牌',
1298
+ Tokens: 'Token',
1284
1299
  Total: '總計',
1285
1300
  Prompt: '提示',
1286
1301
  Cached: '緩存',
@@ -1289,7 +1304,6 @@ export default {
1289
1304
  'No API calls have been made in this session.':
1290
1305
  '本次會話中未進行任何 API 調用',
1291
1306
  'Tool Name': '工具名稱',
1292
- Calls: '調用次數',
1293
1307
  'Success Rate': '成功率',
1294
1308
  'Avg Duration': '平均耗時',
1295
1309
  'User Decision Summary': '用戶決策摘要',
@@ -1649,6 +1663,66 @@ export default {
1649
1663
  "The scheduler gate did not see this dream's timestamp; the next dream cycle may re-fire sooner than usual.":
1650
1664
  '排程門控未看到本次記憶整理的時間戳;下一輪記憶整理可能會比平時更早重新觸發。',
1651
1665
 
1666
+ // Stats Dashboard — Category 2 (missing from zh-TW)
1667
+ 'Activity Heatmap': '活動熱力圖',
1668
+ Less: '少',
1669
+ More: '多',
1670
+ Sessions: '會話數',
1671
+ Duration: '時長',
1672
+ Projects: '專案統計',
1673
+ 'Loading stats...': '載入統計...',
1674
+ '(no data)': '(暫無資料)',
1675
+ d: '天',
1676
+ h: '時',
1677
+ m: '分',
1678
+ Input: '輸入',
1679
+ Models: '模型',
1680
+ 'All time': '所有時間',
1681
+ 'Last 7 days': '最近 7 天',
1682
+ 'Last 30 days': '最近 30 天',
1683
+ 'Show usage statistics dashboard.': '顯示使用統計面板。',
1684
+
1685
+ // Stats Dashboard — keyboard hints (not translated)
1686
+ 'tab \xB7 esc': 'tab \xB7 esc',
1687
+ 'tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc':
1688
+ 'tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc',
1689
+ 'tab \xB7 r dates \xB7 esc': 'tab \xB7 r dates \xB7 esc',
1690
+
1691
+ // Stats Dashboard — missing labels
1692
+ 'API Requests': 'API 請求',
1693
+ 'Tool Calls': '工具呼叫',
1694
+ 'Success rate': '成功率',
1695
+ 'Code Changes': '程式碼變更',
1696
+ Tool: '工具',
1697
+ reqs: '請求',
1698
+ in: '輸入',
1699
+ out: '輸出',
1700
+
1701
+ // statsCommand non-interactive output
1702
+ 'API requests: {{count}}': 'API 請求:{{count}}',
1703
+ 'Code changes': '程式碼變更',
1704
+ Cost: '費用',
1705
+ 'Estimated cost: ${{cost}}': '預估費用:${{cost}}',
1706
+ 'Files: +{{added}} / -{{removed}} lines':
1707
+ '檔案:+{{added}} / -{{removed}} 行',
1708
+ 'N/A': 'N/A',
1709
+ Name: '名稱',
1710
+ 'No model usage data yet.': '尚無模型使用資料。',
1711
+ 'No tool usage data yet.': '尚無工具使用資料。',
1712
+ 'Prompts: {{count}}': '提示:{{count}}',
1713
+ 'Session duration: {{duration}}': '會話時長:{{duration}}',
1714
+ 'Tokens \u2014 prompt: {{prompt}}, output: {{output}}':
1715
+ 'Token — 輸入:{{prompt}},輸出:{{output}}',
1716
+ 'Tool calls': '工具呼叫',
1717
+ 'Tool calls: {{total}} ({{success}} ok, {{fail}} fail)':
1718
+ '工具呼叫:{{total}}({{success}} 成功,{{fail}} 失敗)',
1719
+ cached: '快取',
1720
+ days: '天',
1721
+ output: '輸出',
1722
+ prompt: '輸入',
1723
+ '\u2191 tabs \u00B7 r to cycle dates \u00B7 esc to close':
1724
+ '\u2191 tab 切換標籤 \u00B7 r 切換時間範圍 \u00B7 esc 關閉',
1725
+
1652
1726
  // === Same-as-English optimization ===
1653
1727
  ' (not in model registry)': '(不在模型註冊表中)',
1654
1728
  'start server': '啟動伺服器',
package/locales/zh.js CHANGED
@@ -492,8 +492,7 @@ export default {
492
492
  'Auto Edit': '自动编辑',
493
493
  YOLO: 'YOLO',
494
494
  'toggle vim mode on/off': '切换 vim 模式开关',
495
- 'check session stats. Usage: /stats [model|tools]':
496
- '检查会话统计信息。用法:/stats [model|tools]',
495
+ 'Show usage statistics dashboard.': '显示使用统计面板。',
497
496
  'Show model-specific usage statistics.': '显示模型相关的使用统计信息',
498
497
  'Show tool-specific usage statistics.': '显示工具相关的使用统计信息',
499
498
  'exit the cli': '退出命令行界面',
@@ -842,12 +841,10 @@ export default {
842
841
  '请提供指令。用法:/fork <指令>',
843
842
  'Cannot fork while a response or tool call is in progress. Wait for it to finish or resolve the pending tool call.':
844
843
  '响应或工具调用正在进行时无法分支。请等待其完成或处理待确认的工具调用。',
845
- 'Cannot fork before the first conversation turn.':
846
- '首次对话轮次前无法分支。',
844
+ 'Cannot fork before the first conversation turn.': '首次对话轮次前无法分支。',
847
845
  'The /fork command requires the fork feature gate. Set QWEN_CODE_ENABLE_FORK_SUBAGENT=1 to enable it.':
848
846
  '/fork 命令需要启用 fork 功能开关。设置 QWEN_CODE_ENABLE_FORK_SUBAGENT=1 以启用。',
849
- 'The agent tool is unavailable; cannot fork.':
850
- 'Agent 工具不可用;无法分支。',
847
+ 'The agent tool is unavailable; cannot fork.': 'Agent 工具不可用;无法分支。',
851
848
  'Failed to launch fork: {{error}}': '启动分支失败:{{error}}',
852
849
  'the background agent could not be started.': '后台智能体无法启动。',
853
850
  'User launched a background fork via /fork: {{directive}}':
@@ -1202,7 +1199,7 @@ export default {
1202
1199
  'Time remaining:': '剩余时间:',
1203
1200
  'Qwen OAuth Authentication Timeout': 'Qwen OAuth 认证超时',
1204
1201
  'OAuth token expired (over {{seconds}} seconds). Please select authentication method again.':
1205
- 'OAuth 令牌已过期(超过 {{seconds}} 秒)。请重新选择认证方法',
1202
+ 'OAuth token 已过期(超过 {{seconds}} 秒)。请重新选择认证方法',
1206
1203
  'Press any key to return to authentication type selection.':
1207
1204
  '按任意键返回认证类型选择',
1208
1205
  'Waiting for Qwen OAuth authentication...': '正在等待 Qwen OAuth 认证...',
@@ -1425,22 +1422,41 @@ export default {
1425
1422
  'Tool Time:': '工具时间:',
1426
1423
  'Session Stats': '会话统计',
1427
1424
  'Model Usage': '模型使用情况',
1428
- Reqs: '请求数',
1429
1425
  'Input Tokens': '输入 token 数',
1430
1426
  'Output Tokens': '输出 token 数',
1431
1427
  'Savings Highlight:': '节省亮点:',
1432
1428
  'of input tokens were served from the cache, reducing costs.':
1433
1429
  '从缓存载入 token ,降低了成本',
1434
1430
  'Tip: For a full token breakdown, run `/stats model`.':
1435
- '提示:要查看完整的令牌明细,请运行 `/stats model`',
1431
+ '提示:要查看完整的 token 明细,请运行 `/stats model`',
1436
1432
  'Model Stats For Nerds': '模型统计(技术细节)',
1437
1433
  'Tool Stats For Nerds': '工具统计(技术细节)',
1438
1434
  Metric: '指标',
1439
1435
  API: 'API',
1436
+ Session: '会话',
1437
+ Activity: '概览',
1438
+ Efficiency: '性能',
1439
+ Success: '成功率',
1440
+ Today: '今天',
1441
+ 'Token Trend': 'Token 趋势',
1442
+ 'Cache Hit Rate': '缓存命中率',
1443
+ 'Tool Success': '工具成功率',
1444
+ 'Tool Leaderboard': '工具排行',
1445
+ Calls: '调用次数',
1446
+ Time: '耗时',
1447
+ Reqs: '请求',
1448
+ Cache: '缓存',
1449
+ Latency: '延迟',
1450
+ 'In/Out': '输入/输出',
1451
+ 'Code Impact': '代码变更',
1452
+ 'Failed to load stats. Press r to retry.': '加载统计失败,按 r 重试。',
1453
+ net: '净增',
1454
+ streak: '连续',
1455
+ best: '最长',
1440
1456
  Requests: '请求数',
1441
1457
  Errors: '错误数',
1442
1458
  'Avg Latency': '平均延迟',
1443
- Tokens: '令牌',
1459
+ Tokens: 'Token',
1444
1460
  Total: '总计',
1445
1461
  Prompt: '提示',
1446
1462
  Cached: '缓存',
@@ -1449,7 +1465,6 @@ export default {
1449
1465
  'No API calls have been made in this session.':
1450
1466
  '本次会话中未进行任何 API 调用',
1451
1467
  'Tool Name': '工具名称',
1452
- Calls: '调用次数',
1453
1468
  'Success Rate': '成功率',
1454
1469
  'Avg Duration': '平均耗时',
1455
1470
  'User Decision Summary': '用户决策摘要',
@@ -1842,6 +1857,69 @@ export default {
1842
1857
  "The scheduler gate did not see this dream's timestamp; the next dream cycle may re-fire sooner than usual.":
1843
1858
  '调度门控未看到本次记忆整理的时间戳;下一轮记忆整理可能会比平时更早重新触发。',
1844
1859
 
1860
+ // ============================================================================
1861
+ // Stats
1862
+ // ============================================================================
1863
+
1864
+ // statsCommand non-interactive output
1865
+ 'Session duration: {{duration}}': '会话时长:{{duration}}',
1866
+ 'Prompts: {{count}}': '提示次数:{{count}}',
1867
+ 'API requests: {{count}}': 'API 请求数:{{count}}',
1868
+ 'Tokens — prompt: {{prompt}}, output: {{output}}':
1869
+ 'Tokens — 输入:{{prompt}},输出:{{output}}',
1870
+ 'Tool calls: {{total}} ({{success}} ok, {{fail}} fail)':
1871
+ '工具调用:{{total}}({{success}} 成功,{{fail}} 失败)',
1872
+ 'Files: +{{added}} / -{{removed}} lines':
1873
+ '文件:+{{added}} / -{{removed}} 行',
1874
+ prompt: '输入',
1875
+ output: '输出',
1876
+ cached: '缓存',
1877
+ 'Estimated cost: ${{cost}}': '预估费用:${{cost}}',
1878
+ 'No model usage data yet.': '暂无模型使用数据。',
1879
+ 'No tool usage data yet.': '暂无工具使用数据。',
1880
+
1881
+ // StatsDialog
1882
+ Models: '模型',
1883
+ 'All time': '所有时间',
1884
+ 'Last 7 days': '最近 7 天',
1885
+ 'Last 30 days': '最近 30 天',
1886
+ 'N/A': '无',
1887
+ Sessions: '会话数',
1888
+ days: '天',
1889
+ Input: '输入',
1890
+ 'Tool calls': '工具调用',
1891
+ 'Code changes': '代码变更',
1892
+ Projects: '项目统计',
1893
+ Name: '名称',
1894
+ Duration: '时长',
1895
+ 'Activity Heatmap': '用量热力统计',
1896
+ 'Loading stats...': '加载统计数据...',
1897
+ '\u2191 tabs \u00b7 r to cycle dates \u00b7 esc to close':
1898
+ '\u2191 tab 切换标签 \u00b7 r 切换时间范围 \u00b7 esc 关闭',
1899
+ Cost: '费用',
1900
+ Less: '少',
1901
+ More: '多',
1902
+ '(no data)': '(无数据)',
1903
+ d: '天',
1904
+ h: '时',
1905
+ m: '分',
1906
+
1907
+ // Stats Dashboard — keyboard hints (not translated)
1908
+ 'tab \xB7 esc': 'tab \xB7 esc',
1909
+ 'tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc':
1910
+ 'tab \xB7 r dates \xB7 \u2190\u2192 month \xB7 esc',
1911
+ 'tab \xB7 r dates \xB7 esc': 'tab \xB7 r dates \xB7 esc',
1912
+
1913
+ // Stats Dashboard — missing labels
1914
+ 'API Requests': 'API 请求',
1915
+ 'Tool Calls': '工具调用',
1916
+ 'Success rate': '成功率',
1917
+ 'Code Changes': '代码变更',
1918
+ Tool: '工具',
1919
+ reqs: '请求',
1920
+ in: '输入',
1921
+ out: '输出',
1922
+
1845
1923
  // === Same-as-English optimization ===
1846
1924
  ' (not in model registry)': '(不在模型注册表中)',
1847
1925
  'start server': '启动服务器',
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@qwen-code/qwen-code",
3
- "version": "0.18.0-preview.1",
3
+ "version": "0.18.0-preview.2",
4
4
  "description": "Qwen Code - AI-powered coding assistant",
5
5
  "repository": {
6
6
  "type": "git",
@@ -23,7 +23,7 @@
23
23
  "bundled"
24
24
  ],
25
25
  "config": {
26
- "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.0-preview.1"
26
+ "sandboxImageUri": "ghcr.io/qwenlm/qwen-code:0.18.0-preview.2"
27
27
  },
28
28
  "dependencies": {},
29
29
  "optionalDependencies": {
@@ -1,77 +0,0 @@
1
- # Checkpointing
2
-
3
- Qwen Code includes a Checkpointing feature that automatically saves a snapshot of your project's state before any file modifications are made by AI-powered tools. This allows you to safely experiment with and apply code changes, knowing you can instantly revert back to the state before the tool was run.
4
-
5
- ## How It Works
6
-
7
- When you approve a tool that modifies the file system (like `write_file` or `edit`), the CLI automatically creates a "checkpoint." This checkpoint includes:
8
-
9
- 1. **A Git Snapshot:** A commit is made in a special, shadow Git repository located in your home directory (`~/.qwen/history/<project_hash>`). This snapshot captures the complete state of your project files at that moment. It does **not** interfere with your own project's Git repository.
10
- 2. **Conversation History:** The entire conversation you've had with the agent up to that point is saved.
11
- 3. **The Tool Call:** The specific tool call that was about to be executed is also stored.
12
-
13
- If you want to undo the change or simply go back, you can use the `/restore` command. Restoring a checkpoint will:
14
-
15
- - Revert all files in your project to the state captured in the snapshot.
16
- - Restore the conversation history in the CLI.
17
- - Re-propose the original tool call, allowing you to run it again, modify it, or simply ignore it.
18
-
19
- All checkpoint data, including the Git snapshot and conversation history, is stored locally on your machine. The Git snapshot is stored in the shadow repository while the conversation history and tool calls are saved in a JSON file in your project's temporary directory, typically located at `~/.qwen/tmp/<project_hash>/checkpoints`.
20
-
21
- ## Enabling the Feature
22
-
23
- The Checkpointing feature is disabled by default. To enable it, you can either use a command-line flag or edit your `settings.json` file.
24
-
25
- ### Using the Command-Line Flag
26
-
27
- You can enable checkpointing for the current session by using the `--checkpointing` flag when starting Qwen Code:
28
-
29
- ```bash
30
- qwen --checkpointing
31
- ```
32
-
33
- ### Using the `settings.json` File
34
-
35
- To enable checkpointing by default for all sessions, you need to edit your `settings.json` file.
36
-
37
- Add the following key to your `settings.json`:
38
-
39
- ```json
40
- {
41
- "general": {
42
- "checkpointing": {
43
- "enabled": true
44
- }
45
- }
46
- }
47
- ```
48
-
49
- ## Using the `/restore` Command
50
-
51
- Once enabled, checkpoints are created automatically. To manage them, you use the `/restore` command.
52
-
53
- ### List Available Checkpoints
54
-
55
- To see a list of all saved checkpoints for the current project, simply run:
56
-
57
- ```
58
- /restore
59
- ```
60
-
61
- The CLI will display a list of available checkpoint files. These file names are typically composed of a timestamp, the name of the file being modified, and the name of the tool that was about to be run (e.g., `2025-06-22T10-00-00_000Z-my-file.txt-write_file`).
62
-
63
- ### Restore a Specific Checkpoint
64
-
65
- To restore your project to a specific checkpoint, use the checkpoint file from the list:
66
-
67
- ```
68
- /restore <checkpoint_file>
69
- ```
70
-
71
- For example:
72
-
73
- ```
74
- /restore 2025-06-22T10-00-00_000Z-my-file.txt-write_file
75
- ```
76
-
77
- After running the command, your files and conversation will be immediately restored to the state they were in when the checkpoint was created, and the original tool prompt will reappear.
@@ -1,46 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- collectContextData,
5
- contextCommand,
6
- formatContextUsageText
7
- } from "./chunk-KOA52UTF.js";
8
- import "./chunk-NQZ33PWX.js";
9
- import "./chunk-6KH2Q7XN.js";
10
- import "./chunk-K5PGHDBN.js";
11
- import "./chunk-O4PICXES.js";
12
- import "./chunk-TW522KN6.js";
13
- import "./chunk-MLZQVCF3.js";
14
- import "./chunk-SCHRFI7O.js";
15
- import "./chunk-PLYZAP4W.js";
16
- import "./chunk-UABFCMPA.js";
17
- import "./chunk-77WXWU44.js";
18
- import "./chunk-6VFG3EUJ.js";
19
- import "./chunk-F6FLCHCS.js";
20
- import "./chunk-3PJXIDKI.js";
21
- import "./chunk-UWCTAVOD.js";
22
- import "./chunk-OFEVLU4C.js";
23
- import "./chunk-AVLOK27J.js";
24
- import "./chunk-JSYEZAYV.js";
25
- import "./chunk-5RNZ2QKF.js";
26
- import "./chunk-G763GDO6.js";
27
- import "./chunk-JMLIPZUU.js";
28
- import "./chunk-GBEPNWYB.js";
29
- import "./chunk-F5ORN4YO.js";
30
- import "./chunk-MVX64PNU.js";
31
- import "./chunk-D46KOV3C.js";
32
- import "./chunk-BNESGOSJ.js";
33
- import "./chunk-SZOEIL6S.js";
34
- import "./chunk-5IFG2VC4.js";
35
- import "./chunk-R5PDRHEF.js";
36
- import "./chunk-ZERZSAZL.js";
37
- import "./chunk-QN5NZ3UQ.js";
38
- import "./chunk-BR4QREVK.js";
39
- import "./chunk-WFVXF3OM.js";
40
- import "./chunk-A4BMJM77.js";
41
- import "./chunk-J2S4EL5Y.js";
42
- export {
43
- collectContextData,
44
- contextCommand,
45
- formatContextUsageText
46
- };
@@ -1,151 +0,0 @@
1
- // Force strict mode and setup for ESM
2
- "use strict";
3
- import {
4
- BaseDeclarativeTool,
5
- BaseToolInvocation,
6
- ToolDisplayNames,
7
- ToolNames
8
- } from "./chunk-G763GDO6.js";
9
- import "./chunk-R5PDRHEF.js";
10
- import "./chunk-WFVXF3OM.js";
11
- import {
12
- init_esbuild_shims
13
- } from "./chunk-A4BMJM77.js";
14
- import {
15
- __name
16
- } from "./chunk-J2S4EL5Y.js";
17
-
18
- // packages/core/src/tools/send-message.ts
19
- init_esbuild_shims();
20
- var SendMessageInvocation = class extends BaseToolInvocation {
21
- constructor(config, params) {
22
- super(params);
23
- this.config = config;
24
- }
25
- static {
26
- __name(this, "SendMessageInvocation");
27
- }
28
- getDescription() {
29
- return `Send message to task ${this.params.task_id}`;
30
- }
31
- /**
32
- * Send-message routes free-form text into a running background task,
33
- * which will then execute it as a new instruction with full tool
34
- * access. Treat it as a privileged sink — the L4 default must not be
35
- * 'allow', because that would let the scheduler auto-approve in
36
- * AUTO mode (where 'allow' short-circuits the classifier). 'ask' lets
37
- * AUTO route through the classifier so the destination task and
38
- * message text can be inspected.
39
- */
40
- async getDefaultPermission() {
41
- return "ask";
42
- }
43
- async execute(_signal) {
44
- const registry = this.config.getBackgroundTaskRegistry();
45
- const entry = registry.get(this.params.task_id);
46
- if (!entry) {
47
- return {
48
- llmContent: `Error: No background task found with ID "${this.params.task_id}".`,
49
- returnDisplay: "Task not found.",
50
- error: {
51
- message: `Task not found: ${this.params.task_id}`,
52
- type: "send_message_not_found" /* SEND_MESSAGE_NOT_FOUND */
53
- }
54
- };
55
- }
56
- if (entry.status === "paused") {
57
- const resumed = await this.config.resumeBackgroundAgent(
58
- this.params.task_id,
59
- this.params.message
60
- );
61
- if (!resumed) {
62
- return {
63
- llmContent: `Error: Background task "${this.params.task_id}" could not be resumed.`,
64
- returnDisplay: "Task could not be resumed.",
65
- error: {
66
- message: `Task could not be resumed: ${this.params.task_id}`,
67
- type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
68
- }
69
- };
70
- }
71
- return {
72
- llmContent: `Background task "${this.params.task_id}" resumed with your message as the first continuation instruction.`,
73
- returnDisplay: `Resumed ${entry.description}`
74
- };
75
- }
76
- if (entry.status !== "running") {
77
- return {
78
- llmContent: `Error: Background task "${this.params.task_id}" is not running (status: ${entry.status}). Cannot send messages to stopped tasks.`,
79
- returnDisplay: `Task not running (${entry.status}).`,
80
- error: {
81
- message: `Task is ${entry.status}: ${this.params.task_id}`,
82
- type: "send_message_not_running" /* SEND_MESSAGE_NOT_RUNNING */
83
- }
84
- };
85
- }
86
- registry.queueMessage(this.params.task_id, this.params.message);
87
- return {
88
- llmContent: `Message queued for delivery to background task "${this.params.task_id}". The task will receive it at the next tool-round boundary.`,
89
- returnDisplay: `Message queued for ${entry.description}`
90
- };
91
- }
92
- };
93
- var SendMessageTool = class _SendMessageTool extends BaseDeclarativeTool {
94
- constructor(config) {
95
- super(
96
- _SendMessageTool.Name,
97
- ToolDisplayNames.SEND_MESSAGE,
98
- "Send a text message to a background task. Running tasks receive it at the next tool-round boundary. Paused recovered tasks are resumed first and use the message as their first continuation instruction.",
99
- "other" /* Other */,
100
- {
101
- type: "object",
102
- properties: {
103
- task_id: {
104
- type: "string",
105
- description: "The ID of the background task (from the launch response or a recovered paused task)."
106
- },
107
- message: {
108
- type: "string",
109
- description: "The text message to send to the task."
110
- }
111
- },
112
- required: ["task_id", "message"],
113
- additionalProperties: false
114
- },
115
- true,
116
- // isOutputMarkdown
117
- false,
118
- // canUpdateOutput
119
- true,
120
- // shouldDefer — sending messages to tasks is infrequent
121
- false,
122
- // alwaysLoad
123
- "send message task communicate notify"
124
- );
125
- this.config = config;
126
- }
127
- static {
128
- __name(this, "SendMessageTool");
129
- }
130
- static Name = ToolNames.SEND_MESSAGE;
131
- createInvocation(params) {
132
- return new SendMessageInvocation(this.config, params);
133
- }
134
- /**
135
- * Forward both fields verbatim to the classifier — `task_id` identifies
136
- * the privileged sink and the `message` itself is the new instruction
137
- * the background task will execute, so the classifier needs the full
138
- * text to evaluate the action's safety.
139
- */
140
- toAutoClassifierInput(params) {
141
- return { task_id: params.task_id, message: params.message };
142
- }
143
- };
144
- export {
145
- SendMessageTool
146
- };
147
- /**
148
- * @license
149
- * Copyright 2025 Qwen
150
- * SPDX-License-Identifier: Apache-2.0
151
- */