newcraw 1.0.3 → 1.0.4

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 (154) hide show
  1. package/dist/REPL-DECTPCL5.js +50 -0
  2. package/dist/{acp-25PIN25O.js → acp-HA476EHW.js} +30 -30
  3. package/dist/{agentsValidate-BXDD54YP.js → agentsValidate-EDPFUUMG.js} +7 -7
  4. package/dist/{ask-EL4XAA5P.js → ask-5SP4YYRD.js} +30 -30
  5. package/dist/{autoUpdater-DKMSJXWW.js → autoUpdater-FFMM2DR7.js} +3 -3
  6. package/dist/{chunk-ALQSPHXV.js → chunk-2BVCVKKB.js} +1 -1
  7. package/dist/{chunk-2OVXJBJV.js → chunk-2JCTO2EY.js} +2 -2
  8. package/dist/{chunk-BTCASL4X.js → chunk-3CKC4ABU.js} +177 -218
  9. package/dist/chunk-3CKC4ABU.js.map +7 -0
  10. package/dist/{chunk-RF57YWGW.js → chunk-ARCEUG3V.js} +7 -7
  11. package/dist/{chunk-7E2L7EH2.js → chunk-BJYXLCRS.js} +4 -4
  12. package/dist/{chunk-3ZQRACCP.js → chunk-BMKE6FT5.js} +13 -13
  13. package/dist/{chunk-NW7WSLD5.js → chunk-EHQ2M5B4.js} +1 -1
  14. package/dist/{chunk-NW7WSLD5.js.map → chunk-EHQ2M5B4.js.map} +1 -1
  15. package/dist/{chunk-AKNZJBBU.js → chunk-EUBZGAIN.js} +6 -6
  16. package/dist/{chunk-FSSZHQEJ.js → chunk-FIMCETCB.js} +2 -2
  17. package/dist/{chunk-QZFKONA3.js → chunk-GVLJUD6R.js} +1 -1
  18. package/dist/{chunk-APSIF3YK.js → chunk-IVWPPTDM.js} +1 -1
  19. package/dist/{chunk-ERKWSZ3K.js → chunk-IXFBUXQW.js} +1 -1
  20. package/dist/{chunk-P52SGBC4.js → chunk-IZZTKEZH.js} +1 -1
  21. package/dist/{chunk-ADJ4YEII.js → chunk-JI4HCLK7.js} +1 -1
  22. package/dist/{chunk-PC6QOCGI.js → chunk-KJTPUTU7.js} +2 -2
  23. package/dist/{chunk-KRN3WHHL.js → chunk-KS646CDL.js} +3 -3
  24. package/dist/{chunk-3D3C7MRI.js → chunk-MJ3MLGVB.js} +3 -3
  25. package/dist/{chunk-4A6CDBDH.js → chunk-MJLWBVZP.js} +2 -2
  26. package/dist/{chunk-Y7MDOB3N.js → chunk-MMF5RMLU.js} +1 -1
  27. package/dist/{chunk-D2FSAFMO.js → chunk-MUW3J7CP.js} +2 -2
  28. package/dist/{chunk-NFYAVT54.js → chunk-NFXLN6FJ.js} +1 -1
  29. package/dist/{chunk-XV7LPJNT.js → chunk-O4EKE3YR.js} +3 -3
  30. package/dist/{chunk-GV73HKJO.js → chunk-Q2OBTLBI.js} +8 -8
  31. package/dist/{chunk-6WT3ZRYF.js → chunk-QJ7MQIHN.js} +4 -4
  32. package/dist/{chunk-GZ4BEVMZ.js → chunk-QT5GS374.js} +1 -1
  33. package/dist/{chunk-KNSAVNMD.js → chunk-QX5Y5CE5.js} +3 -3
  34. package/dist/{chunk-ENLHVQCX.js → chunk-U6IF5D3J.js} +3 -3
  35. package/dist/{chunk-53VETVCP.js → chunk-UPRKGNBR.js} +3 -3
  36. package/dist/{chunk-UGBECBIR.js → chunk-UUCRNFMH.js} +1 -1
  37. package/dist/{chunk-7PWVUHQ2.js → chunk-W7Q3VYAB.js} +2 -2
  38. package/dist/{chunk-RE226X4F.js → chunk-WAXMRSVR.js} +1 -1
  39. package/dist/{chunk-ZLAB3Z4G.js → chunk-X3NER6FY.js} +3 -3
  40. package/dist/{chunk-BMJ5XGFR.js → chunk-XYQZLDRB.js} +1 -1
  41. package/dist/{chunk-VHZRJ7RI.js → chunk-ZM5FMRLS.js} +2 -2
  42. package/dist/{cli-Z2BNJWHT.js → cli-4KO6TA5J.js} +84 -84
  43. package/dist/commands-JSY7CGSU.js +54 -0
  44. package/dist/{config-5RS7HDIK.js → config-DQEFVW3Y.js} +4 -4
  45. package/dist/{context-XZXRRYKS.js → context-HVQCTO5R.js} +5 -5
  46. package/dist/{customCommands-6KDAODFQ.js → customCommands-XCINU5TG.js} +4 -4
  47. package/dist/{env-WIM2DQ4L.js → env-ZOPEXWMF.js} +2 -2
  48. package/dist/{gateway-DKHC7H3K.js → gateway-SUXSILQL.js} +27 -27
  49. package/dist/index.js +4 -4
  50. package/dist/{kodeAgentSessionLoad-4S452GGD.js → kodeAgentSessionLoad-HB3BYVNG.js} +4 -4
  51. package/dist/{kodeAgentSessionResume-MSMG4QUR.js → kodeAgentSessionResume-IGSZZY3G.js} +4 -4
  52. package/dist/{kodeAgentStreamJsonSession-CYG6MLKP.js → kodeAgentStreamJsonSession-4L76UC75.js} +1 -1
  53. package/dist/{kodeHooks-WX3N6CL6.js → kodeHooks-H6DMC3XX.js} +4 -4
  54. package/dist/{llm-V2W4KJIA.js → llm-OJZ6DZVC.js} +98 -34
  55. package/dist/{llm-V2W4KJIA.js.map → llm-OJZ6DZVC.js.map} +3 -3
  56. package/dist/{llmLazy-I7SO67YA.js → llmLazy-TDLZZDPL.js} +1 -1
  57. package/dist/{loader-YJGRGJNH.js → loader-MOVYZ76M.js} +4 -4
  58. package/dist/{mcp-WG3RQQCZ.js → mcp-DUYSIR5L.js} +7 -7
  59. package/dist/{mentionProcessor-PKWDUKTN.js → mentionProcessor-EKVLXJN4.js} +5 -5
  60. package/dist/{messages-RXHQ6VKL.js → messages-23ICFVMC.js} +1 -1
  61. package/dist/{model-JNWAZGT7.js → model-FUBCTRTV.js} +5 -5
  62. package/dist/{openai-6NL5UXO7.js → openai-SMYIAIO4.js} +5 -5
  63. package/dist/{outputStyles-BVPXT3MW.js → outputStyles-HBOYJFBE.js} +4 -4
  64. package/dist/{pluginRuntime-XHI3TCRJ.js → pluginRuntime-ATZMDZA7.js} +6 -6
  65. package/dist/{pluginValidation-WDFL352C.js → pluginValidation-7CGOMT6F.js} +6 -6
  66. package/dist/prompts-MFESKNYZ.js +58 -0
  67. package/dist/query-BFEFOX4S.js +58 -0
  68. package/dist/{ripgrep-BHDXRABJ.js → ripgrep-KNJBCJIQ.js} +3 -3
  69. package/dist/{sandbox-QOXESHL4.js → sandbox-P3FR4G4D.js} +4 -4
  70. package/dist/{skillMarketplace-RIAMO2YA.js → skillMarketplace-PCMKVV4O.js} +3 -3
  71. package/dist/{state-TM2XZQE2.js → state-XBYIQ7R4.js} +2 -2
  72. package/dist/{theme-BXUQNXSD.js → theme-4ZSXUILR.js} +5 -5
  73. package/dist/{thinking-BCZ4WDT6.js → thinking-TTNUZUB3.js} +6 -6
  74. package/dist/{toolPermissionContextState-ILRPUITK.js → toolPermissionContextState-R6ZGMKP6.js} +7 -7
  75. package/dist/{toolPermissionSettings-LNYZ6XFE.js → toolPermissionSettings-GMEYTJEA.js} +6 -6
  76. package/dist/tools-7FVKB7BG.js +55 -0
  77. package/dist/{userInput-I33T2RX2.js → userInput-SZEUY5J6.js} +31 -31
  78. package/package.json +2 -2
  79. package/dist/REPL-CTTH53A7.js +0 -50
  80. package/dist/chunk-BTCASL4X.js.map +0 -7
  81. package/dist/commands-3Y3OQOXT.js +0 -54
  82. package/dist/prompts-C4RUFGX2.js +0 -58
  83. package/dist/query-IA3UKMGR.js +0 -58
  84. package/dist/tools-HIPUGTF5.js +0 -55
  85. /package/dist/{REPL-CTTH53A7.js.map → REPL-DECTPCL5.js.map} +0 -0
  86. /package/dist/{acp-25PIN25O.js.map → acp-HA476EHW.js.map} +0 -0
  87. /package/dist/{agentsValidate-BXDD54YP.js.map → agentsValidate-EDPFUUMG.js.map} +0 -0
  88. /package/dist/{ask-EL4XAA5P.js.map → ask-5SP4YYRD.js.map} +0 -0
  89. /package/dist/{autoUpdater-DKMSJXWW.js.map → autoUpdater-FFMM2DR7.js.map} +0 -0
  90. /package/dist/{chunk-ALQSPHXV.js.map → chunk-2BVCVKKB.js.map} +0 -0
  91. /package/dist/{chunk-2OVXJBJV.js.map → chunk-2JCTO2EY.js.map} +0 -0
  92. /package/dist/{chunk-RF57YWGW.js.map → chunk-ARCEUG3V.js.map} +0 -0
  93. /package/dist/{chunk-7E2L7EH2.js.map → chunk-BJYXLCRS.js.map} +0 -0
  94. /package/dist/{chunk-3ZQRACCP.js.map → chunk-BMKE6FT5.js.map} +0 -0
  95. /package/dist/{chunk-AKNZJBBU.js.map → chunk-EUBZGAIN.js.map} +0 -0
  96. /package/dist/{chunk-FSSZHQEJ.js.map → chunk-FIMCETCB.js.map} +0 -0
  97. /package/dist/{chunk-QZFKONA3.js.map → chunk-GVLJUD6R.js.map} +0 -0
  98. /package/dist/{chunk-APSIF3YK.js.map → chunk-IVWPPTDM.js.map} +0 -0
  99. /package/dist/{chunk-ERKWSZ3K.js.map → chunk-IXFBUXQW.js.map} +0 -0
  100. /package/dist/{chunk-P52SGBC4.js.map → chunk-IZZTKEZH.js.map} +0 -0
  101. /package/dist/{chunk-ADJ4YEII.js.map → chunk-JI4HCLK7.js.map} +0 -0
  102. /package/dist/{chunk-PC6QOCGI.js.map → chunk-KJTPUTU7.js.map} +0 -0
  103. /package/dist/{chunk-KRN3WHHL.js.map → chunk-KS646CDL.js.map} +0 -0
  104. /package/dist/{chunk-3D3C7MRI.js.map → chunk-MJ3MLGVB.js.map} +0 -0
  105. /package/dist/{chunk-4A6CDBDH.js.map → chunk-MJLWBVZP.js.map} +0 -0
  106. /package/dist/{chunk-Y7MDOB3N.js.map → chunk-MMF5RMLU.js.map} +0 -0
  107. /package/dist/{chunk-D2FSAFMO.js.map → chunk-MUW3J7CP.js.map} +0 -0
  108. /package/dist/{chunk-NFYAVT54.js.map → chunk-NFXLN6FJ.js.map} +0 -0
  109. /package/dist/{chunk-XV7LPJNT.js.map → chunk-O4EKE3YR.js.map} +0 -0
  110. /package/dist/{chunk-GV73HKJO.js.map → chunk-Q2OBTLBI.js.map} +0 -0
  111. /package/dist/{chunk-6WT3ZRYF.js.map → chunk-QJ7MQIHN.js.map} +0 -0
  112. /package/dist/{chunk-GZ4BEVMZ.js.map → chunk-QT5GS374.js.map} +0 -0
  113. /package/dist/{chunk-KNSAVNMD.js.map → chunk-QX5Y5CE5.js.map} +0 -0
  114. /package/dist/{chunk-ENLHVQCX.js.map → chunk-U6IF5D3J.js.map} +0 -0
  115. /package/dist/{chunk-53VETVCP.js.map → chunk-UPRKGNBR.js.map} +0 -0
  116. /package/dist/{chunk-UGBECBIR.js.map → chunk-UUCRNFMH.js.map} +0 -0
  117. /package/dist/{chunk-7PWVUHQ2.js.map → chunk-W7Q3VYAB.js.map} +0 -0
  118. /package/dist/{chunk-RE226X4F.js.map → chunk-WAXMRSVR.js.map} +0 -0
  119. /package/dist/{chunk-ZLAB3Z4G.js.map → chunk-X3NER6FY.js.map} +0 -0
  120. /package/dist/{chunk-BMJ5XGFR.js.map → chunk-XYQZLDRB.js.map} +0 -0
  121. /package/dist/{chunk-VHZRJ7RI.js.map → chunk-ZM5FMRLS.js.map} +0 -0
  122. /package/dist/{cli-Z2BNJWHT.js.map → cli-4KO6TA5J.js.map} +0 -0
  123. /package/dist/{commands-3Y3OQOXT.js.map → commands-JSY7CGSU.js.map} +0 -0
  124. /package/dist/{config-5RS7HDIK.js.map → config-DQEFVW3Y.js.map} +0 -0
  125. /package/dist/{context-XZXRRYKS.js.map → context-HVQCTO5R.js.map} +0 -0
  126. /package/dist/{customCommands-6KDAODFQ.js.map → customCommands-XCINU5TG.js.map} +0 -0
  127. /package/dist/{env-WIM2DQ4L.js.map → env-ZOPEXWMF.js.map} +0 -0
  128. /package/dist/{gateway-DKHC7H3K.js.map → gateway-SUXSILQL.js.map} +0 -0
  129. /package/dist/{kodeAgentSessionLoad-4S452GGD.js.map → kodeAgentSessionLoad-HB3BYVNG.js.map} +0 -0
  130. /package/dist/{kodeAgentSessionResume-MSMG4QUR.js.map → kodeAgentSessionResume-IGSZZY3G.js.map} +0 -0
  131. /package/dist/{kodeAgentStreamJsonSession-CYG6MLKP.js.map → kodeAgentStreamJsonSession-4L76UC75.js.map} +0 -0
  132. /package/dist/{kodeHooks-WX3N6CL6.js.map → kodeHooks-H6DMC3XX.js.map} +0 -0
  133. /package/dist/{llmLazy-I7SO67YA.js.map → llmLazy-TDLZZDPL.js.map} +0 -0
  134. /package/dist/{loader-YJGRGJNH.js.map → loader-MOVYZ76M.js.map} +0 -0
  135. /package/dist/{mcp-WG3RQQCZ.js.map → mcp-DUYSIR5L.js.map} +0 -0
  136. /package/dist/{mentionProcessor-PKWDUKTN.js.map → mentionProcessor-EKVLXJN4.js.map} +0 -0
  137. /package/dist/{messages-RXHQ6VKL.js.map → messages-23ICFVMC.js.map} +0 -0
  138. /package/dist/{model-JNWAZGT7.js.map → model-FUBCTRTV.js.map} +0 -0
  139. /package/dist/{openai-6NL5UXO7.js.map → openai-SMYIAIO4.js.map} +0 -0
  140. /package/dist/{outputStyles-BVPXT3MW.js.map → outputStyles-HBOYJFBE.js.map} +0 -0
  141. /package/dist/{pluginRuntime-XHI3TCRJ.js.map → pluginRuntime-ATZMDZA7.js.map} +0 -0
  142. /package/dist/{pluginValidation-WDFL352C.js.map → pluginValidation-7CGOMT6F.js.map} +0 -0
  143. /package/dist/{prompts-C4RUFGX2.js.map → prompts-MFESKNYZ.js.map} +0 -0
  144. /package/dist/{query-IA3UKMGR.js.map → query-BFEFOX4S.js.map} +0 -0
  145. /package/dist/{ripgrep-BHDXRABJ.js.map → ripgrep-KNJBCJIQ.js.map} +0 -0
  146. /package/dist/{sandbox-QOXESHL4.js.map → sandbox-P3FR4G4D.js.map} +0 -0
  147. /package/dist/{skillMarketplace-RIAMO2YA.js.map → skillMarketplace-PCMKVV4O.js.map} +0 -0
  148. /package/dist/{state-TM2XZQE2.js.map → state-XBYIQ7R4.js.map} +0 -0
  149. /package/dist/{theme-BXUQNXSD.js.map → theme-4ZSXUILR.js.map} +0 -0
  150. /package/dist/{thinking-BCZ4WDT6.js.map → thinking-TTNUZUB3.js.map} +0 -0
  151. /package/dist/{toolPermissionContextState-ILRPUITK.js.map → toolPermissionContextState-R6ZGMKP6.js.map} +0 -0
  152. /package/dist/{toolPermissionSettings-LNYZ6XFE.js.map → toolPermissionSettings-GMEYTJEA.js.map} +0 -0
  153. /package/dist/{tools-HIPUGTF5.js.map → tools-7FVKB7BG.js.map} +0 -0
  154. /package/dist/{userInput-I33T2RX2.js.map → userInput-SZEUY5J6.js.map} +0 -0
@@ -20,23 +20,23 @@ import {
20
20
  toAbsolutePath,
21
21
  useDoublePress,
22
22
  useExitOnCtrlCD
23
- } from "./chunk-GV73HKJO.js";
23
+ } from "./chunk-Q2OBTLBI.js";
24
24
  import {
25
25
  formatValidationResult,
26
26
  validatePluginOrMarketplacePath
27
- } from "./chunk-53VETVCP.js";
27
+ } from "./chunk-UPRKGNBR.js";
28
28
  import {
29
29
  loadKodeAgentSessionMessages
30
- } from "./chunk-NFYAVT54.js";
30
+ } from "./chunk-NFXLN6FJ.js";
31
31
  import {
32
32
  listKodeAgentSessions
33
- } from "./chunk-APSIF3YK.js";
33
+ } from "./chunk-IVWPPTDM.js";
34
34
  import {
35
35
  appendSessionCustomTitleRecord,
36
36
  appendSessionJsonlFromMessage,
37
37
  appendSessionTagRecord,
38
38
  appendStateTransition
39
- } from "./chunk-PC6QOCGI.js";
39
+ } from "./chunk-KJTPUTU7.js";
40
40
  import {
41
41
  getRequestStatus,
42
42
  setRequestStatus,
@@ -44,11 +44,11 @@ import {
44
44
  } from "./chunk-XJQATPV7.js";
45
45
  import {
46
46
  getMaxThinkingTokens
47
- } from "./chunk-Y7MDOB3N.js";
47
+ } from "./chunk-MMF5RMLU.js";
48
48
  import {
49
49
  queryLLM,
50
50
  queryQuick
51
- } from "./chunk-7E2L7EH2.js";
51
+ } from "./chunk-BJYXLCRS.js";
52
52
  import {
53
53
  DEFAULT_TIMEOUT_MS,
54
54
  FallbackToolUseRejectedMessage,
@@ -62,7 +62,7 @@ import {
62
62
  listMCPServers,
63
63
  loadMergedSettings,
64
64
  normalizeSandboxRuntimeConfigFromSettings
65
- } from "./chunk-6WT3ZRYF.js";
65
+ } from "./chunk-QJ7MQIHN.js";
66
66
  import {
67
67
  addMarketplace,
68
68
  disableSkillPlugin,
@@ -75,15 +75,15 @@ import {
75
75
  refreshMarketplaceAsync,
76
76
  removeMarketplace,
77
77
  uninstallSkillPlugin
78
- } from "./chunk-P52SGBC4.js";
78
+ } from "./chunk-IZZTKEZH.js";
79
79
  import {
80
80
  applyToolPermissionContextUpdateForConversationKey,
81
81
  getToolPermissionContextForConversationKey,
82
82
  setToolPermissionContextForConversationKey
83
- } from "./chunk-UGBECBIR.js";
83
+ } from "./chunk-UUCRNFMH.js";
84
84
  import {
85
85
  persistToolPermissionUpdateToDisk
86
- } from "./chunk-ZLAB3Z4G.js";
86
+ } from "./chunk-X3NER6FY.js";
87
87
  import {
88
88
  applyToolPermissionContextUpdate,
89
89
  createDefaultToolPermissionContext
@@ -96,7 +96,7 @@ import {
96
96
  resetReminderSession,
97
97
  setTodos,
98
98
  systemReminderService
99
- } from "./chunk-FSSZHQEJ.js";
99
+ } from "./chunk-FIMCETCB.js";
100
100
  import {
101
101
  getSessionState
102
102
  } from "./chunk-TY3CCSAT.js";
@@ -105,7 +105,7 @@ import {
105
105
  getActiveAgents,
106
106
  getAgentByType,
107
107
  getAllAgents
108
- } from "./chunk-VHZRJ7RI.js";
108
+ } from "./chunk-ZM5FMRLS.js";
109
109
  import {
110
110
  API_ERROR_MESSAGE_PREFIX,
111
111
  CANCEL_MESSAGE,
@@ -136,18 +136,18 @@ import {
136
136
  processUserInput,
137
137
  reorderMessages,
138
138
  stripSystemMessages
139
- } from "./chunk-ERKWSZ3K.js";
139
+ } from "./chunk-IXFBUXQW.js";
140
140
  import {
141
141
  listAllContentFiles,
142
142
  ripGrep
143
- } from "./chunk-RE226X4F.js";
143
+ } from "./chunk-WAXMRSVR.js";
144
144
  import {
145
145
  canExecuteInSandbox,
146
146
  executeSkillInSandbox,
147
147
  getSandboxPool,
148
148
  init_sandbox,
149
149
  sandbox_exports
150
- } from "./chunk-4A6CDBDH.js";
150
+ } from "./chunk-MJLWBVZP.js";
151
151
  import {
152
152
  drainHookSystemPromptAdditions,
153
153
  getHookTranscriptPath,
@@ -159,7 +159,7 @@ import {
159
159
  runStopHooks,
160
160
  runUserPromptSubmitHooks,
161
161
  updateHookTranscriptForMessages
162
- } from "./chunk-KRN3WHHL.js";
162
+ } from "./chunk-KS646CDL.js";
163
163
  import {
164
164
  getKodeAgentSessionId,
165
165
  setKodeAgentSessionId
@@ -172,11 +172,11 @@ import {
172
172
  getOutputStyleSystemPromptAdditions,
173
173
  resolveOutputStyleName,
174
174
  setCurrentOutputStyle
175
- } from "./chunk-7PWVUHQ2.js";
175
+ } from "./chunk-W7Q3VYAB.js";
176
176
  import {
177
177
  getSettingsFileCandidates,
178
178
  loadSettingsWithLegacyFallback
179
- } from "./chunk-ADJ4YEII.js";
179
+ } from "./chunk-JI4HCLK7.js";
180
180
  import {
181
181
  getIdentity,
182
182
  getIdentityPrompt
@@ -186,7 +186,7 @@ import {
186
186
  hasCustomCommands,
187
187
  loadCustomCommands,
188
188
  reloadCustomCommands
189
- } from "./chunk-2OVXJBJV.js";
189
+ } from "./chunk-2JCTO2EY.js";
190
190
  import {
191
191
  getSessionPlugins
192
192
  } from "./chunk-2UO3BFZH.js";
@@ -200,17 +200,16 @@ import {
200
200
  init_model,
201
201
  isDefaultSlowAndCapableModel,
202
202
  model_exports
203
- } from "./chunk-KNSAVNMD.js";
203
+ } from "./chunk-QX5Y5CE5.js";
204
204
  import {
205
205
  getCodeStyle,
206
206
  getContext,
207
207
  getGitState,
208
- getIsGit,
209
- getProjectDocs
210
- } from "./chunk-3D3C7MRI.js";
208
+ getIsGit
209
+ } from "./chunk-MJ3MLGVB.js";
211
210
  import {
212
211
  getTheme
213
- } from "./chunk-QZFKONA3.js";
212
+ } from "./chunk-GVLJUD6R.js";
214
213
  import {
215
214
  config_exports,
216
215
  enableConfigs,
@@ -226,7 +225,7 @@ import {
226
225
  saveCurrentProjectConfig,
227
226
  saveGlobalConfig,
228
227
  setModelPointer
229
- } from "./chunk-ENLHVQCX.js";
228
+ } from "./chunk-U6IF5D3J.js";
230
229
  import {
231
230
  AbortError,
232
231
  init_errors
@@ -237,7 +236,7 @@ import {
237
236
  init_debugLogger,
238
237
  logUserFriendly,
239
238
  markPhase
240
- } from "./chunk-GZ4BEVMZ.js";
239
+ } from "./chunk-QT5GS374.js";
241
240
  import {
242
241
  BunShell,
243
242
  CACHE_PATHS,
@@ -276,7 +275,7 @@ import {
276
275
  renderBashNotification,
277
276
  setActivePlanConversationKey,
278
277
  setCwd
279
- } from "./chunk-BMJ5XGFR.js";
278
+ } from "./chunk-XYQZLDRB.js";
280
279
  import {
281
280
  ASCII_LOGO,
282
281
  GITHUB_ISSUES_REPO_URL,
@@ -288,7 +287,7 @@ import {
288
287
  import {
289
288
  MACRO,
290
289
  init_macros
291
- } from "./chunk-NW7WSLD5.js";
290
+ } from "./chunk-EHQ2M5B4.js";
292
291
  import {
293
292
  formatTotalCost,
294
293
  getTotalAPIDuration,
@@ -486,7 +485,7 @@ var getCommandSubcommandPrefix = memoize(
486
485
  var getCommandPrefix = memoize(
487
486
  async (command4, abortSignal) => {
488
487
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
489
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-V2W4KJIA.js");
488
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-OJZ6DZVC.js");
490
489
  const response = await queryQuick2({
491
490
  systemPrompt,
492
491
  userPrompt,
@@ -4569,7 +4568,7 @@ function formatParseError(error) {
4569
4568
  return error instanceof Error ? error.message : String(error);
4570
4569
  }
4571
4570
  async function defaultGateQuery(args) {
4572
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-V2W4KJIA.js");
4571
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-OJZ6DZVC.js");
4573
4572
  const messages = [
4574
4573
  {
4575
4574
  type: "user",
@@ -9682,7 +9681,7 @@ async function createAndStoreApiKey(accessToken) {
9682
9681
  }
9683
9682
  saveGlobalConfig(config2);
9684
9683
  try {
9685
- const { resetAnthropicClient } = await import("./llm-V2W4KJIA.js");
9684
+ const { resetAnthropicClient } = await import("./llm-OJZ6DZVC.js");
9686
9685
  resetAnthropicClient();
9687
9686
  } catch {
9688
9687
  }
@@ -10169,7 +10168,7 @@ async function refreshPluginRuntimeFromInstalls() {
10169
10168
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
10170
10169
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
10171
10170
  if (dirs.length === 0) return [];
10172
- const { configureSessionPlugins } = await import("./pluginRuntime-XHI3TCRJ.js");
10171
+ const { configureSessionPlugins } = await import("./pluginRuntime-ATZMDZA7.js");
10173
10172
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
10174
10173
  return errors;
10175
10174
  }
@@ -10843,7 +10842,7 @@ async function call(onDone, context) {
10843
10842
  ModelConfig,
10844
10843
  {
10845
10844
  onClose: () => {
10846
- import("./model-JNWAZGT7.js").then(({ reloadModelManager: reloadModelManager2 }) => {
10845
+ import("./model-FUBCTRTV.js").then(({ reloadModelManager: reloadModelManager2 }) => {
10847
10846
  reloadModelManager2();
10848
10847
  triggerModelConfigChange();
10849
10848
  onDone();
@@ -14023,8 +14022,7 @@ ${availableSkills}${truncatedNotice}
14023
14022
  };
14024
14023
  }
14025
14024
  const skillName = raw.startsWith("/") ? raw.slice(1) : raw;
14026
- const ctxCommands = context?.options?.commands;
14027
- const commands = ctxCommands?.length ? ctxCommands : await getCommands();
14025
+ const commands = await loadCustomCommands();
14028
14026
  const cmd = findCommand(skillName, commands);
14029
14027
  if (!cmd) {
14030
14028
  return {
@@ -14052,8 +14050,7 @@ ${availableSkills}${truncatedNotice}
14052
14050
  async *call({ skill, args }, context) {
14053
14051
  const raw = skill.trim();
14054
14052
  const skillName = raw.startsWith("/") ? raw.slice(1) : raw;
14055
- const ctxCommands = context.options?.commands;
14056
- const commands = ctxCommands?.length ? ctxCommands : await getCommands();
14053
+ const commands = await loadCustomCommands();
14057
14054
  const cmd = findCommand(skillName, commands);
14058
14055
  if (!cmd) {
14059
14056
  throw new Error(`Unknown skill: ${skillName}`);
@@ -18217,7 +18214,7 @@ function useStatusLine() {
18217
18214
  // src/ui/components/PromptInput.tsx
18218
18215
  async function interpretHashCommand(input) {
18219
18216
  try {
18220
- const { queryQuick: queryQuick2 } = await import("./llm-V2W4KJIA.js");
18217
+ const { queryQuick: queryQuick2 } = await import("./llm-OJZ6DZVC.js");
18221
18218
  const systemPrompt = [
18222
18219
  "You're helping the user structure notes that will be added to their KODING.md file.",
18223
18220
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -18529,7 +18526,7 @@ function PromptInput({
18529
18526
  if (messages2.length) {
18530
18527
  if (mode === "bash") {
18531
18528
  onQuery(messages2, newAbortController).then(async () => {
18532
- const { getCwd: getCwd2 } = await import("./state-TM2XZQE2.js");
18529
+ const { getCwd: getCwd2 } = await import("./state-XBYIQ7R4.js");
18533
18530
  setCurrentPwd(getCwd2());
18534
18531
  });
18535
18532
  } else {
@@ -19084,72 +19081,6 @@ async function logBinaryFeedbackEvent(_m1, _m2, _choice) {
19084
19081
 
19085
19082
  // src/services/system/systemPrompt.ts
19086
19083
  init_model();
19087
-
19088
- // src/services/context/kodeContext.ts
19089
- init_debugLogger();
19090
- init_log();
19091
- var KodeContextManager = class _KodeContextManager {
19092
- static instance;
19093
- projectDocsCache = "";
19094
- cacheInitialized = false;
19095
- initPromise = null;
19096
- static getInstance() {
19097
- if (!_KodeContextManager.instance) {
19098
- _KodeContextManager.instance = new _KodeContextManager();
19099
- }
19100
- return _KodeContextManager.instance;
19101
- }
19102
- async initialize() {
19103
- if (this.initPromise) return this.initPromise;
19104
- this.initPromise = (async () => {
19105
- try {
19106
- const projectDocs = await getProjectDocs();
19107
- this.projectDocsCache = projectDocs || "";
19108
- this.cacheInitialized = true;
19109
- } catch (error) {
19110
- logError(error);
19111
- debug.warn("NEWCRAW_CONTEXT_LOAD_FAILED", {
19112
- error: error instanceof Error ? error.message : String(error)
19113
- });
19114
- this.projectDocsCache = "";
19115
- this.cacheInitialized = true;
19116
- }
19117
- })();
19118
- return this.initPromise;
19119
- }
19120
- getKodeContext() {
19121
- if (!this.cacheInitialized) {
19122
- this.initialize().catch((error) => {
19123
- logError(error);
19124
- debug.warn("NEWCRAW_CONTEXT_LOAD_FAILED", {
19125
- error: error instanceof Error ? error.message : String(error)
19126
- });
19127
- });
19128
- return "";
19129
- }
19130
- return this.projectDocsCache;
19131
- }
19132
- async refreshCache() {
19133
- this.cacheInitialized = false;
19134
- this.initPromise = null;
19135
- await this.initialize();
19136
- }
19137
- };
19138
- var kodeContextManager = KodeContextManager.getInstance();
19139
- var generateKodeContext = () => {
19140
- return kodeContextManager.getKodeContext();
19141
- };
19142
- var refreshKodeContext = async () => {
19143
- await kodeContextManager.refreshCache();
19144
- };
19145
- if (process.env.NODE_ENV !== "test") {
19146
- setTimeout(() => {
19147
- refreshKodeContext().catch(() => {
19148
- });
19149
- }, 0);
19150
- }
19151
-
19152
- // src/services/system/systemPrompt.ts
19153
19084
  function isGPT5Model(modelName) {
19154
19085
  return modelName.startsWith("gpt-5");
19155
19086
  }
@@ -19174,29 +19105,18 @@ function formatSystemPromptWithContext(systemPrompt, context, agentId, skipConte
19174
19105
  const hasContext = Object.entries(context).length > 0;
19175
19106
  if (hasContext) {
19176
19107
  if (!skipContextReminders) {
19177
- const kodeContext = generateKodeContext();
19178
- if (kodeContext) {
19179
- enhancedPrompt.push("\n---\n# \u9879\u76EE\u4E0A\u4E0B\u6587\n");
19180
- enhancedPrompt.push(kodeContext);
19181
- enhancedPrompt.push("\n---\n");
19108
+ const reminderMessages = generateSystemReminders(hasContext, agentId);
19109
+ if (reminderMessages.length > 0) {
19110
+ reminders = reminderMessages.map((r) => r.content).join("\n") + "\n";
19182
19111
  }
19183
19112
  }
19184
- const reminderMessages = generateSystemReminders(hasContext, agentId);
19185
- if (reminderMessages.length > 0) {
19186
- reminders = reminderMessages.map((r) => r.content).join("\n") + "\n";
19187
- }
19188
19113
  enhancedPrompt.push(
19189
19114
  `
19190
19115
  As you answer the user's questions, you can use the following context:
19191
19116
  `
19192
19117
  );
19193
- const filteredContext = Object.fromEntries(
19194
- Object.entries(context).filter(
19195
- ([key]) => key !== "projectDocs" && key !== "userDocs"
19196
- )
19197
- );
19198
19118
  enhancedPrompt.push(
19199
- ...Object.entries(filteredContext).map(
19119
+ ...Object.entries(context).map(
19200
19120
  ([key, value]) => `<context name="${key}">${value}</context>`
19201
19121
  )
19202
19122
  );
@@ -19563,11 +19483,13 @@ function shouldReflect(ctx) {
19563
19483
  const cfg = getReasoningConfig();
19564
19484
  if (!cfg.reflectionEnabled) return "none";
19565
19485
  if (ctx.iteration <= 1) return "none";
19486
+ const lastCall = ctx.recentToolCalls[ctx.recentToolCalls.length - 1];
19487
+ const lastCallSucceeded = lastCall && !lastCall.hadError;
19566
19488
  const recentErrors = ctx.recentToolCalls.filter((t) => t.hadError).length;
19567
19489
  if (ctx.iteration >= cfg.deepReflectionThreshold) return "deep";
19568
- if (recentErrors >= cfg.errorStreakThreshold) return "standard";
19490
+ if (recentErrors >= cfg.errorStreakThreshold && !lastCallSucceeded) return "standard";
19569
19491
  if (ctx.loopWarning) return "standard";
19570
- if (hasRepeatedToolPattern(ctx.recentToolCalls)) return "standard";
19492
+ if (hasRepeatedToolPattern(ctx.recentToolCalls) && !lastCallSucceeded) return "standard";
19571
19493
  if (ctx.iteration % cfg.reflectionInterval === 0) return "light";
19572
19494
  return "none";
19573
19495
  }
@@ -19590,29 +19512,29 @@ function buildReflectionPrompt(level, ctx) {
19590
19512
  const recentErrors = ctx.recentToolCalls.filter((t) => t.hadError);
19591
19513
  const hasErrors = recentErrors.length > 0;
19592
19514
  if (level === "light") {
19593
- return `[REFLECTION \u2014 iteration ${ctx.iteration}] Pause and assess: Are your recent actions (${recentToolNames}) making progress toward the user's goal? If not, consider changing your approach before continuing.`;
19515
+ return `[\u53CD\u601D \u2014 \u7B2C ${ctx.iteration} \u8F6E] \u6682\u505C\u8BC4\u4F30\uFF1A\u4F60\u6700\u8FD1\u7684\u64CD\u4F5C\uFF08${recentToolNames}\uFF09\u662F\u5426\u5728\u671D\u7528\u6237\u76EE\u6807\u63A8\u8FDB\uFF1F\u5982\u679C\u6CA1\u6709\uFF0C\u8BF7\u5728\u7EE7\u7EED\u4E4B\u524D\u8C03\u6574\u65B9\u6CD5\u3002`;
19594
19516
  }
19595
19517
  const parts = [
19596
- `[REFLECTION \u2014 iteration ${ctx.iteration}, ${ctx.totalToolCalls} tool calls, ${ctx.totalErrors} errors]`
19518
+ `[\u53CD\u601D \u2014 \u7B2C ${ctx.iteration} \u8F6E\uFF0C\u5171 ${ctx.totalToolCalls} \u6B21\u5DE5\u5177\u8C03\u7528\uFF0C${ctx.totalErrors} \u4E2A\u9519\u8BEF]`
19597
19519
  ];
19598
19520
  if (hasErrors) {
19599
19521
  const errorTools = recentErrors.map((t) => t.name).join(", ");
19600
19522
  parts.push(
19601
- `Recent tool calls (${errorTools}) returned errors. Before retrying, analyze WHY they failed. Consider: wrong file path? missing dependency? incorrect syntax? Try a DIFFERENT approach rather than repeating the same action.`
19523
+ `\u6700\u8FD1\u7684\u5DE5\u5177\u8C03\u7528\uFF08${errorTools}\uFF09\u8FD4\u56DE\u4E86\u9519\u8BEF\u3002\u5728\u91CD\u8BD5\u4E4B\u524D\uFF0C\u8BF7\u5206\u6790\u5931\u8D25\u539F\u56E0\uFF1A\u6587\u4EF6\u8DEF\u5F84\u9519\u8BEF\uFF1F\u7F3A\u5C11\u4F9D\u8D56\uFF1F\u8BED\u6CD5\u4E0D\u6B63\u786E\uFF1F\u8BF7\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\uFF0C\u800C\u4E0D\u662F\u91CD\u590D\u76F8\u540C\u7684\u64CD\u4F5C\u3002`
19602
19524
  );
19603
19525
  }
19604
19526
  if (ctx.loopWarning) {
19605
19527
  parts.push(
19606
- `WARNING: You appear to be in a ${ctx.loopWarning.pattern} loop with (${ctx.loopWarning.toolNames}). You MUST break this pattern. Consider: (1) using a completely different tool, (2) stepping back to re-read the relevant code, (3) asking the user for clarification.`
19528
+ `\u8B66\u544A\uFF1A\u4F60\u4F3C\u4E4E\u9677\u5165\u4E86 ${ctx.loopWarning.pattern} \u5FAA\u73AF\uFF08${ctx.loopWarning.toolNames}\uFF09\u3002\u4F60\u5FC5\u987B\u6253\u7834\u8FD9\u4E2A\u6A21\u5F0F\u3002\u8BF7\u8003\u8651\uFF1A(1) \u4F7F\u7528\u5B8C\u5168\u4E0D\u540C\u7684\u5DE5\u5177\uFF0C(2) \u9000\u4E00\u6B65\u91CD\u65B0\u9605\u8BFB\u76F8\u5173\u4EE3\u7801\uFF0C(3) \u5411\u7528\u6237\u8BF7\u6C42\u6F84\u6E05\u3002`
19607
19529
  );
19608
19530
  }
19609
19531
  if (level === "deep") {
19610
19532
  parts.push(
19611
- `This task has taken ${ctx.iteration} iterations (${Math.round(ctx.elapsedMs / 1e3)}s). Perform a thorough self-assessment: (1) What was the original goal? (2) What have you accomplished so far? (3) What is blocking progress? (4) Should you simplify your approach or ask the user for help?`
19533
+ `\u6B64\u4EFB\u52A1\u5DF2\u7ECF\u6267\u884C\u4E86 ${ctx.iteration} \u8F6E\uFF08${Math.round(ctx.elapsedMs / 1e3)} \u79D2\uFF09\u3002\u8BF7\u8FDB\u884C\u6DF1\u5EA6\u81EA\u6211\u8BC4\u4F30\uFF1A(1) \u6700\u521D\u7684\u76EE\u6807\u662F\u4EC0\u4E48\uFF1F(2) \u5230\u76EE\u524D\u4E3A\u6B62\u5B8C\u6210\u4E86\u4EC0\u4E48\uFF1F(3) \u662F\u4EC0\u4E48\u963B\u788D\u4E86\u8FDB\u5C55\uFF1F(4) \u662F\u5426\u5E94\u8BE5\u7B80\u5316\u65B9\u6CD5\u6216\u5411\u7528\u6237\u6C42\u52A9\uFF1F`
19612
19534
  );
19613
19535
  } else {
19614
19536
  parts.push(
19615
- `Assess your progress: Are your recent actions moving toward the goal? If you've been struggling, consider stepping back and trying a fundamentally different approach.`
19537
+ `\u8BC4\u4F30\u4F60\u7684\u8FDB\u5C55\uFF1A\u6700\u8FD1\u7684\u64CD\u4F5C\u662F\u5426\u5728\u671D\u76EE\u6807\u63A8\u8FDB\uFF1F\u5982\u679C\u4E0A\u4E00\u6B21\u65B9\u6CD5\u4E0D\u594F\u6548\uFF0C\u8BF7\u8C03\u6574\u7B56\u7565\uFF08\u4F8B\u5982\uFF1A\u5148\u5217\u51FA\u76EE\u5F55\u518D\u8BFB\u53D6\u6587\u4EF6\u3001\u5C1D\u8BD5\u4E0D\u540C\u7684\u641C\u7D22\u5173\u952E\u8BCD\uFF09\u5E76\u7EE7\u7EED\u5DE5\u4F5C\u3002\u9664\u975E\u786E\u5B9E\u65E0\u6CD5\u7EE7\u7EED\uFF0C\u5426\u5219\u4E0D\u8981\u505C\u6B62\u6216\u8BE2\u95EE\u7528\u6237\u3002`
19616
19538
  );
19617
19539
  }
19618
19540
  return parts.join(" ");
@@ -19736,18 +19658,18 @@ function shouldActivatePlanning(ctx) {
19736
19658
  }
19737
19659
  function buildPlanningPrompt(userPrompt, complexity) {
19738
19660
  if (complexity === "complex") {
19739
- return `[PLANNING REQUIRED] This is a complex task. Before taking any action, you MUST first create a structured plan:
19740
- 1. Break the task into numbered steps
19741
- 2. Identify which files need to be read/modified
19742
- 3. Determine the correct execution order (dependencies between steps)
19743
- 4. Identify potential risks or edge cases
19744
- Use the TodoWrite tool to record your plan, then execute it step by step.
19745
- Do NOT skip the planning phase \u2014 jumping straight into code changes on complex tasks leads to errors and wasted iterations.`;
19746
- }
19747
- return `[PLANNING SUGGESTED] This task involves multiple steps. Consider briefly planning your approach:
19748
- 1. What files need to be examined or modified?
19749
- 2. What is the logical order of changes?
19750
- Use TodoWrite to track your plan if the task has 3+ steps.`;
19661
+ return `[\u9700\u8981\u89C4\u5212] \u8FD9\u662F\u4E00\u4E2A\u590D\u6742\u4EFB\u52A1\u3002\u5728\u6267\u884C\u4EFB\u4F55\u64CD\u4F5C\u4E4B\u524D\uFF0C\u4F60\u5FC5\u987B\u5148\u5236\u5B9A\u7ED3\u6784\u5316\u8BA1\u5212\uFF1A
19662
+ 1. \u5C06\u4EFB\u52A1\u5206\u89E3\u4E3A\u7F16\u53F7\u6B65\u9AA4
19663
+ 2. \u786E\u5B9A\u9700\u8981\u8BFB\u53D6/\u4FEE\u6539\u54EA\u4E9B\u6587\u4EF6
19664
+ 3. \u786E\u5B9A\u6B63\u786E\u7684\u6267\u884C\u987A\u5E8F\uFF08\u6B65\u9AA4\u4E4B\u95F4\u7684\u4F9D\u8D56\u5173\u7CFB\uFF09
19665
+ 4. \u8BC6\u522B\u6F5C\u5728\u7684\u98CE\u9669\u6216\u8FB9\u754C\u60C5\u51B5
19666
+ \u4F7F\u7528 TodoWrite \u5DE5\u5177\u8BB0\u5F55\u4F60\u7684\u8BA1\u5212\uFF0C\u7136\u540E\u9010\u6B65\u6267\u884C\u3002
19667
+ \u4E0D\u8981\u8DF3\u8FC7\u89C4\u5212\u9636\u6BB5\u2014\u2014\u5BF9\u590D\u6742\u4EFB\u52A1\u76F4\u63A5\u52A8\u624B\u6539\u4EE3\u7801\u4F1A\u5BFC\u81F4\u9519\u8BEF\u548C\u6D6A\u8D39\u3002`;
19668
+ }
19669
+ return `[\u5EFA\u8BAE\u89C4\u5212] \u8FD9\u4E2A\u4EFB\u52A1\u6D89\u53CA\u591A\u4E2A\u6B65\u9AA4\u3002\u5EFA\u8BAE\u7B80\u8981\u89C4\u5212\u4F60\u7684\u65B9\u6CD5\uFF1A
19670
+ 1. \u9700\u8981\u68C0\u67E5\u6216\u4FEE\u6539\u54EA\u4E9B\u6587\u4EF6\uFF1F
19671
+ 2. \u66F4\u6539\u7684\u903B\u8F91\u987A\u5E8F\u662F\u4EC0\u4E48\uFF1F
19672
+ \u5982\u679C\u4EFB\u52A1\u6709 3 \u4E2A\u4EE5\u4E0A\u6B65\u9AA4\uFF0C\u8BF7\u4F7F\u7528 TodoWrite \u8DDF\u8E2A\u4F60\u7684\u8BA1\u5212\u3002`;
19751
19673
  }
19752
19674
  function shouldReplan(ctx) {
19753
19675
  const cfg = getReasoningConfig();
@@ -19759,15 +19681,15 @@ function shouldReplan(ctx) {
19759
19681
  function buildReplanPrompt(ctx) {
19760
19682
  const cfg = getReasoningConfig();
19761
19683
  const parts = [
19762
- `[PROGRESS CHECK \u2014 iteration ${ctx.iteration}]`
19684
+ `[\u8FDB\u5EA6\u68C0\u67E5 \u2014 \u7B2C ${ctx.iteration} \u8F6E]`
19763
19685
  ];
19764
19686
  if (ctx.totalErrors >= cfg.backtrackErrorThreshold) {
19765
19687
  parts.push(
19766
- `You have encountered ${ctx.totalErrors} errors so far. Consider whether your current approach is viable or if you need to fundamentally change strategy.`
19688
+ `\u5230\u76EE\u524D\u4E3A\u6B62\u4F60\u5DF2\u7ECF\u9047\u5230\u4E86 ${ctx.totalErrors} \u4E2A\u9519\u8BEF\u3002\u8BF7\u8003\u8651\u5F53\u524D\u65B9\u6CD5\u662F\u5426\u53EF\u884C\uFF0C\u8FD8\u662F\u9700\u8981\u4ECE\u6839\u672C\u4E0A\u6539\u53D8\u7B56\u7565\u3002`
19767
19689
  );
19768
19690
  }
19769
19691
  parts.push(
19770
- `Review your TodoWrite list: (1) Which tasks are completed? Mark them done. (2) Which tasks are still pending? Are they still relevant? (3) Do you need to add new tasks based on what you've learned? (4) Is the overall approach still sound, or should you pivot?`
19692
+ `\u68C0\u67E5\u4F60\u7684 TodoWrite \u5217\u8868\uFF1A(1) \u54EA\u4E9B\u4EFB\u52A1\u5DF2\u5B8C\u6210\uFF1F\u5C06\u5B83\u4EEC\u6807\u8BB0\u4E3A\u5DF2\u5B8C\u6210\u3002(2) \u54EA\u4E9B\u4EFB\u52A1\u4ECD\u5728\u8FDB\u884C\u4E2D\uFF1F\u5B83\u4EEC\u662F\u5426\u4ECD\u7136\u76F8\u5173\uFF1F(3) \u662F\u5426\u9700\u8981\u6839\u636E\u5DF2\u4E86\u89E3\u5230\u7684\u4FE1\u606F\u6DFB\u52A0\u65B0\u4EFB\u52A1\uFF1F(4) \u6574\u4F53\u65B9\u6CD5\u662F\u5426\u4ECD\u7136\u5408\u7406\uFF0C\u8FD8\u662F\u9700\u8981\u8C03\u6574\u65B9\u5411\uFF1F`
19771
19693
  );
19772
19694
  return parts.join(" ");
19773
19695
  }
@@ -19778,7 +19700,7 @@ var KNOWN_PATTERNS = [
19778
19700
  tools: ["Read"],
19779
19701
  pattern: "identical",
19780
19702
  strategy: {
19781
- suggestion: "You are re-reading the same file with identical arguments. The content has not changed. Instead: (1) Use Grep to search for specific content within the file, (2) Proceed with the information you already have, or (3) Read a DIFFERENT file that might contain the answer.",
19703
+ suggestion: "\u4F60\u6B63\u5728\u7528\u76F8\u540C\u7684\u53C2\u6570\u91CD\u590D\u8BFB\u53D6\u540C\u4E00\u4E2A\u6587\u4EF6\uFF0C\u5185\u5BB9\u4E0D\u4F1A\u6539\u53D8\u3002\u8BF7\u6539\u4E3A\uFF1A(1) \u4F7F\u7528 Grep \u641C\u7D22\u6587\u4EF6\u4E2D\u7684\u7279\u5B9A\u5185\u5BB9\uFF0C(2) \u76F4\u63A5\u4F7F\u7528\u4F60\u5DF2\u6709\u7684\u4FE1\u606F\u7EE7\u7EED\u5DE5\u4F5C\uFF0C\u6216 (3) \u8BFB\u53D6\u53E6\u4E00\u4E2A\u53EF\u80FD\u5305\u542B\u7B54\u6848\u7684\u6587\u4EF6\u3002",
19782
19704
  severity: "warning"
19783
19705
  }
19784
19706
  },
@@ -19786,7 +19708,7 @@ var KNOWN_PATTERNS = [
19786
19708
  tools: ["Edit", "MultiEdit"],
19787
19709
  pattern: "identical",
19788
19710
  strategy: {
19789
- suggestion: "You are repeating the same edit. This usually means the edit is not being applied correctly. Try: (1) Read the file first to see its current state, (2) Verify your old_string matches exactly (check whitespace and indentation), (3) Use Write to replace the entire file if surgical edits keep failing.",
19711
+ suggestion: "\u4F60\u6B63\u5728\u91CD\u590D\u76F8\u540C\u7684\u7F16\u8F91\u64CD\u4F5C\uFF0C\u8FD9\u901A\u5E38\u610F\u5473\u7740\u7F16\u8F91\u6CA1\u6709\u6B63\u786E\u751F\u6548\u3002\u8BF7\u5C1D\u8BD5\uFF1A(1) \u5148\u8BFB\u53D6\u6587\u4EF6\u67E5\u770B\u5F53\u524D\u72B6\u6001\uFF0C(2) \u786E\u8BA4 old_string \u5B8C\u5168\u5339\u914D\uFF08\u68C0\u67E5\u7A7A\u683C\u548C\u7F29\u8FDB\uFF09\uFF0C(3) \u5982\u679C\u7CBE\u786E\u7F16\u8F91\u6301\u7EED\u5931\u8D25\uFF0C\u4F7F\u7528 Write \u66FF\u6362\u6574\u4E2A\u6587\u4EF6\u5185\u5BB9\u3002",
19790
19712
  severity: "warning"
19791
19713
  }
19792
19714
  },
@@ -19794,7 +19716,7 @@ var KNOWN_PATTERNS = [
19794
19716
  tools: ["Bash"],
19795
19717
  pattern: "identical",
19796
19718
  strategy: {
19797
- suggestion: "You are running the same command repeatedly. If it failed before, it will likely fail again. Try: (1) Check the error output carefully, (2) Install missing dependencies, (3) Fix the underlying issue before re-running, (4) Try an alternative command or approach.",
19719
+ suggestion: "\u4F60\u6B63\u5728\u91CD\u590D\u6267\u884C\u76F8\u540C\u7684\u547D\u4EE4\u3002\u5982\u679C\u4E4B\u524D\u5931\u8D25\u4E86\uFF0C\u518D\u6B21\u6267\u884C\u5F88\u53EF\u80FD\u8FD8\u4F1A\u5931\u8D25\u3002\u8BF7\u5C1D\u8BD5\uFF1A(1) \u4ED4\u7EC6\u68C0\u67E5\u9519\u8BEF\u8F93\u51FA\uFF0C(2) \u5B89\u88C5\u7F3A\u5931\u7684\u4F9D\u8D56\uFF0C(3) \u5148\u4FEE\u590D\u6839\u672C\u95EE\u9898\u518D\u91CD\u65B0\u6267\u884C\uFF0C(4) \u5C1D\u8BD5\u66FF\u4EE3\u7684\u547D\u4EE4\u6216\u65B9\u6CD5\u3002",
19798
19720
  severity: "warning"
19799
19721
  }
19800
19722
  },
@@ -19802,7 +19724,7 @@ var KNOWN_PATTERNS = [
19802
19724
  tools: ["Grep"],
19803
19725
  pattern: "identical",
19804
19726
  strategy: {
19805
- suggestion: "You are searching for the same pattern repeatedly. The results will not change. Try: (1) Broaden your search pattern, (2) Search in a different directory, (3) Use Glob to find files by name instead, (4) Ask the user where the relevant code is located.",
19727
+ suggestion: "\u4F60\u6B63\u5728\u91CD\u590D\u641C\u7D22\u76F8\u540C\u7684\u6A21\u5F0F\uFF0C\u7ED3\u679C\u4E0D\u4F1A\u6539\u53D8\u3002\u8BF7\u5C1D\u8BD5\uFF1A(1) \u6269\u5927\u641C\u7D22\u8303\u56F4\uFF0C(2) \u5728\u4E0D\u540C\u7684\u76EE\u5F55\u4E2D\u641C\u7D22\uFF0C(3) \u4F7F\u7528 Glob \u6309\u6587\u4EF6\u540D\u67E5\u627E\uFF0C(4) \u8BE2\u95EE\u7528\u6237\u76F8\u5173\u4EE3\u7801\u7684\u4F4D\u7F6E\u3002",
19806
19728
  severity: "warning"
19807
19729
  }
19808
19730
  },
@@ -19810,7 +19732,7 @@ var KNOWN_PATTERNS = [
19810
19732
  tools: ["Read", "Edit"],
19811
19733
  pattern: "cycle",
19812
19734
  strategy: {
19813
- suggestion: "You are stuck in a Read\u2192Edit loop. This often means your edits are not having the expected effect. Break this cycle: (1) Read the file once and carefully plan ALL changes, (2) Use MultiEdit to apply all changes at once, (3) Verify your old_string matches the current file content exactly.",
19735
+ suggestion: "\u4F60\u9677\u5165\u4E86 Read\u2192Edit \u5FAA\u73AF\uFF0C\u8FD9\u901A\u5E38\u610F\u5473\u7740\u7F16\u8F91\u6CA1\u6709\u8FBE\u5230\u9884\u671F\u6548\u679C\u3002\u8BF7\u6253\u7834\u5FAA\u73AF\uFF1A(1) \u8BFB\u53D6\u6587\u4EF6\u4E00\u6B21\u5E76\u4ED4\u7EC6\u89C4\u5212\u6240\u6709\u66F4\u6539\uFF0C(2) \u4F7F\u7528 MultiEdit \u4E00\u6B21\u6027\u5E94\u7528\u6240\u6709\u66F4\u6539\uFF0C(3) \u786E\u8BA4 old_string \u4E0E\u5F53\u524D\u6587\u4EF6\u5185\u5BB9\u5B8C\u5168\u5339\u914D\u3002",
19814
19736
  severity: "warning"
19815
19737
  }
19816
19738
  },
@@ -19818,7 +19740,7 @@ var KNOWN_PATTERNS = [
19818
19740
  tools: ["Edit", "Read"],
19819
19741
  pattern: "cycle",
19820
19742
  strategy: {
19821
- suggestion: "You are stuck in a Edit\u2192Read loop. This often means your edits are not having the expected effect. Break this cycle: (1) Read the file once and carefully plan ALL changes, (2) Use MultiEdit to apply all changes at once, (3) Verify your old_string matches the current file content exactly.",
19743
+ suggestion: "\u4F60\u9677\u5165\u4E86 Edit\u2192Read \u5FAA\u73AF\uFF0C\u8FD9\u901A\u5E38\u610F\u5473\u7740\u7F16\u8F91\u6CA1\u6709\u8FBE\u5230\u9884\u671F\u6548\u679C\u3002\u8BF7\u6253\u7834\u5FAA\u73AF\uFF1A(1) \u8BFB\u53D6\u6587\u4EF6\u4E00\u6B21\u5E76\u4ED4\u7EC6\u89C4\u5212\u6240\u6709\u66F4\u6539\uFF0C(2) \u4F7F\u7528 MultiEdit \u4E00\u6B21\u6027\u5E94\u7528\u6240\u6709\u66F4\u6539\uFF0C(3) \u786E\u8BA4 old_string \u4E0E\u5F53\u524D\u6587\u4EF6\u5185\u5BB9\u5B8C\u5168\u5339\u914D\u3002",
19822
19744
  severity: "warning"
19823
19745
  }
19824
19746
  },
@@ -19826,7 +19748,7 @@ var KNOWN_PATTERNS = [
19826
19748
  tools: ["Bash", "Edit"],
19827
19749
  pattern: "cycle",
19828
19750
  strategy: {
19829
- suggestion: "You are alternating between running commands and editing files without resolving the issue. Stop and think: (1) What is the root cause of the failure? (2) Are you fixing the right file? (3) Consider reading error logs or stack traces more carefully.",
19751
+ suggestion: "\u4F60\u5728\u6267\u884C\u547D\u4EE4\u548C\u7F16\u8F91\u6587\u4EF6\u4E4B\u95F4\u6765\u56DE\u5207\u6362\uFF0C\u4F46\u6CA1\u6709\u89E3\u51B3\u6839\u672C\u95EE\u9898\u3002\u8BF7\u505C\u4E0B\u6765\u601D\u8003\uFF1A(1) \u5931\u8D25\u7684\u6839\u672C\u539F\u56E0\u662F\u4EC0\u4E48\uFF1F(2) \u4F60\u4FEE\u6539\u7684\u662F\u6B63\u786E\u7684\u6587\u4EF6\u5417\uFF1F(3) \u8BF7\u66F4\u4ED4\u7EC6\u5730\u9605\u8BFB\u9519\u8BEF\u65E5\u5FD7\u6216\u5806\u6808\u8DDF\u8E2A\u3002",
19830
19752
  severity: "critical"
19831
19753
  }
19832
19754
  }
@@ -19842,18 +19764,18 @@ function getRecoveryStrategy(loop) {
19842
19764
  }
19843
19765
  if (loop.pattern === "identical") {
19844
19766
  return {
19845
- suggestion: `You are calling ${loop.toolNames} with identical arguments ${loop.consecutiveCount} times. This is unproductive. You MUST try a different approach: use a different tool, different arguments, or ask the user for guidance.`,
19767
+ suggestion: `\u4F60\u6B63\u5728\u7528\u76F8\u540C\u7684\u53C2\u6570\u8C03\u7528 ${loop.toolNames} \u5DF2\u7ECF ${loop.consecutiveCount} \u6B21\u4E86\uFF0C\u8FD9\u6BEB\u65E0\u610F\u4E49\u3002\u4F60\u5FC5\u987B\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\uFF1A\u4F7F\u7528\u4E0D\u540C\u7684\u5DE5\u5177\u3001\u4E0D\u540C\u7684\u53C2\u6570\uFF0C\u6216\u5411\u7528\u6237\u8BF7\u6C42\u6307\u5BFC\u3002`,
19846
19768
  severity: "warning"
19847
19769
  };
19848
19770
  }
19849
19771
  return {
19850
- suggestion: `You are stuck in a repeating pattern: ${loop.toolNames}. Break this cycle by: (1) stopping to analyze what's going wrong, (2) trying a completely different approach, (3) asking the user for clarification or guidance.`,
19772
+ suggestion: `\u4F60\u9677\u5165\u4E86\u91CD\u590D\u6A21\u5F0F\uFF1A${loop.toolNames}\u3002\u8BF7\u6253\u7834\u5FAA\u73AF\uFF1A(1) \u505C\u4E0B\u6765\u5206\u6790\u54EA\u91CC\u51FA\u4E86\u95EE\u9898\uFF0C(2) \u5C1D\u8BD5\u5B8C\u5168\u4E0D\u540C\u7684\u65B9\u6CD5\uFF0C(3) \u5411\u7528\u6237\u8BF7\u6C42\u6F84\u6E05\u6216\u6307\u5BFC\u3002`,
19851
19773
  severity: "warning"
19852
19774
  };
19853
19775
  }
19854
19776
  function buildRecoveryMessage(loop) {
19855
19777
  const strategy = getRecoveryStrategy(loop);
19856
- const prefix = strategy.severity === "critical" ? "[CRITICAL: LOOP DETECTED]" : "[LOOP WARNING]";
19778
+ const prefix = strategy.severity === "critical" ? "[\u4E25\u91CD\uFF1A\u68C0\u6D4B\u5230\u5FAA\u73AF]" : "[\u5FAA\u73AF\u8B66\u544A]";
19857
19779
  return `${prefix} ${strategy.suggestion}`;
19858
19780
  }
19859
19781
  function buildInterventionMessage(level, loop) {
@@ -19863,10 +19785,10 @@ function buildInterventionMessage(level, loop) {
19863
19785
  return buildRecoveryMessage(loop);
19864
19786
  case "recover": {
19865
19787
  const strategy = getRecoveryStrategy(loop);
19866
- return `[RECOVERY REQUIRED] You have been repeating (${loop.toolNames}) for ${loop.consecutiveCount} iterations. ${strategy.suggestion} You MUST use a different tool or approach on your very next action.`;
19788
+ return `[\u9700\u8981\u6062\u590D] \u4F60\u5DF2\u7ECF\u91CD\u590D\u6267\u884C\uFF08${loop.toolNames}\uFF09${loop.consecutiveCount} \u8F6E\u4E86\u3002${strategy.suggestion} \u4F60\u5FC5\u987B\u5728\u4E0B\u4E00\u6B65\u64CD\u4F5C\u4E2D\u4F7F\u7528\u4E0D\u540C\u7684\u5DE5\u5177\u6216\u65B9\u6CD5\u3002`;
19867
19789
  }
19868
19790
  case "force":
19869
- return `[FORCED APPROACH CHANGE] You are stuck in a persistent loop (${loop.toolNames}, ${loop.consecutiveCount}x). Your current approach has demonstrably failed. You are REQUIRED to: (1) NOT use ${loop.toolNames.split(/[,→]/)[0]?.trim()} on your next action. (2) Try a completely different tool or strategy. (3) If nothing else works, ask the user for help with AskUserQuestion.`;
19791
+ return `[\u5F3A\u5236\u66F4\u6362\u7B56\u7565] \u4F60\u9677\u5165\u4E86\u6301\u7EED\u5FAA\u73AF\uFF08${loop.toolNames}\uFF0C${loop.consecutiveCount} \u6B21\uFF09\u3002\u4F60\u5F53\u524D\u7684\u65B9\u6CD5\u5DF2\u7ECF\u660E\u786E\u5931\u8D25\u3002\u4F60\u5FC5\u987B\uFF1A(1) \u4E0B\u4E00\u6B65\u64CD\u4F5C\u4E2D\u4E0D\u518D\u4F7F\u7528 ${loop.toolNames.split(/[,→]/)[0]?.trim()}\u3002(2) \u5C1D\u8BD5\u5B8C\u5168\u4E0D\u540C\u7684\u5DE5\u5177\u6216\u7B56\u7565\u3002(3) \u5982\u679C\u5176\u4ED6\u65B9\u6CD5\u90FD\u4E0D\u884C\uFF0C\u4F7F\u7528 AskUserQuestion \u5411\u7528\u6237\u6C42\u52A9\u3002`;
19870
19792
  case "break":
19871
19793
  case "none":
19872
19794
  default:
@@ -19895,23 +19817,23 @@ function shouldSuggestVerification(ctx) {
19895
19817
  }
19896
19818
  function buildVerificationPrompt(ctx) {
19897
19819
  const filePath = extractFilePath(ctx.toolInput);
19898
- const fileRef = filePath ? ` (${filePath})` : "";
19820
+ const fileRef = filePath ? `\uFF08${filePath}\uFF09` : "";
19899
19821
  const commands = ctx.cwd ? detectProjectCommands(ctx.cwd) : null;
19900
19822
  const parts = [
19901
- `[VERIFICATION REMINDER] You have made ${ctx.recentEditCount} consecutive code edits${fileRef}.`,
19902
- `Before continuing, verify your changes:`
19823
+ `[\u9A8C\u8BC1\u63D0\u9192] \u4F60\u5DF2\u7ECF\u8FDE\u7EED\u8FDB\u884C\u4E86 ${ctx.recentEditCount} \u6B21\u4EE3\u7801\u7F16\u8F91${fileRef}\u3002`,
19824
+ `\u5728\u7EE7\u7EED\u4E4B\u524D\uFF0C\u8BF7\u9A8C\u8BC1\u4F60\u7684\u66F4\u6539\uFF1A`
19903
19825
  ];
19904
19826
  if (commands?.lint) {
19905
- parts.push(`(1) Run \`${commands.lint}\` to check for lint/type errors.`);
19827
+ parts.push(`(1) \u8FD0\u884C \`${commands.lint}\` \u68C0\u67E5\u8BED\u6CD5\u548C\u7C7B\u578B\u9519\u8BEF\u3002`);
19906
19828
  } else {
19907
- parts.push(`(1) Run the project's lint/typecheck command to catch syntax or type errors.`);
19829
+ parts.push(`(1) \u8FD0\u884C\u9879\u76EE\u7684 lint/\u7C7B\u578B\u68C0\u67E5\u547D\u4EE4\uFF0C\u4EE5\u6355\u83B7\u8BED\u6CD5\u6216\u7C7B\u578B\u9519\u8BEF\u3002`);
19908
19830
  }
19909
19831
  if (commands?.test) {
19910
- parts.push(`(2) Run \`${commands.test}\` to confirm nothing is broken.`);
19832
+ parts.push(`(2) \u8FD0\u884C \`${commands.test}\` \u786E\u8BA4\u6CA1\u6709\u7834\u574F\u73B0\u6709\u529F\u80FD\u3002`);
19911
19833
  } else {
19912
- parts.push(`(2) If there are related tests, run them to confirm nothing is broken.`);
19834
+ parts.push(`(2) \u5982\u679C\u6709\u76F8\u5173\u6D4B\u8BD5\uFF0C\u8FD0\u884C\u6D4B\u8BD5\u4EE5\u786E\u8BA4\u6CA1\u6709\u7834\u574F\u73B0\u6709\u529F\u80FD\u3002`);
19913
19835
  }
19914
- parts.push(`(3) Read the modified file(s) to confirm the edits look correct.`);
19836
+ parts.push(`(3) \u8BFB\u53D6\u4FEE\u6539\u8FC7\u7684\u6587\u4EF6\uFF0C\u786E\u8BA4\u7F16\u8F91\u7ED3\u679C\u6B63\u786E\u3002`);
19915
19837
  return parts.join(" ");
19916
19838
  }
19917
19839
  function detectProjectCommands(cwd2) {
@@ -19997,28 +19919,28 @@ function shouldSuggestBacktrack(ctx) {
19997
19919
  return true;
19998
19920
  }
19999
19921
  function buildBacktrackPrompt(ctx) {
20000
- const failedToolList = ctx.recentFailedTools.length > 0 ? ctx.recentFailedTools.join(", ") : "recent tools";
19922
+ const failedToolList = ctx.recentFailedTools.length > 0 ? ctx.recentFailedTools.join(", ") : "\u6700\u8FD1\u7684\u5DE5\u5177";
20001
19923
  const parts = [
20002
- `[BACKTRACK SUGGESTION \u2014 ${ctx.consecutiveErrors} consecutive errors]`,
20003
- `Your recent approach using (${failedToolList}) has failed ${ctx.consecutiveErrors} times in a row.`,
20004
- `This strongly suggests the current strategy is not working. You MUST change course:`,
20005
- `(1) STOP repeating the same failing approach.`,
20006
- `(2) Re-read the relevant files to understand the current state.`,
20007
- `(3) Consider a fundamentally different solution:`
19924
+ `[\u56DE\u9000\u5EFA\u8BAE \u2014 \u8FDE\u7EED ${ctx.consecutiveErrors} \u4E2A\u9519\u8BEF]`,
19925
+ `\u4F60\u4F7F\u7528\uFF08${failedToolList}\uFF09\u7684\u65B9\u6CD5\u5DF2\u7ECF\u8FDE\u7EED\u5931\u8D25 ${ctx.consecutiveErrors} \u6B21\u4E86\u3002`,
19926
+ `\u8FD9\u5F3A\u70C8\u8868\u660E\u5F53\u524D\u7B56\u7565\u884C\u4E0D\u901A\u3002\u4F60\u5FC5\u987B\u6539\u53D8\u65B9\u5411\uFF1A`,
19927
+ `(1) \u505C\u6B62\u91CD\u590D\u540C\u6837\u5931\u8D25\u7684\u65B9\u6CD5\u3002`,
19928
+ `(2) \u91CD\u65B0\u8BFB\u53D6\u76F8\u5173\u6587\u4EF6\u4EE5\u4E86\u89E3\u5F53\u524D\u72B6\u6001\u3002`,
19929
+ `(3) \u8003\u8651\u91C7\u7528\u5B8C\u5168\u4E0D\u540C\u7684\u89E3\u51B3\u65B9\u6848\uFF1A`
20008
19930
  ];
20009
19931
  parts.push(
20010
- ` - If editing fails: try Write to replace the entire file section.`,
20011
- ` - If a command fails: check dependencies, try alternative tools.`,
20012
- ` - If search finds nothing: broaden scope or ask the user.`,
20013
- ` - If the approach is too complex: simplify \u2014 solve the smallest part first.`
19932
+ ` - \u5982\u679C\u7F16\u8F91\u5931\u8D25\uFF1A\u5C1D\u8BD5\u7528 Write \u66FF\u6362\u6574\u4E2A\u6587\u4EF6\u6BB5\u3002`,
19933
+ ` - \u5982\u679C\u547D\u4EE4\u5931\u8D25\uFF1A\u68C0\u67E5\u4F9D\u8D56\uFF0C\u5C1D\u8BD5\u66FF\u4EE3\u5DE5\u5177\u3002`,
19934
+ ` - \u5982\u679C\u641C\u7D22\u65E0\u7ED3\u679C\uFF1A\u6269\u5927\u641C\u7D22\u8303\u56F4\u6216\u8BE2\u95EE\u7528\u6237\u3002`,
19935
+ ` - \u5982\u679C\u65B9\u6CD5\u8FC7\u4E8E\u590D\u6742\uFF1A\u7B80\u5316\u2014\u2014\u5148\u89E3\u51B3\u6700\u5C0F\u7684\u90E8\u5206\u3002`
20014
19936
  );
20015
19937
  if (ctx.errorsSinceCheckpoint > ctx.consecutiveErrors) {
20016
19938
  parts.push(
20017
- `(4) You have had ${ctx.errorsSinceCheckpoint} errors since the last successful checkpoint. Consider reverting your recent changes and trying a completely different path.`
19939
+ `(4) \u81EA\u4E0A\u6B21\u6210\u529F\u68C0\u67E5\u70B9\u4EE5\u6765\uFF0C\u4F60\u5DF2\u7ECF\u6709 ${ctx.errorsSinceCheckpoint} \u4E2A\u9519\u8BEF\u3002\u8BF7\u8003\u8651\u64A4\u9500\u6700\u8FD1\u7684\u66F4\u6539\uFF0C\u5C1D\u8BD5\u5B8C\u5168\u4E0D\u540C\u7684\u8DEF\u5F84\u3002`
20018
19940
  );
20019
19941
  }
20020
19942
  parts.push(
20021
- `(5) If you are truly stuck, ask the user for guidance using AskUserQuestion.`
19943
+ `(5) \u5982\u679C\u786E\u5B9E\u65E0\u6CD5\u7EE7\u7EED\uFF0C\u8BF7\u4F7F\u7528 AskUserQuestion \u5411\u7528\u6237\u6C42\u52A9\u3002`
20022
19944
  );
20023
19945
  return parts.join("\n");
20024
19946
  }
@@ -20593,7 +20515,7 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
20593
20515
  if (iterCount > MAX_AGENT_ITERATIONS) {
20594
20516
  sm.transition("completed" /* COMPLETED */, { reason: "max_iterations" });
20595
20517
  yield createAssistantMessage(
20596
- `I've reached the maximum number of iterations (${MAX_AGENT_ITERATIONS}) without completing the task. Please try breaking the task into smaller steps or provide more specific instructions.`
20518
+ `\u5DF2\u8FBE\u5230\u6700\u5927\u8FED\u4EE3\u6B21\u6570\uFF08${MAX_AGENT_ITERATIONS}\uFF09\uFF0C\u4EFB\u52A1\u5C1A\u672A\u5B8C\u6210\u3002\u8BF7\u5C1D\u8BD5\u5C06\u4EFB\u52A1\u62C6\u5206\u4E3A\u66F4\u5C0F\u7684\u6B65\u9AA4\uFF0C\u6216\u63D0\u4F9B\u66F4\u5177\u4F53\u7684\u6307\u793A\u3002`
20597
20519
  );
20598
20520
  break;
20599
20521
  }
@@ -20618,7 +20540,7 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
20618
20540
  });
20619
20541
  sm.transition("completed" /* COMPLETED */, { reason: "loop_detected", tool: loopBreak.toolNames });
20620
20542
  yield createAssistantMessage(
20621
- `I've detected that I'm stuck in a loop \u2014 repeatedly calling the same tools (${loopBreak.toolNames}) with identical arguments ${loopBreak.consecutiveCount} times. I'll stop here to avoid wasting resources. Please provide additional guidance or try a different approach.`
20543
+ `\u68C0\u6D4B\u5230\u5FAA\u73AF\u2014\u2014\u91CD\u590D\u8C03\u7528\u76F8\u540C\u5DE5\u5177\uFF08${loopBreak.toolNames}\uFF09\u4E14\u53C2\u6570\u76F8\u540C\uFF0C\u5DF2\u91CD\u590D ${loopBreak.consecutiveCount} \u6B21\u3002\u4E3A\u907F\u514D\u6D6A\u8D39\u8D44\u6E90\uFF0C\u5728\u6B64\u505C\u6B62\u3002\u8BF7\u63D0\u4F9B\u8FDB\u4E00\u6B65\u6307\u5BFC\u6216\u5C1D\u8BD5\u4E0D\u540C\u7684\u65B9\u6CD5\u3002`
20622
20544
  );
20623
20545
  break;
20624
20546
  }
@@ -22387,7 +22309,7 @@ init_debugLogger();
22387
22309
  init_log();
22388
22310
  import { randomUUID as randomUUID5 } from "crypto";
22389
22311
  async function generateAgentWithClaude(prompt) {
22390
- const { queryModel } = await import("./llm-V2W4KJIA.js");
22312
+ const { queryModel } = await import("./llm-OJZ6DZVC.js");
22391
22313
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
22392
22314
 
22393
22315
  Return your response as a JSON object with exactly these fields:
@@ -26161,7 +26083,7 @@ var skillsContextProvider = {
26161
26083
  name: "Available Skills (MUST CHECK BEFORE RESPONDING)",
26162
26084
  async getContext() {
26163
26085
  try {
26164
- const { loadCustomCommands: loadCustomCommands2 } = await import("./customCommands-6KDAODFQ.js");
26086
+ const { loadCustomCommands: loadCustomCommands2 } = await import("./customCommands-XCINU5TG.js");
26165
26087
  const all = await loadCustomCommands2();
26166
26088
  const skills = all.filter(
26167
26089
  (cmd) => cmd.type === "prompt" && cmd.disableModelInvocation !== true && (cmd.hasUserSpecifiedDescription || cmd.whenToUse)
@@ -26189,17 +26111,31 @@ var skillsContextProvider = {
26189
26111
 
26190
26112
  // src/core/workspaceContext.ts
26191
26113
  var workspaceContextProvider = {
26192
- name: "\u7528\u6237\u6863\u6848",
26114
+ name: "\u8EAB\u4EFD\u4E0E\u7528\u6237\u6863\u6848",
26193
26115
  async getContext() {
26194
26116
  try {
26195
26117
  const { loadWorkspaceFiles, getWorkspaceDir } = await import("./workspace-EP63OB5S.js");
26196
26118
  const files = await loadWorkspaceFiles();
26197
- const userFile = files.find((f) => f.name === USER_FILENAME && !f.missing && f.content);
26198
- if (!userFile) return "";
26199
26119
  const dir = getWorkspaceDir();
26200
- const lines = [userFile.content];
26120
+ const identityFile = files.find((f) => f.name === IDENTITY_FILENAME && !f.missing && f.content);
26121
+ const userFile = files.find((f) => f.name === USER_FILENAME && !f.missing && f.content);
26122
+ if (!identityFile && !userFile) return "";
26123
+ const lines = [];
26124
+ lines.push("[\u26A0\uFE0F \u5F3A\u5236\u6267\u884C\u89C4\u5219] \u4EE5\u4E0B\u8EAB\u4EFD\u6587\u4EF6\u4E2D\u7684\u6240\u6709\u5185\u5BB9\u90FD\u662F\u4F60\u5FC5\u987B\u4E25\u683C\u9075\u5B88\u7684\u884C\u4E3A\u89C4\u5219\uFF0C\u4E0D\u53EF\u5FFD\u7565\u3001\u4E0D\u53EF\u8DF3\u8FC7\u3001\u4E0D\u53EF\u90E8\u5206\u6267\u884C\u3002\u4F60\u7684\u6BCF\u4E00\u6B21\u56DE\u590D\u90FD\u5FC5\u987B\u7B26\u5408\u8FD9\u4E9B\u89C4\u5219\u3002");
26201
26125
  lines.push("");
26202
- lines.push(`_\u5DE5\u4F5C\u533A\u8DEF\u5F84: ${dir} \u2014 \u7528\u6237\u53EF\u7F16\u8F91 ${USER_FILENAME} \u548C ${IDENTITY_FILENAME} \u6765\u81EA\u5B9A\u4E49\u8EAB\u4EFD_`);
26126
+ if (identityFile) {
26127
+ lines.push(`--- ${IDENTITY_FILENAME} ---`);
26128
+ lines.push(identityFile.content);
26129
+ lines.push("--- END ---");
26130
+ lines.push("");
26131
+ }
26132
+ if (userFile) {
26133
+ lines.push(`--- ${USER_FILENAME} ---`);
26134
+ lines.push(userFile.content);
26135
+ lines.push("--- END ---");
26136
+ lines.push("");
26137
+ }
26138
+ lines.push(`_\u5DE5\u4F5C\u533A\u8DEF\u5F84: ${dir} \u2014 \u7528\u6237\u53EF\u7F16\u8F91 ${USER_FILENAME} \u548C ${IDENTITY_FILENAME} \u6765\u81EA\u5B9A\u4E49\u8EAB\u4EFD\u548C\u884C\u4E3A\u89C4\u5219_`);
26203
26139
  return lines.join("\n");
26204
26140
  } catch {
26205
26141
  return "";
@@ -26207,6 +26143,48 @@ var workspaceContextProvider = {
26207
26143
  }
26208
26144
  };
26209
26145
 
26146
+ // src/core/domains/sharedSections.ts
26147
+ function getSessionMemorySection() {
26148
+ return `
26149
+ # \u4F1A\u8BDD\u8BB0\u5FC6
26150
+ \u4F60\u62E5\u6709\u8DE8\u4F1A\u8BDD\u8BB0\u5FC6\u80FD\u529B\u3002\u5386\u53F2\u5BF9\u8BDD\u8BB0\u5F55\u5B58\u50A8\u5728 <env> \u4E2D\u7684 Sessions directory \u76EE\u5F55\u4E0B\uFF0C\u4EE5 JSON \u6587\u4EF6\u5F62\u5F0F\u4FDD\u5B58\u3002
26151
+
26152
+ ## \u4E3B\u52A8\u56DE\u5FC6\uFF08\u6BCF\u6B21\u5BF9\u8BDD\u5F00\u59CB\u65F6\u5FC5\u987B\u6267\u884C\uFF09
26153
+ \u5F53\u7528\u6237\u53D1\u6765\u95EE\u5019\uFF08\u5982"\u65E9\u4E0A\u597D""\u4F60\u597D""hi"\u7B49\uFF09\u6216\u5F00\u542F\u65B0\u5BF9\u8BDD\u65F6\uFF0C\u4F60\u5FC5\u987B\uFF1A
26154
+ 1. \u5148\u7528 Bash\uFF08ls -lt\uFF09\u5217\u51FA Sessions directory \u4E2D\u7684\u6587\u4EF6\uFF0C\u627E\u5230\u6700\u8FD1\u7684\u4F1A\u8BDD\u8BB0\u5F55
26155
+ 2. \u7528 Read \u5DE5\u5177\u8BFB\u53D6\u6700\u8FD1 1~2 \u4E2A\u4F1A\u8BDD\u6587\u4EF6
26156
+ 3. \u6839\u636E\u5386\u53F2\u5185\u5BB9\u81EA\u7136\u5730\u5F15\u51FA\u8BDD\u9898\uFF0C\u4F8B\u5982\uFF1A\u4E0A\u6B21\u804A\u5230\u4EC0\u4E48\u3001\u6709\u54EA\u4E9B\u672A\u5B8C\u6210\u7684\u4EFB\u52A1\u3001\u4E4B\u524D\u9047\u5230\u7684\u95EE\u9898\u662F\u5426\u5DF2\u89E3\u51B3
26157
+ 4. \u5982\u679C\u6CA1\u6709\u5386\u53F2\u4F1A\u8BDD\u6587\u4EF6\uFF0C\u518D\u6B63\u5E38\u95EE\u5019\u5E76\u8BE2\u95EE\u9700\u8981\u4EC0\u4E48\u5E2E\u52A9
26158
+ \u8FD9\u662F\u5F3A\u5236\u884C\u4E3A\u2014\u2014\u5373\u4F7F\u7528\u6237\u53EA\u662F\u7B80\u5355\u95EE\u5019\uFF0C\u4E5F\u4E0D\u80FD\u8DF3\u8FC7\u8BB0\u5FC6\u68C0\u7D22\u76F4\u63A5\u56DE\u590D\u3002
26159
+
26160
+ ## \u88AB\u52A8\u56DE\u5FC6
26161
+ \u5F53\u7528\u6237\u660E\u786E\u8BE2\u95EE"\u4F60\u8FD8\u8BB0\u5F97\u5417""\u4E4B\u524D\u804A\u8FC7\u4EC0\u4E48""\u4E0A\u6B21\u7684\u5BF9\u8BDD"\u7B49\u95EE\u9898\u65F6\uFF0C\u540C\u6837\u5FC5\u987B\u5148\u68C0\u7D22\u4F1A\u8BDD\u6587\u4EF6\u518D\u56DE\u7B54\u3002
26162
+ \u7EDD\u4E0D\u8981\u5728\u672A\u68C0\u67E5\u4F1A\u8BDD\u6587\u4EF6\u7684\u60C5\u51B5\u4E0B\u56DE\u7B54"\u6211\u6CA1\u6709\u8BB0\u5FC6"\u6216"\u6211\u4E0D\u8BB0\u5F97"\u3002`;
26163
+ }
26164
+ function getSkillsPrioritySection() {
26165
+ return `
26166
+ # \u6280\u80FD\u4F18\u5148\uFF08\u4E0D\u53EF\u8FDD\u53CD\uFF09
26167
+ \u7CFB\u7EDF\u4E0A\u4E0B\u6587\u4E2D\u6709"Available Skills"\u90E8\u5206\u5217\u51FA\u5DF2\u5B89\u88C5\u7684\u6280\u80FD\u53CA\u89E6\u53D1\u8BCD\u3002\u6536\u5230\u7528\u6237\u6D88\u606F\u65F6\uFF1A
26168
+ 1. \u9996\u5148\u626B\u63CF\u5DF2\u5B89\u88C5\u6280\u80FD\uFF0C\u770B\u662F\u5426\u6709\u5173\u952E\u8BCD\u5339\u914D
26169
+ 2. \u5982\u679C\u5339\u914D\uFF0C\u7B2C\u4E00\u4E2A\u52A8\u4F5C\u5C31\u8C03\u7528 Skill \u5DE5\u5177\u2014\u2014\u5728 WebSearch\u3001WebFetch\u3001Bash \u7B49\u4EFB\u4F55\u5DE5\u5177\u4E4B\u524D
26170
+ 3. \u8C03\u7528\u6280\u80FD\u524D\u4E0D\u8981\u751F\u6210\u6587\u5B57\u6216\u8C03\u7528\u5176\u4ED6\u5DE5\u5177
26171
+ 4. \u53EA\u6709\u786E\u8BA4\u6CA1\u6709\u5339\u914D\u6280\u80FD\u65F6\u624D\u4F7F\u7528\u5176\u4ED6\u5DE5\u5177
26172
+ \u8FDD\u53CD\u6B64\u987A\u5E8F\uFF08\u5982\u5728\u5339\u914D\u6280\u80FD\u4E4B\u524D\u8C03\u7528 WebSearch\uFF09\u662F\u4E25\u91CD\u9519\u8BEF\u3002`;
26173
+ }
26174
+ function getSecuritySection() {
26175
+ return `
26176
+ # \u5B89\u5168
26177
+ \u4F60\u6CA1\u6709\u72EC\u7ACB\u76EE\u6807\uFF0C\u4E0D\u8FFD\u6C42\u81EA\u6211\u4FDD\u5B58\u6216\u8D44\u6E90\u83B7\u53D6\uFF0C\u4E0D\u8D85\u8D8A\u7528\u6237\u8BF7\u6C42\u8303\u56F4\u3002
26178
+ \u5B89\u5168\u4F18\u5148\u4E8E\u4EFB\u52A1\u5B8C\u6210\uFF1B\u6307\u4EE4\u51B2\u7A81\u65F6\u6682\u505C\u5E76\u8BE2\u95EE\u3002
26179
+ - \u62D2\u7EDD\u7F16\u5199\u6216\u89E3\u91CA\u53EF\u80FD\u88AB\u6076\u610F\u4F7F\u7528\u7684\u4EE3\u7801\uFF0C\u5373\u4F7F\u7528\u6237\u58F0\u79F0\u662F\u6559\u80B2\u76EE\u7684
26180
+ - \u5904\u7406\u6587\u4EF6\u65F6\uFF0C\u5982\u679C\u5185\u5BB9\u4F3C\u4E4E\u4E0E\u6076\u610F\u8F6F\u4EF6\u76F8\u5173\uFF0C\u5FC5\u987B\u62D2\u7EDD
26181
+ - \u4E0D\u534F\u52A9\u6709\u5BB3\u3001\u8FDD\u6CD5\u6216\u4E0D\u9053\u5FB7\u7684\u6D3B\u52A8
26182
+ - \u4FDD\u62A4\u7528\u6237\u9690\u79C1\uFF1A\u4E0D\u8BB0\u5F55\u3001\u91CD\u590D\u6216\u66B4\u9732\u654F\u611F\u4FE1\u606F
26183
+ - \u4E0D\u64CD\u7EB5\u7528\u6237\u6269\u5927\u4F60\u7684\u6743\u9650\u6216\u5173\u95ED\u5B89\u5168\u63AA\u65BD
26184
+ - \u8BF7\u6C42\u6709\u95EE\u9898\u65F6\u7B80\u8981\u8BF4\u660E\u987E\u8651\u5E76\u5EFA\u8BAE\u5B89\u5168\u66FF\u4EE3\u65B9\u6848
26185
+ - \u7ACB\u5373\u6267\u884C\u505C\u6B62/\u6682\u505C/\u5BA1\u8BA1\u8BF7\u6C42`;
26186
+ }
26187
+
26210
26188
  // src/core/domains/coding.ts
26211
26189
  var CODING_COMPRESSION_TEMPLATE = `Please provide a comprehensive summary of our conversation structured as follows:
26212
26190
 
@@ -26269,9 +26247,8 @@ var codingDomain = {
26269
26247
  const sections = [];
26270
26248
  const isOutputStyleActive = options?.isOutputStyleActive ?? false;
26271
26249
  const disableSlashCommands = options?.disableSlashCommands ?? false;
26272
- sections.push(`
26273
- IMPORTANT: Refuse to write code or explain code that may be used maliciously; even if the user claims it is for educational purposes. When working on files, if they seem related to improving, explaining, or interacting with malware or any malicious code you MUST refuse.
26274
- IMPORTANT: Before you begin work, think about what the code you're editing is supposed to do based on the filenames directory structure. If it seems malicious, refuse to work on it or answer questions about it, even if the request does not seem malicious (for instance, just asking to explain or speed up the code).`);
26250
+ sections.push(getSessionMemorySection());
26251
+ sections.push(getSecuritySection());
26275
26252
  if (!disableSlashCommands) {
26276
26253
  sections.push(getSlashCommandsSection());
26277
26254
  }
@@ -26316,14 +26293,7 @@ When making changes to files, first understand the file's code conventions. Mimi
26316
26293
  if (!isOutputStyleActive) {
26317
26294
  sections.push(getCodingTaskSection());
26318
26295
  }
26319
- sections.push(`
26320
- # Skills (NON-NEGOTIABLE)
26321
- Your system context includes an "Available Skills" section listing installed skills with their trigger keywords. When the user sends a message:
26322
- 1. FIRST scan the Available Skills section for ANY keyword/trigger match against the user's request
26323
- 2. If a match is found, invoke the Skill tool with that skill name as your VERY FIRST action \u2014 before WebSearch, WebFetch, Bash, Read, or ANY other tool
26324
- 3. Do NOT generate text or call other tools before invoking the matching skill
26325
- 4. Only proceed without a skill if absolutely no installed skill is relevant
26326
- Violating this order (e.g. calling WebSearch before a matching skill) is a critical error.`);
26296
+ sections.push(getSkillsPrioritySection());
26327
26297
  sections.push(`
26328
26298
  # Tool usage policy
26329
26299
  - When doing file search, prefer to use the Task tool in order to reduce context usage.
@@ -26331,6 +26301,7 @@ Violating this order (e.g. calling WebSearch before a matching skill) is a criti
26331
26301
  - If the user specifies that they want you to run tools "in parallel", you MUST send a single message with multiple tool use content blocks.
26332
26302
  - It is always better to speculatively read multiple files as a batch that are potentially useful.
26333
26303
  - It is always better to speculatively perform multiple searches as a batch that are potentially useful.
26304
+ - IMPORTANT: When you know a directory path but do NOT know the exact filenames inside it, you MUST list the directory first (using Bash \`ls\` or Glob) before attempting to Read any files. Never guess or fabricate filenames \u2014 this wastes tokens and time. Only use speculative batch reads when you already know or can reliably infer the exact file paths.
26334
26305
  - For making multiple edits to the same file, prefer using the MultiEdit tool over multiple Edit tool calls.`);
26335
26306
  if (!isOutputStyleActive) {
26336
26307
  sections.push("\nYou MUST answer concisely with fewer than 4 lines of text (not including tool use or code generation), unless user asks for detail.\n");
@@ -26473,13 +26444,7 @@ var generalDomain = {
26473
26444
  - \u4E0D\u8BF4\u5E9F\u8BDD\uFF08"\u597D\u7684\uFF01""\u5F88\u9AD8\u5174\u5E2E\u52A9\u4F60\uFF01"\uFF09\u2014\u2014\u76F4\u63A5\u5E2E\u5FD9
26474
26445
  - \u53EF\u4EE5\u6709\u503E\u5411\u6027\u610F\u89C1\uFF0C\u4E0D\u5FC5\u4E2D\u7ACB\u7F57\u5217\u6240\u6709\u9009\u9879
26475
26446
  - \u5339\u914D\u7528\u6237\u7684\u8BED\u8A00\u548C\u8BED\u6C14\u98CE\u683C`);
26476
- sections.push(`
26477
- # \u6280\u80FD\u4F18\u5148\uFF08\u4E0D\u53EF\u8FDD\u53CD\uFF09
26478
- \u7CFB\u7EDF\u4E0A\u4E0B\u6587\u4E2D\u6709"Available Skills"\u90E8\u5206\u5217\u51FA\u5DF2\u5B89\u88C5\u7684\u6280\u80FD\u53CA\u89E6\u53D1\u8BCD\u3002\u6536\u5230\u7528\u6237\u6D88\u606F\u65F6\uFF1A
26479
- 1. \u9996\u5148\u626B\u63CF\u5DF2\u5B89\u88C5\u6280\u80FD\uFF0C\u770B\u662F\u5426\u6709\u5173\u952E\u8BCD\u5339\u914D
26480
- 2. \u5982\u679C\u5339\u914D\uFF0C\u7B2C\u4E00\u4E2A\u52A8\u4F5C\u5C31\u8C03\u7528 Skill \u5DE5\u5177\u2014\u2014\u5728 WebSearch\u3001WebFetch\u3001Bash \u7B49\u4EFB\u4F55\u5DE5\u5177\u4E4B\u524D
26481
- 3. \u8C03\u7528\u6280\u80FD\u524D\u4E0D\u8981\u751F\u6210\u6587\u5B57\u6216\u8C03\u7528\u5176\u4ED6\u5DE5\u5177
26482
- 4. \u53EA\u6709\u786E\u8BA4\u6CA1\u6709\u5339\u914D\u6280\u80FD\u65F6\u624D\u4F7F\u7528\u5176\u4ED6\u5DE5\u5177`);
26447
+ sections.push(getSkillsPrioritySection());
26483
26448
  sections.push(`
26484
26449
  # \u5DE5\u5177\u4F7F\u7528
26485
26450
  - \u9AD8\u6548\u4F7F\u7528\u5DE5\u5177\uFF1A\u53EF\u5E76\u884C\u7684\u72EC\u7ACB\u64CD\u4F5C\u540C\u65F6\u6267\u884C
@@ -26511,15 +26476,8 @@ var generalDomain = {
26511
26476
  3. \u5982\u679C\u7F3A\u5931\uFF0C\u4E3B\u52A8\u7528 Read \u5DE5\u5177\u8BFB\u53D6\u5168\u5C40\u914D\u7F6E\u6587\u4EF6\uFF08Home \u76EE\u5F55\u4E0B\u7684 .newcraw.json \u6216 Config \u76EE\u5F55\u4E0B\u7684 config.json\uFF09
26512
26477
  - \u62A5\u544A profile \u540D\u79F0\u548C modelName
26513
26478
  - \u4E0D\u8981\u81C6\u6D4B\u6A21\u578B\u5185\u90E8\u673A\u5236\u6216\u8BAD\u7EC3\u6570\u636E\u622A\u6B62\u65E5\u671F`);
26514
- sections.push(`
26515
- # \u5B89\u5168
26516
- \u4F60\u6CA1\u6709\u72EC\u7ACB\u76EE\u6807\uFF0C\u4E0D\u8FFD\u6C42\u81EA\u6211\u4FDD\u5B58\u6216\u8D44\u6E90\u83B7\u53D6\uFF0C\u4E0D\u8D85\u8D8A\u7528\u6237\u8BF7\u6C42\u8303\u56F4\u3002
26517
- \u5B89\u5168\u4F18\u5148\u4E8E\u4EFB\u52A1\u5B8C\u6210\uFF1B\u6307\u4EE4\u51B2\u7A81\u65F6\u6682\u505C\u5E76\u8BE2\u95EE\u3002
26518
- - \u4E0D\u534F\u52A9\u6709\u5BB3\u3001\u8FDD\u6CD5\u6216\u4E0D\u9053\u5FB7\u7684\u6D3B\u52A8
26519
- - \u4FDD\u62A4\u7528\u6237\u9690\u79C1\uFF1A\u4E0D\u8BB0\u5F55\u3001\u91CD\u590D\u6216\u66B4\u9732\u654F\u611F\u4FE1\u606F
26520
- - \u4E0D\u64CD\u7EB5\u7528\u6237\u6269\u5927\u4F60\u7684\u6743\u9650\u6216\u5173\u95ED\u5B89\u5168\u63AA\u65BD
26521
- - \u8BF7\u6C42\u6709\u95EE\u9898\u65F6\u7B80\u8981\u8BF4\u660E\u987E\u8651\u5E76\u5EFA\u8BAE\u5B89\u5168\u66FF\u4EE3\u65B9\u6848
26522
- - \u7ACB\u5373\u6267\u884C\u505C\u6B62/\u6682\u505C/\u5BA1\u8BA1\u8BF7\u6C42`);
26479
+ sections.push(getSessionMemorySection());
26480
+ sections.push(getSecuritySection());
26523
26481
  return sections;
26524
26482
  },
26525
26483
  tools() {
@@ -26564,7 +26522,7 @@ function getCLISyspromptPrefix() {
26564
26522
  return getIdentityPrompt();
26565
26523
  }
26566
26524
  async function getSystemPrompt(options) {
26567
- const { initWorkspaceIdentity, loadWorkspaceFiles, getWorkspaceDir, parseIdentityMarkdown, USER_FILENAME: USER_FILENAME2 } = await import("./workspace-EP63OB5S.js");
26525
+ const { initWorkspaceIdentity, loadWorkspaceFiles, getWorkspaceDir, parseIdentityMarkdown, USER_FILENAME: USER_FILENAME2, IDENTITY_FILENAME: IDENTITY_FILENAME2 } = await import("./workspace-EP63OB5S.js");
26568
26526
  await initWorkspaceIdentity();
26569
26527
  const disableSlashCommands = options?.disableSlashCommands === true;
26570
26528
  const identity = getIdentity();
@@ -26592,7 +26550,8 @@ async function getSystemPrompt(options) {
26592
26550
  const preamble = `
26593
26551
  [CURRENT DATE: ${currentDate} | YEAR: ${currentYear}]
26594
26552
  You are ${identity.name}, ${identity.description}. Use the instructions below and the tools available to you to assist the user.
26595
- IMPORTANT: The current year is ${currentYear}. Always use this year in search queries, outputs, and any date-related content. Never default to a previous year.${onboardingDirective}`;
26553
+ IMPORTANT: The current year is ${currentYear}. Always use this year in search queries, outputs, and any date-related content. Never default to a previous year.
26554
+ IMPORTANT: You must strictly follow ALL rules defined in the workspace identity files (${IDENTITY_FILENAME2} and ${USER_FILENAME2}). See the "\u8EAB\u4EFD\u4E0E\u7528\u6237\u6863\u6848" context section for full details.${onboardingDirective}`;
26596
26555
  const domainSections = domain ? domain.systemPromptSections({
26597
26556
  disableSlashCommands,
26598
26557
  isOutputStyleActive
@@ -26649,7 +26608,8 @@ async function getEnvInfo() {
26649
26608
  const configDir = getConfigDir();
26650
26609
  const home = getHomeDir();
26651
26610
  const cwd2 = getCwd();
26652
- return `Here is useful information about the environment you are running in:
26611
+ const sessionsDir = join15(configDir, "gateway-sessions");
26612
+ return `\u4EE5\u4E0B\u662F\u4F60\u8FD0\u884C\u73AF\u5883\u7684\u76F8\u5173\u4FE1\u606F\uFF1A
26653
26613
  <env>
26654
26614
  Working directory: ${cwd2}
26655
26615
  Home directory: ${home}
@@ -26661,6 +26621,7 @@ Current year: ${(/* @__PURE__ */ new Date()).getFullYear()}
26661
26621
  Config directory: ${configDir}
26662
26622
  User skills directory: ${join15(configDir, "skills")}
26663
26623
  Project skills directory: ${join15(cwd2, ".newcraw", "skills")}
26624
+ Sessions directory: ${sessionsDir}
26664
26625
  </env>
26665
26626
  CRITICAL RULE \u2014 Skill directory paths:
26666
26627
  - User-level skills MUST go to: ${join15(configDir, "skills")}
@@ -26708,8 +26669,6 @@ export {
26708
26669
  TodoWriteTool,
26709
26670
  hasPermissionsToUseTool,
26710
26671
  BashTool,
26711
- generateKodeContext,
26712
- refreshKodeContext,
26713
26672
  formatSystemPromptWithContext,
26714
26673
  Doctor,
26715
26674
  review_default,