pybao-cli 1.4.60 → 1.4.61

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 (146) hide show
  1. package/dist/REPL-D2V54PR2.js +46 -0
  2. package/dist/{acp-E45JJIQK.js → acp-6XO6DZ4K.js} +29 -29
  3. package/dist/{agentsValidate-WCLJMUFS.js → agentsValidate-N6USTEX6.js} +7 -7
  4. package/dist/{ask-D5QONKUC.js → ask-U7Z3DDMS.js} +28 -28
  5. package/dist/{autoUpdater-6HCYR35P.js → autoUpdater-SKABKEDG.js} +3 -3
  6. package/dist/{chunk-7IR32BFP.js → chunk-2EAKAXE7.js} +4 -4
  7. package/dist/{chunk-ZEVLVZLV.js → chunk-3C6TCPTK.js} +2 -2
  8. package/dist/{chunk-KENEMSOE.js → chunk-56F6HFV3.js} +2 -2
  9. package/dist/{chunk-EKSPNQLL.js → chunk-7MDERGB4.js} +1 -1
  10. package/dist/{chunk-264EIILY.js → chunk-7OTUXO44.js} +3 -3
  11. package/dist/{chunk-CJ2ZE3PW.js → chunk-7SI5GFRV.js} +1 -1
  12. package/dist/{chunk-QIRPIHNE.js → chunk-7XB7B6Z4.js} +2 -2
  13. package/dist/{chunk-3CJMCNQV.js → chunk-BZP4S26C.js} +3 -3
  14. package/dist/{chunk-TPUJUEOD.js → chunk-E5ITVDNO.js} +2 -2
  15. package/dist/{chunk-LLRVPQKM.js → chunk-EV3XWHXP.js} +1 -1
  16. package/dist/{chunk-YSIDSO2P.js → chunk-F3GKVQH4.js} +16 -16
  17. package/dist/{chunk-7LTWIP6N.js → chunk-FVVMATKZ.js} +3 -3
  18. package/dist/{chunk-OEDCAG3L.js → chunk-GJ5MQLQW.js} +3 -3
  19. package/dist/{chunk-4I2D2KFY.js → chunk-IEYYJQSN.js} +4 -4
  20. package/dist/{chunk-PRLW2R2R.js → chunk-KHHFZVFT.js} +1 -1
  21. package/dist/{chunk-EF34UHUH.js → chunk-M7TC4PYX.js} +4 -4
  22. package/dist/{chunk-HALXVKBG.js → chunk-N4XJF5KW.js} +3 -3
  23. package/dist/{chunk-6G4MUNBC.js → chunk-PTFRX47Q.js} +1 -1
  24. package/dist/{chunk-J42DBIOK.js → chunk-QFHNNIRB.js} +1 -1
  25. package/dist/{chunk-J42DBIOK.js.map → chunk-QFHNNIRB.js.map} +1 -1
  26. package/dist/{chunk-O6TECK56.js → chunk-QLOVB5WV.js} +1 -1
  27. package/dist/{chunk-IPYGSBOY.js → chunk-RPQSFP52.js} +2 -2
  28. package/dist/{chunk-U7KPAZIL.js → chunk-RRVFQN7A.js} +804 -402
  29. package/dist/chunk-RRVFQN7A.js.map +7 -0
  30. package/dist/{chunk-NWDOI5R3.js → chunk-RTIGJSOG.js} +2 -2
  31. package/dist/{chunk-HGYFFC5R.js → chunk-SEYAHQLM.js} +4 -4
  32. package/dist/{chunk-KMD3SYCF.js → chunk-UQT43SRL.js} +1 -1
  33. package/dist/{chunk-5MIVMTW3.js → chunk-UVTCQRSO.js} +1 -1
  34. package/dist/{chunk-NCIN5L25.js → chunk-V5RQSF7R.js} +2 -2
  35. package/dist/{chunk-AVQWE3G4.js → chunk-WEYGVSI3.js} +1 -1
  36. package/dist/{chunk-QLL52LAG.js → chunk-WIEHMZHA.js} +3 -3
  37. package/dist/{chunk-LJLCZUZQ.js → chunk-Z75JN5D5.js} +3 -3
  38. package/dist/{cli-YHG56XUI.js → cli-ARZZZJMR.js} +87 -87
  39. package/dist/commands-N5UWETIS.js +50 -0
  40. package/dist/{config-3A6INLJZ.js → config-YTD2SOEU.js} +4 -4
  41. package/dist/{context-J4OQBUEZ.js → context-Y3W46GSA.js} +6 -6
  42. package/dist/{customCommands-SC4NQGIV.js → customCommands-25ZCNKDR.js} +4 -4
  43. package/dist/{env-CBMMCZZ6.js → env-RIIPJMJB.js} +2 -2
  44. package/dist/{file-GQ5IBHFB.js → file-7HEQVJ73.js} +4 -4
  45. package/dist/index.js +3 -3
  46. package/dist/{llm-7DBQPG47.js → llm-VHGMLUMA.js} +29 -29
  47. package/dist/{llmLazy-X4SJWRZB.js → llmLazy-XKTD2R72.js} +1 -1
  48. package/dist/{loader-42NKTU32.js → loader-XYKXQ4H5.js} +4 -4
  49. package/dist/{lsp-H3QYYNDE.js → lsp-VYNRCIOT.js} +6 -6
  50. package/dist/{lspAnchor-XQDA5ERF.js → lspAnchor-Z763O5JV.js} +6 -6
  51. package/dist/{mcp-5RV6EMTA.js → mcp-LVJ3GFBK.js} +7 -7
  52. package/dist/{mentionProcessor-TEB2ZXF7.js → mentionProcessor-I4DOMLGV.js} +5 -5
  53. package/dist/{messages-6FWGY3DY.js → messages-2QDFFJNL.js} +1 -1
  54. package/dist/{model-ZNDLNOQE.js → model-6SZVFU73.js} +5 -5
  55. package/dist/{openai-Y7VUSKNQ.js → openai-C3ZO5ZGQ.js} +5 -5
  56. package/dist/{outputStyles-Y34AOKLE.js → outputStyles-QYM3GK47.js} +4 -4
  57. package/dist/{pluginRuntime-YTBMPQIP.js → pluginRuntime-ZIW6JAIM.js} +6 -6
  58. package/dist/{pluginValidation-SLHJEVJC.js → pluginValidation-4VYKYFQA.js} +6 -6
  59. package/dist/prompts-M5SGMYVA.js +52 -0
  60. package/dist/{pybAgentSessionLoad-5MNQGC4U.js → pybAgentSessionLoad-6MBKOFXS.js} +4 -4
  61. package/dist/{pybAgentSessionResume-MR2BQPWN.js → pybAgentSessionResume-H7PXL2LX.js} +4 -4
  62. package/dist/{pybAgentStreamJsonSession-T3PUD4KM.js → pybAgentStreamJsonSession-SBEDAJNJ.js} +1 -1
  63. package/dist/{pybHooks-QG5YXBFT.js → pybHooks-GD2MFXKZ.js} +4 -4
  64. package/dist/query-DQOO54O2.js +54 -0
  65. package/dist/{registry-EHXEI6UI.js → registry-YGBXA7SH.js} +5 -5
  66. package/dist/{ripgrep-VDLTL76W.js → ripgrep-VSVJH453.js} +3 -3
  67. package/dist/{skillMarketplace-XDYJSPOO.js → skillMarketplace-LIZJ4ZIQ.js} +3 -3
  68. package/dist/{state-YP6DLLAI.js → state-OQTB4HM4.js} +2 -2
  69. package/dist/{theme-DNTFOIH4.js → theme-RJQIICNA.js} +5 -5
  70. package/dist/{toolPermissionSettings-VDQVUESB.js → toolPermissionSettings-D6JZFF7R.js} +6 -6
  71. package/dist/tools-YPKSRUWZ.js +51 -0
  72. package/dist/{userInput-67MTMZQX.js → userInput-Y4QSHHCF.js} +30 -30
  73. package/package.json +1 -1
  74. package/dist/REPL-25MOGZSA.js +0 -46
  75. package/dist/chunk-U7KPAZIL.js.map +0 -7
  76. package/dist/commands-LZX67TTI.js +0 -50
  77. package/dist/prompts-ZGLENMR6.js +0 -52
  78. package/dist/query-2S5F2BKO.js +0 -54
  79. package/dist/tools-FK2V2NKA.js +0 -51
  80. /package/dist/{REPL-25MOGZSA.js.map → REPL-D2V54PR2.js.map} +0 -0
  81. /package/dist/{acp-E45JJIQK.js.map → acp-6XO6DZ4K.js.map} +0 -0
  82. /package/dist/{agentsValidate-WCLJMUFS.js.map → agentsValidate-N6USTEX6.js.map} +0 -0
  83. /package/dist/{ask-D5QONKUC.js.map → ask-U7Z3DDMS.js.map} +0 -0
  84. /package/dist/{autoUpdater-6HCYR35P.js.map → autoUpdater-SKABKEDG.js.map} +0 -0
  85. /package/dist/{chunk-7IR32BFP.js.map → chunk-2EAKAXE7.js.map} +0 -0
  86. /package/dist/{chunk-ZEVLVZLV.js.map → chunk-3C6TCPTK.js.map} +0 -0
  87. /package/dist/{chunk-KENEMSOE.js.map → chunk-56F6HFV3.js.map} +0 -0
  88. /package/dist/{chunk-EKSPNQLL.js.map → chunk-7MDERGB4.js.map} +0 -0
  89. /package/dist/{chunk-264EIILY.js.map → chunk-7OTUXO44.js.map} +0 -0
  90. /package/dist/{chunk-CJ2ZE3PW.js.map → chunk-7SI5GFRV.js.map} +0 -0
  91. /package/dist/{chunk-QIRPIHNE.js.map → chunk-7XB7B6Z4.js.map} +0 -0
  92. /package/dist/{chunk-3CJMCNQV.js.map → chunk-BZP4S26C.js.map} +0 -0
  93. /package/dist/{chunk-TPUJUEOD.js.map → chunk-E5ITVDNO.js.map} +0 -0
  94. /package/dist/{chunk-LLRVPQKM.js.map → chunk-EV3XWHXP.js.map} +0 -0
  95. /package/dist/{chunk-YSIDSO2P.js.map → chunk-F3GKVQH4.js.map} +0 -0
  96. /package/dist/{chunk-7LTWIP6N.js.map → chunk-FVVMATKZ.js.map} +0 -0
  97. /package/dist/{chunk-OEDCAG3L.js.map → chunk-GJ5MQLQW.js.map} +0 -0
  98. /package/dist/{chunk-4I2D2KFY.js.map → chunk-IEYYJQSN.js.map} +0 -0
  99. /package/dist/{chunk-PRLW2R2R.js.map → chunk-KHHFZVFT.js.map} +0 -0
  100. /package/dist/{chunk-EF34UHUH.js.map → chunk-M7TC4PYX.js.map} +0 -0
  101. /package/dist/{chunk-HALXVKBG.js.map → chunk-N4XJF5KW.js.map} +0 -0
  102. /package/dist/{chunk-6G4MUNBC.js.map → chunk-PTFRX47Q.js.map} +0 -0
  103. /package/dist/{chunk-O6TECK56.js.map → chunk-QLOVB5WV.js.map} +0 -0
  104. /package/dist/{chunk-IPYGSBOY.js.map → chunk-RPQSFP52.js.map} +0 -0
  105. /package/dist/{chunk-NWDOI5R3.js.map → chunk-RTIGJSOG.js.map} +0 -0
  106. /package/dist/{chunk-HGYFFC5R.js.map → chunk-SEYAHQLM.js.map} +0 -0
  107. /package/dist/{chunk-KMD3SYCF.js.map → chunk-UQT43SRL.js.map} +0 -0
  108. /package/dist/{chunk-5MIVMTW3.js.map → chunk-UVTCQRSO.js.map} +0 -0
  109. /package/dist/{chunk-NCIN5L25.js.map → chunk-V5RQSF7R.js.map} +0 -0
  110. /package/dist/{chunk-AVQWE3G4.js.map → chunk-WEYGVSI3.js.map} +0 -0
  111. /package/dist/{chunk-QLL52LAG.js.map → chunk-WIEHMZHA.js.map} +0 -0
  112. /package/dist/{chunk-LJLCZUZQ.js.map → chunk-Z75JN5D5.js.map} +0 -0
  113. /package/dist/{cli-YHG56XUI.js.map → cli-ARZZZJMR.js.map} +0 -0
  114. /package/dist/{commands-LZX67TTI.js.map → commands-N5UWETIS.js.map} +0 -0
  115. /package/dist/{config-3A6INLJZ.js.map → config-YTD2SOEU.js.map} +0 -0
  116. /package/dist/{context-J4OQBUEZ.js.map → context-Y3W46GSA.js.map} +0 -0
  117. /package/dist/{customCommands-SC4NQGIV.js.map → customCommands-25ZCNKDR.js.map} +0 -0
  118. /package/dist/{env-CBMMCZZ6.js.map → env-RIIPJMJB.js.map} +0 -0
  119. /package/dist/{file-GQ5IBHFB.js.map → file-7HEQVJ73.js.map} +0 -0
  120. /package/dist/{llm-7DBQPG47.js.map → llm-VHGMLUMA.js.map} +0 -0
  121. /package/dist/{llmLazy-X4SJWRZB.js.map → llmLazy-XKTD2R72.js.map} +0 -0
  122. /package/dist/{loader-42NKTU32.js.map → loader-XYKXQ4H5.js.map} +0 -0
  123. /package/dist/{lsp-H3QYYNDE.js.map → lsp-VYNRCIOT.js.map} +0 -0
  124. /package/dist/{lspAnchor-XQDA5ERF.js.map → lspAnchor-Z763O5JV.js.map} +0 -0
  125. /package/dist/{mcp-5RV6EMTA.js.map → mcp-LVJ3GFBK.js.map} +0 -0
  126. /package/dist/{mentionProcessor-TEB2ZXF7.js.map → mentionProcessor-I4DOMLGV.js.map} +0 -0
  127. /package/dist/{messages-6FWGY3DY.js.map → messages-2QDFFJNL.js.map} +0 -0
  128. /package/dist/{model-ZNDLNOQE.js.map → model-6SZVFU73.js.map} +0 -0
  129. /package/dist/{openai-Y7VUSKNQ.js.map → openai-C3ZO5ZGQ.js.map} +0 -0
  130. /package/dist/{outputStyles-Y34AOKLE.js.map → outputStyles-QYM3GK47.js.map} +0 -0
  131. /package/dist/{pluginRuntime-YTBMPQIP.js.map → pluginRuntime-ZIW6JAIM.js.map} +0 -0
  132. /package/dist/{pluginValidation-SLHJEVJC.js.map → pluginValidation-4VYKYFQA.js.map} +0 -0
  133. /package/dist/{prompts-ZGLENMR6.js.map → prompts-M5SGMYVA.js.map} +0 -0
  134. /package/dist/{pybAgentSessionLoad-5MNQGC4U.js.map → pybAgentSessionLoad-6MBKOFXS.js.map} +0 -0
  135. /package/dist/{pybAgentSessionResume-MR2BQPWN.js.map → pybAgentSessionResume-H7PXL2LX.js.map} +0 -0
  136. /package/dist/{pybAgentStreamJsonSession-T3PUD4KM.js.map → pybAgentStreamJsonSession-SBEDAJNJ.js.map} +0 -0
  137. /package/dist/{pybHooks-QG5YXBFT.js.map → pybHooks-GD2MFXKZ.js.map} +0 -0
  138. /package/dist/{query-2S5F2BKO.js.map → query-DQOO54O2.js.map} +0 -0
  139. /package/dist/{registry-EHXEI6UI.js.map → registry-YGBXA7SH.js.map} +0 -0
  140. /package/dist/{ripgrep-VDLTL76W.js.map → ripgrep-VSVJH453.js.map} +0 -0
  141. /package/dist/{skillMarketplace-XDYJSPOO.js.map → skillMarketplace-LIZJ4ZIQ.js.map} +0 -0
  142. /package/dist/{state-YP6DLLAI.js.map → state-OQTB4HM4.js.map} +0 -0
  143. /package/dist/{theme-DNTFOIH4.js.map → theme-RJQIICNA.js.map} +0 -0
  144. /package/dist/{toolPermissionSettings-VDQVUESB.js.map → toolPermissionSettings-D6JZFF7R.js.map} +0 -0
  145. /package/dist/{tools-FK2V2NKA.js.map → tools-YPKSRUWZ.js.map} +0 -0
  146. /package/dist/{userInput-67MTMZQX.js.map → userInput-Y4QSHHCF.js.map} +0 -0
@@ -3,18 +3,18 @@ const require = __pybCreateRequire(import.meta.url);
3
3
  import {
4
4
  formatValidationResult,
5
5
  validatePluginOrMarketplacePath
6
- } from "./chunk-QLL52LAG.js";
6
+ } from "./chunk-WIEHMZHA.js";
7
7
  import {
8
8
  loadPybAgentSessionMessages
9
- } from "./chunk-CJ2ZE3PW.js";
9
+ } from "./chunk-7SI5GFRV.js";
10
10
  import {
11
11
  listPybAgentSessions
12
- } from "./chunk-KMD3SYCF.js";
12
+ } from "./chunk-UQT43SRL.js";
13
13
  import {
14
14
  appendSessionCustomTitleRecord,
15
15
  appendSessionJsonlFromMessage,
16
16
  appendSessionTagRecord
17
- } from "./chunk-KENEMSOE.js";
17
+ } from "./chunk-56F6HFV3.js";
18
18
  import {
19
19
  drainHookSystemPromptAdditions,
20
20
  getHookTranscriptPath,
@@ -26,7 +26,7 @@ import {
26
26
  runStopHooks,
27
27
  runUserPromptSubmitHooks,
28
28
  updateHookTranscriptForMessages
29
- } from "./chunk-7LTWIP6N.js";
29
+ } from "./chunk-FVVMATKZ.js";
30
30
  import {
31
31
  DEFAULT_OUTPUT_STYLE,
32
32
  getAvailableOutputStyles,
@@ -35,17 +35,17 @@ import {
35
35
  getOutputStyleSystemPromptAdditions,
36
36
  resolveOutputStyleName,
37
37
  setCurrentOutputStyle
38
- } from "./chunk-NWDOI5R3.js";
38
+ } from "./chunk-RTIGJSOG.js";
39
39
  import {
40
40
  fetchCustomModels,
41
41
  getModelFeatures,
42
42
  getSessionState
43
- } from "./chunk-ZEVLVZLV.js";
43
+ } from "./chunk-3C6TCPTK.js";
44
44
  import {
45
45
  queryLLM,
46
46
  queryQuick,
47
47
  verifyApiKey
48
- } from "./chunk-EF34UHUH.js";
48
+ } from "./chunk-M7TC4PYX.js";
49
49
  import {
50
50
  DEFAULT_TIMEOUT_MS,
51
51
  FallbackToolUseRejectedMessage,
@@ -59,7 +59,7 @@ import {
59
59
  listMCPServers,
60
60
  loadMergedSettings,
61
61
  normalizeSandboxRuntimeConfigFromSettings
62
- } from "./chunk-7IR32BFP.js";
62
+ } from "./chunk-2EAKAXE7.js";
63
63
  import {
64
64
  addMarketplace,
65
65
  disableSkillPlugin,
@@ -72,11 +72,11 @@ import {
72
72
  refreshMarketplaceAsync,
73
73
  removeMarketplace,
74
74
  uninstallSkillPlugin
75
- } from "./chunk-EKSPNQLL.js";
75
+ } from "./chunk-7MDERGB4.js";
76
76
  import {
77
77
  loadToolPermissionContextFromDisk,
78
78
  persistToolPermissionUpdateToDisk
79
- } from "./chunk-HALXVKBG.js";
79
+ } from "./chunk-N4XJF5KW.js";
80
80
  import {
81
81
  applyToolPermissionContextUpdate,
82
82
  applyToolPermissionContextUpdates,
@@ -87,13 +87,13 @@ import {
87
87
  generateSystemReminders,
88
88
  resetReminderSession,
89
89
  systemReminderService
90
- } from "./chunk-NCIN5L25.js";
90
+ } from "./chunk-V5RQSF7R.js";
91
91
  import {
92
92
  clearAgentCache,
93
93
  getActiveAgents,
94
94
  getAgentByType,
95
95
  getAllAgents
96
- } from "./chunk-IPYGSBOY.js";
96
+ } from "./chunk-RPQSFP52.js";
97
97
  import {
98
98
  API_ERROR_MESSAGE_PREFIX,
99
99
  CANCEL_MESSAGE,
@@ -124,7 +124,7 @@ import {
124
124
  processUserInput,
125
125
  reorderMessages,
126
126
  stripSystemMessages
127
- } from "./chunk-5MIVMTW3.js";
127
+ } from "./chunk-UVTCQRSO.js";
128
128
  import {
129
129
  getRequestStatus,
130
130
  setRequestStatus,
@@ -154,7 +154,7 @@ import {
154
154
  normalizeFilePath,
155
155
  readTextContent,
156
156
  writeTextContent
157
- } from "./chunk-QIRPIHNE.js";
157
+ } from "./chunk-7XB7B6Z4.js";
158
158
  import {
159
159
  parseBlockEdits
160
160
  } from "./chunk-QWIBSCDN.js";
@@ -164,18 +164,18 @@ import {
164
164
  ParserRegistry,
165
165
  initParser,
166
166
  loadLanguage
167
- } from "./chunk-4I2D2KFY.js";
167
+ } from "./chunk-IEYYJQSN.js";
168
168
  import {
169
169
  getSettingsFileCandidates,
170
170
  loadSettingsWithLegacyFallback,
171
171
  readSettingsFile
172
- } from "./chunk-AVQWE3G4.js";
172
+ } from "./chunk-WEYGVSI3.js";
173
173
  import {
174
174
  getCustomCommandDirectories,
175
175
  hasCustomCommands,
176
176
  loadCustomCommands,
177
177
  reloadCustomCommands
178
- } from "./chunk-TPUJUEOD.js";
178
+ } from "./chunk-E5ITVDNO.js";
179
179
  import {
180
180
  getSessionPlugins
181
181
  } from "./chunk-BJSWTHRM.js";
@@ -183,7 +183,7 @@ import {
183
183
  ModelManager,
184
184
  getModelManager,
185
185
  isDefaultSlowAndCapableModel
186
- } from "./chunk-264EIILY.js";
186
+ } from "./chunk-7OTUXO44.js";
187
187
  import {
188
188
  getCodeStyle,
189
189
  getContext,
@@ -191,13 +191,13 @@ import {
191
191
  getIsGit,
192
192
  getProjectDocs,
193
193
  getProjectStructureStatisticsBlock
194
- } from "./chunk-HGYFFC5R.js";
194
+ } from "./chunk-SEYAHQLM.js";
195
195
  import {
196
196
  ripGrep
197
- } from "./chunk-6G4MUNBC.js";
197
+ } from "./chunk-PTFRX47Q.js";
198
198
  import {
199
199
  getTheme
200
- } from "./chunk-LLRVPQKM.js";
200
+ } from "./chunk-EV3XWHXP.js";
201
201
  import {
202
202
  DEFAULT_GLOBAL_CONFIG,
203
203
  enableConfigs,
@@ -210,7 +210,7 @@ import {
210
210
  saveGlobalConfig,
211
211
  setAllPointersToModel,
212
212
  setModelPointer
213
- } from "./chunk-3CJMCNQV.js";
213
+ } from "./chunk-BZP4S26C.js";
214
214
  import {
215
215
  AbortError
216
216
  } from "./chunk-RQVLBMP7.js";
@@ -219,7 +219,7 @@ import {
219
219
  getCurrentRequest,
220
220
  logUserFriendly,
221
221
  markPhase
222
- } from "./chunk-O6TECK56.js";
222
+ } from "./chunk-QLOVB5WV.js";
223
223
  import {
224
224
  ASCII_LOGO,
225
225
  BunShell,
@@ -260,10 +260,10 @@ import {
260
260
  setCwd,
261
261
  shouldApplyToolOutputTruncation,
262
262
  truncateToolOutput
263
- } from "./chunk-PRLW2R2R.js";
263
+ } from "./chunk-KHHFZVFT.js";
264
264
  import {
265
265
  MACRO
266
- } from "./chunk-J42DBIOK.js";
266
+ } from "./chunk-QFHNNIRB.js";
267
267
  import {
268
268
  __export
269
269
  } from "./chunk-I3J4JYES.js";
@@ -272,7 +272,7 @@ import {
272
272
  import { statSync as statSync13 } from "fs";
273
273
  import { EOL as EOL3 } from "os";
274
274
  import { isAbsolute as isAbsolute8, relative as relative12, resolve as resolve10 } from "path";
275
- import * as React110 from "react";
275
+ import * as React111 from "react";
276
276
  import { z as z15 } from "zod";
277
277
 
278
278
  // src/utils/commands/index.ts
@@ -444,7 +444,7 @@ var getCommandSubcommandPrefix = memoize(
444
444
  var getCommandPrefix = memoize(
445
445
  async (command4, abortSignal) => {
446
446
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
447
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-7DBQPG47.js");
447
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-VHGMLUMA.js");
448
448
  const response = await queryQuick2({
449
449
  systemPrompt,
450
450
  userPrompt,
@@ -4246,7 +4246,7 @@ function formatParseError(error) {
4246
4246
  return error instanceof Error ? error.message : String(error);
4247
4247
  }
4248
4248
  async function defaultGateQuery(args) {
4249
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-7DBQPG47.js");
4249
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-VHGMLUMA.js");
4250
4250
  const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
4251
4251
  const messages = [
4252
4252
  {
@@ -4654,12 +4654,34 @@ Usage notes:
4654
4654
  - The URL must be a fully-formed valid URL
4655
4655
  - HTTP URLs will be automatically upgraded to HTTPS
4656
4656
  - The prompt should describe what information you want to extract from the page
4657
- - Format options: "markdown" (default), "text", or "html"
4657
+ - Format options: "markdown", "text", or "html" (choose based on your intent)
4658
4658
  - Timeout is optional and defaults to 30 seconds
4659
4659
  - This tool is read-only and does not modify any files
4660
4660
  - Results may be summarized if the content is very large
4661
4661
  - Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
4662
4662
  - When a URL redirects to a different host, the tool will inform you and provide the redirect URL in a special format. You should then make a new WebFetch request with the redirect URL to fetch the content.
4663
+
4664
+ Requested Format Behavior Examples:
4665
+ --Same HTML Input HTML
4666
+ <article>
4667
+ <h1>Title</h1>
4668
+ <p>Hello <a href="https://example.com">link</a></p>
4669
+ <ul><li>One</li><li>Two</li></ul>
4670
+ </article>
4671
+ --html
4672
+
4673
+ 1\uFF1Aformat: "markdown" \u2192 preserves structure (headings/lists/links) for readable summaries and structured quoting:
4674
+ # Title
4675
+ Hello [link](https://example.com)
4676
+ - One
4677
+ - Two
4678
+ 2\uFF1Aformat: "text" \u2192 plain text only, removes all markup and links to minimize noise:
4679
+ Title
4680
+ Hello link
4681
+ One
4682
+ Two
4683
+ 3\uFF1Aformat: "html" \u2192 cleaned HTML, keeps tags but removes scripts/styles/extra chrome:
4684
+ <article><h1>Title</h1><p>Hello <a href="https://example.com">link</a></p><ul><li>One</li><li>Two</li></ul></article>
4663
4685
  `.trim();
4664
4686
 
4665
4687
  // src/tools/network/WebFetchTool/htmlToMarkdown.ts
@@ -4754,6 +4776,8 @@ var inputSchema = z.strictObject({
4754
4776
  timeout: z.number().optional().describe("Timeout in seconds (default: 30)")
4755
4777
  });
4756
4778
  var FETCH_TIMEOUT_MS = 3e4;
4779
+ var CONNECT_TIMEOUT_MS = 5e3;
4780
+ var ANALYSIS_TIMEOUT_MS = 15e3;
4757
4781
  var MAX_TIMEOUT_MS = 12e4;
4758
4782
  var MAX_URL_LENGTH = 2e3;
4759
4783
  var MAX_RESPONSE_BYTES = 5 * 1024 * 1024;
@@ -4780,6 +4804,25 @@ function normalizeUrl(url2) {
4780
4804
  function normalizeHostname(hostname) {
4781
4805
  return hostname.replace(/^www\./i, "").toLowerCase();
4782
4806
  }
4807
+ var AnalysisTimeoutError = class extends Error {
4808
+ constructor() {
4809
+ super("Analysis timeout");
4810
+ }
4811
+ };
4812
+ function classifyAnalysisError(error) {
4813
+ if (error instanceof AnalysisTimeoutError) {
4814
+ return "\u5206\u6790\u8D85\u65F6";
4815
+ }
4816
+ const message = error instanceof Error ? error.message : String(error || "");
4817
+ const lower = message.toLowerCase();
4818
+ if (lower.includes("401") || lower.includes("403") || lower.includes("429") || lower.includes("rate limit")) {
4819
+ return "\u5206\u6790\u9274\u6743\u6216\u9650\u6D41";
4820
+ }
4821
+ if (lower.includes("fetch") || lower.includes("network") || lower.includes("econnreset") || lower.includes("enotfound") || lower.includes("eai_again") || lower.includes("etimedout") || lower.includes("econnrefused")) {
4822
+ return "\u5206\u6790\u7F51\u7EDC\u5F02\u5E38";
4823
+ }
4824
+ return "\u5206\u6790\u5931\u8D25";
4825
+ }
4783
4826
  function isSameHost(originalUrl, redirectUrl) {
4784
4827
  try {
4785
4828
  const original = new URL(originalUrl);
@@ -4792,7 +4835,7 @@ function isSameHost(originalUrl, redirectUrl) {
4792
4835
  return false;
4793
4836
  }
4794
4837
  }
4795
- function createTimeoutSignal(parent, timeoutMs) {
4838
+ function createTimeoutSignal(parent, timeoutMs, onTimeout) {
4796
4839
  const controller = new AbortController();
4797
4840
  const onAbort = () => controller.abort();
4798
4841
  if (parent.aborted) {
@@ -4800,7 +4843,10 @@ function createTimeoutSignal(parent, timeoutMs) {
4800
4843
  } else {
4801
4844
  parent.addEventListener("abort", onAbort, { once: true });
4802
4845
  }
4803
- const timeout = setTimeout(() => controller.abort(), timeoutMs);
4846
+ const timeout = setTimeout(() => {
4847
+ if (onTimeout) onTimeout();
4848
+ controller.abort();
4849
+ }, timeoutMs);
4804
4850
  return {
4805
4851
  signal: controller.signal,
4806
4852
  cleanup: () => {
@@ -4921,23 +4967,37 @@ ${allowBroaderQuoting ? "Provide a concise response based on the content above.
4921
4967
  - Never produce or reproduce exact song lyrics.`}
4922
4968
  `;
4923
4969
  }
4924
- async function fetchWithRedirectDetection(url2, signal) {
4970
+ async function fetchWithRedirectDetection(url2, signal, connectTimeoutMs) {
4925
4971
  let current = url2;
4926
4972
  for (let i = 0; i < 10; i++) {
4927
- const response2 = await fetch(current, {
4928
- method: "GET",
4929
- headers: {
4930
- "User-Agent": "Mozilla/5.0 (compatible; WebFetch/1.0)",
4931
- Accept: "text/markdown, text/html, */*",
4932
- "Accept-Language": "en-US,en;q=0.5"
4933
- },
4934
- signal,
4935
- redirect: "manual"
4973
+ let connectTimeoutTriggered2 = false;
4974
+ const connectTimeout2 = createTimeoutSignal(signal, connectTimeoutMs, () => {
4975
+ connectTimeoutTriggered2 = true;
4936
4976
  });
4937
- if ([301, 302, 307, 308].includes(response2.status)) {
4938
- const location = response2.headers.get("location");
4977
+ let response;
4978
+ try {
4979
+ response = await fetch(current, {
4980
+ method: "GET",
4981
+ headers: {
4982
+ "User-Agent": "Mozilla/5.0 (compatible; WebFetch/1.0)",
4983
+ Accept: "text/markdown, text/html, */*",
4984
+ "Accept-Language": "en-US,en;q=0.5"
4985
+ },
4986
+ signal: connectTimeout2.signal,
4987
+ redirect: "manual"
4988
+ });
4989
+ } catch (error) {
4990
+ if (connectTimeoutTriggered2) {
4991
+ throw new Error(`Connection timeout while fetching ${current}\uFF08\u4E0D\u53EF\u8FBE\uFF09`);
4992
+ }
4993
+ throw error;
4994
+ } finally {
4995
+ connectTimeout2.cleanup();
4996
+ }
4997
+ if ([301, 302, 307, 308].includes(response.status)) {
4998
+ const location = response.headers.get("location");
4939
4999
  if (!location) {
4940
- return { type: "response", response: response2, finalUrl: current };
5000
+ return { type: "response", response, finalUrl: current };
4941
5001
  }
4942
5002
  const redirectUrl = new URL(location, current).toString();
4943
5003
  if (isSameHost(current, redirectUrl)) {
@@ -4948,13 +5008,26 @@ async function fetchWithRedirectDetection(url2, signal) {
4948
5008
  type: "redirect",
4949
5009
  originalUrl: url2,
4950
5010
  redirectUrl,
4951
- statusCode: response2.status
5011
+ statusCode: response.status
4952
5012
  };
4953
5013
  }
4954
- return { type: "response", response: response2, finalUrl: current };
5014
+ return { type: "response", response, finalUrl: current };
5015
+ }
5016
+ let connectTimeoutTriggered = false;
5017
+ const connectTimeout = createTimeoutSignal(signal, connectTimeoutMs, () => {
5018
+ connectTimeoutTriggered = true;
5019
+ });
5020
+ try {
5021
+ const response = await fetch(current, { signal: connectTimeout.signal });
5022
+ return { type: "response", response, finalUrl: current };
5023
+ } catch (error) {
5024
+ if (connectTimeoutTriggered) {
5025
+ throw new Error(`Connection timeout while fetching ${current}\uFF08\u4E0D\u53EF\u8FBE\uFF09`);
5026
+ }
5027
+ throw error;
5028
+ } finally {
5029
+ connectTimeout.cleanup();
4955
5030
  }
4956
- const response = await fetch(current, { signal });
4957
- return { type: "response", response, finalUrl: current };
4958
5031
  }
4959
5032
  var WebFetchTool = {
4960
5033
  name: TOOL_NAME_FOR_PROMPT,
@@ -5040,9 +5113,14 @@ ${output.result}`;
5040
5113
  context.abortController.signal,
5041
5114
  timeoutSeconds * 1e3
5042
5115
  );
5116
+ const connectTimeoutMs = Math.min(CONNECT_TIMEOUT_MS, timeoutSeconds * 1e3);
5043
5117
  try {
5044
5118
  const cached = urlCache.get(normalizedUrl);
5045
- const fetched = cached ? null : await fetchWithRedirectDetection(normalizedUrl, timeoutSignal.signal);
5119
+ const fetched = cached ? null : await fetchWithRedirectDetection(
5120
+ normalizedUrl,
5121
+ timeoutSignal.signal,
5122
+ connectTimeoutMs
5123
+ );
5046
5124
  if (fetched && fetched.type === "redirect") {
5047
5125
  const codeText2 = fetched.statusCode === 301 ? "Moved Permanently" : fetched.statusCode === 308 ? "Permanent Redirect" : fetched.statusCode === 307 ? "Temporary Redirect" : "Found";
5048
5126
  const result2 = `REDIRECT DETECTED: The URL redirects to a different host.
@@ -5110,14 +5188,41 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
5110
5188
  prompt,
5111
5189
  allowBroaderQuoting
5112
5190
  );
5113
- const aiResponse = await queryQuick({
5114
- systemPrompt: [],
5115
- userPrompt,
5116
- enablePromptCaching: false,
5117
- signal: timeoutSignal.signal
5118
- });
5119
- result = aiResponse.message.content[0]?.text || "No response from model";
5120
- mode = "analysis";
5191
+ let analysisTimeoutTriggered = false;
5192
+ const analysisSignal = createTimeoutSignal(
5193
+ timeoutSignal.signal,
5194
+ ANALYSIS_TIMEOUT_MS,
5195
+ () => {
5196
+ analysisTimeoutTriggered = true;
5197
+ }
5198
+ );
5199
+ try {
5200
+ const aiResponse = await queryQuick({
5201
+ systemPrompt: [],
5202
+ userPrompt,
5203
+ enablePromptCaching: false,
5204
+ signal: analysisSignal.signal
5205
+ });
5206
+ const analysisText = aiResponse.message.content[0]?.text || "";
5207
+ if (!analysisText.trim()) {
5208
+ const reason = "\u5206\u6790\u65E0\u5185\u5BB9";
5209
+ result = `\u3010\u5206\u6790\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u539F\u6587\u3011${reason}
5210
+
5211
+ ${formatted}`;
5212
+ mode = "analysis";
5213
+ } else {
5214
+ result = analysisText;
5215
+ mode = "analysis";
5216
+ }
5217
+ } catch (error) {
5218
+ const reason = analysisTimeoutTriggered ? "\u5206\u6790\u8D85\u65F6" : classifyAnalysisError(error);
5219
+ result = `\u3010\u5206\u6790\u5931\u8D25\uFF0C\u5DF2\u56DE\u9000\u539F\u6587\u3011${reason}
5220
+
5221
+ ${formatted}`;
5222
+ mode = "analysis";
5223
+ } finally {
5224
+ analysisSignal.cleanup();
5225
+ }
5121
5226
  }
5122
5227
  const output = {
5123
5228
  bytes,
@@ -5160,8 +5265,8 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
5160
5265
  };
5161
5266
 
5162
5267
  // src/ui/components/permissions/web-fetch-permission-request/WebFetchPermissionRequest.tsx
5163
- import { Box as Box80, Text as Text84, useInput as useInput31 } from "ink";
5164
- import React109, { useMemo as useMemo28 } from "react";
5268
+ import { Box as Box81, Text as Text85, useInput as useInput31 } from "ink";
5269
+ import React110, { useMemo as useMemo28 } from "react";
5165
5270
  import chalk16 from "chalk";
5166
5271
 
5167
5272
  // src/ui/components/custom-select/select.tsx
@@ -6538,7 +6643,7 @@ var FileEditTool = {
6538
6643
  const originalFileContent = currentFileContent;
6539
6644
  let totalPatch = [];
6540
6645
  const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
6541
- const { findLspAnchor } = await import("./lspAnchor-XQDA5ERF.js");
6646
+ const { findLspAnchor } = await import("./lspAnchor-Z763O5JV.js");
6542
6647
  for (const op of editOperations) {
6543
6648
  const normalizedSearch = normalizeLineEndings(op.search);
6544
6649
  const normalizedReplace = normalizeLineEndings(op.replace);
@@ -8804,7 +8909,7 @@ var WebSearchTool = {
8804
8909
 
8805
8910
  // src/tools/interaction/SlashCommandTool/SlashCommandTool.tsx
8806
8911
  import { z as z13 } from "zod";
8807
- import * as React107 from "react";
8912
+ import * as React108 from "react";
8808
8913
 
8809
8914
  // src/ui/components/Bug.tsx
8810
8915
  import { Box as Box17, Text as Text19, useInput as useInput5 } from "ink";
@@ -11173,7 +11278,7 @@ async function createAndStoreApiKey(accessToken) {
11173
11278
  }
11174
11279
  saveGlobalConfig(config2);
11175
11280
  try {
11176
- const { resetAnthropicClient } = await import("./llm-7DBQPG47.js");
11281
+ const { resetAnthropicClient } = await import("./llm-VHGMLUMA.js");
11177
11282
  resetAnthropicClient();
11178
11283
  } catch {
11179
11284
  }
@@ -15540,7 +15645,7 @@ async function refreshPluginRuntimeFromInstalls() {
15540
15645
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
15541
15646
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
15542
15647
  if (dirs.length === 0) return [];
15543
- const { configureSessionPlugins } = await import("./pluginRuntime-YTBMPQIP.js");
15648
+ const { configureSessionPlugins } = await import("./pluginRuntime-ZIW6JAIM.js");
15544
15649
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
15545
15650
  return errors;
15546
15651
  }
@@ -16209,7 +16314,7 @@ async function call(onDone, context) {
16209
16314
  ModelConfig,
16210
16315
  {
16211
16316
  onClose: () => {
16212
- import("./model-ZNDLNOQE.js").then(({ reloadModelManager: reloadModelManager2 }) => {
16317
+ import("./model-6SZVFU73.js").then(({ reloadModelManager: reloadModelManager2 }) => {
16213
16318
  reloadModelManager2();
16214
16319
  triggerModelConfigChange();
16215
16320
  onDone();
@@ -17343,14 +17448,14 @@ async function call2(onDone, context) {
17343
17448
  }
17344
17449
 
17345
17450
  // src/commands/resume.tsx
17346
- import * as React104 from "react";
17451
+ import * as React105 from "react";
17347
17452
 
17348
17453
  // src/ui/screens/ResumeConversation.tsx
17349
- import React103 from "react";
17454
+ import React104 from "react";
17350
17455
  import { render } from "ink";
17351
17456
 
17352
17457
  // src/ui/screens/REPL.tsx
17353
- import { Box as Box76, Newline as Newline4, Static as Static2 } from "ink";
17458
+ import { Box as Box77, Newline as Newline4, Static as Static2 } from "ink";
17354
17459
 
17355
17460
  // src/ui/components/CostThresholdDialog.tsx
17356
17461
  import { Box as Box37, Text as Text42, useInput as useInput17 } from "ink";
@@ -17403,7 +17508,7 @@ function CostThresholdDialog({ onDone }) {
17403
17508
  }
17404
17509
 
17405
17510
  // src/ui/screens/REPL.tsx
17406
- import * as React101 from "react";
17511
+ import * as React102 from "react";
17407
17512
  import { useEffect as useEffect26, useMemo as useMemo26, useRef as useRef13, useState as useState28, useCallback as useCallback16 } from "react";
17408
17513
 
17409
17514
  // src/ui/components/Message.tsx
@@ -19657,15 +19762,29 @@ function TaskPanel({
19657
19762
  }), hidden.length > 0 ? /* @__PURE__ */ React74.createElement(Text59, null, "\u2026 +", hiddenPending > 0 ? hiddenPending : hidden.length, " pending") : null);
19658
19763
  }
19659
19764
 
19765
+ // src/ui/components/QueuedMessageList.tsx
19766
+ import { Box as Box55, Text as Text60 } from "ink";
19767
+ import React75 from "react";
19768
+ function QueuedMessageList({ items }) {
19769
+ if (items.length === 0) return null;
19770
+ return /* @__PURE__ */ React75.createElement(Box55, { flexDirection: "column", width: "100%" }, items.map((item) => /* @__PURE__ */ React75.createElement(Box55, { key: item.id, width: "100%" }, /* @__PURE__ */ React75.createElement(Text60, { backgroundColor: "white", color: "black" }, item.content))));
19771
+ }
19772
+ function QueuedHintLine({
19773
+ show
19774
+ }) {
19775
+ if (!show) return null;
19776
+ return /* @__PURE__ */ React75.createElement(Box55, { paddingLeft: 2, paddingRight: 2 }, /* @__PURE__ */ React75.createElement(Text60, { dimColor: true }, "Press up to edit queued messages"));
19777
+ }
19778
+
19660
19779
  // src/ui/components/permissions/PermissionRequest.tsx
19661
19780
  import { useInput as useInput25 } from "ink";
19662
- import * as React92 from "react";
19781
+ import * as React93 from "react";
19663
19782
 
19664
19783
  // src/ui/components/permissions/file-edit-permission-request/FileEditPermissionRequest.tsx
19665
19784
  import chalk7 from "chalk";
19666
- import { Box as Box57, Text as Text62, useInput as useInput19 } from "ink";
19785
+ import { Box as Box58, Text as Text63, useInput as useInput19 } from "ink";
19667
19786
  import { basename, dirname as dirname5, extname as extname6 } from "path";
19668
- import React77, { useCallback as useCallback8, useMemo as useMemo15 } from "react";
19787
+ import React78, { useCallback as useCallback8, useMemo as useMemo15 } from "react";
19669
19788
 
19670
19789
  // src/ui/hooks/usePermissionRequestLogging.ts
19671
19790
  import { useEffect as useEffect17 } from "react";
@@ -19693,8 +19812,8 @@ function usePermissionRequestLogging(toolUseConfirm, unaryEvent) {
19693
19812
  }
19694
19813
 
19695
19814
  // src/ui/components/permissions/PermissionRequestTitle.tsx
19696
- import * as React75 from "react";
19697
- import { Box as Box55, Text as Text60 } from "ink";
19815
+ import * as React76 from "react";
19816
+ import { Box as Box56, Text as Text61 } from "ink";
19698
19817
  function categoryForRiskScore(riskScore) {
19699
19818
  return riskScore >= 70 ? "high" : riskScore >= 30 ? "moderate" : "low";
19700
19819
  }
@@ -19729,20 +19848,20 @@ function PermissionRiskScore({
19729
19848
  riskScore
19730
19849
  }) {
19731
19850
  const category = categoryForRiskScore(riskScore);
19732
- return /* @__PURE__ */ React75.createElement(Text60, { color: textColorForRiskScore(riskScore) }, "Risk: ", category);
19851
+ return /* @__PURE__ */ React76.createElement(Text61, { color: textColorForRiskScore(riskScore) }, "Risk: ", category);
19733
19852
  }
19734
19853
  function PermissionRequestTitle({
19735
19854
  title,
19736
19855
  riskScore
19737
19856
  }) {
19738
- return /* @__PURE__ */ React75.createElement(Box55, { flexDirection: "column" }, /* @__PURE__ */ React75.createElement(Text60, { bold: true, color: getTheme().permission }, title), riskScore !== null && /* @__PURE__ */ React75.createElement(PermissionRiskScore, { riskScore }));
19857
+ return /* @__PURE__ */ React76.createElement(Box56, { flexDirection: "column" }, /* @__PURE__ */ React76.createElement(Text61, { bold: true, color: getTheme().permission }, title), riskScore !== null && /* @__PURE__ */ React76.createElement(PermissionRiskScore, { riskScore }));
19739
19858
  }
19740
19859
 
19741
19860
  // src/ui/components/permissions/file-edit-permission-request/FileEditToolDiff.tsx
19742
- import * as React76 from "react";
19861
+ import * as React77 from "react";
19743
19862
  import { existsSync as existsSync10, readFileSync as readFileSync7 } from "fs";
19744
19863
  import { useMemo as useMemo14 } from "react";
19745
- import { Box as Box56, Text as Text61 } from "ink";
19864
+ import { Box as Box57, Text as Text62 } from "ink";
19746
19865
  import { relative as relative10 } from "path";
19747
19866
  function FileEditToolDiff({
19748
19867
  file_path,
@@ -19765,17 +19884,17 @@ function FileEditToolDiff({
19765
19884
  }),
19766
19885
  [file_path, file, old_string, new_string]
19767
19886
  );
19768
- return /* @__PURE__ */ React76.createElement(Box56, { flexDirection: "column" }, /* @__PURE__ */ React76.createElement(
19769
- Box56,
19887
+ return /* @__PURE__ */ React77.createElement(Box57, { flexDirection: "column" }, /* @__PURE__ */ React77.createElement(
19888
+ Box57,
19770
19889
  {
19771
19890
  borderColor: getTheme().secondaryBorder,
19772
19891
  borderStyle: useBorder ? "round" : void 0,
19773
19892
  flexDirection: "column",
19774
19893
  paddingX: 1
19775
19894
  },
19776
- /* @__PURE__ */ React76.createElement(Box56, { paddingBottom: 1 }, /* @__PURE__ */ React76.createElement(Text61, { bold: true }, verbose ? file_path : relative10(getCwd(), file_path))),
19895
+ /* @__PURE__ */ React77.createElement(Box57, { paddingBottom: 1 }, /* @__PURE__ */ React77.createElement(Text62, { bold: true }, verbose ? file_path : relative10(getCwd(), file_path))),
19777
19896
  intersperse(
19778
- patch.map((_) => /* @__PURE__ */ React76.createElement(
19897
+ patch.map((_) => /* @__PURE__ */ React77.createElement(
19779
19898
  StructuredDiff,
19780
19899
  {
19781
19900
  key: _.newStart,
@@ -19784,7 +19903,7 @@ function FileEditToolDiff({
19784
19903
  width
19785
19904
  }
19786
19905
  )),
19787
- (i) => /* @__PURE__ */ React76.createElement(React76.Fragment, { key: `ellipsis-${i}` }, /* @__PURE__ */ React76.createElement(Text61, { color: getTheme().secondaryText }, "..."))
19906
+ (i) => /* @__PURE__ */ React77.createElement(React77.Fragment, { key: `ellipsis-${i}` }, /* @__PURE__ */ React77.createElement(Text62, { color: getTheme().secondaryText }, "..."))
19788
19907
  )
19789
19908
  ));
19790
19909
  }
@@ -19966,8 +20085,8 @@ function FileEditPermissionRequest({
19966
20085
  handleChoice("yes-session");
19967
20086
  return true;
19968
20087
  });
19969
- return /* @__PURE__ */ React77.createElement(
19970
- Box57,
20088
+ return /* @__PURE__ */ React78.createElement(
20089
+ Box58,
19971
20090
  {
19972
20091
  flexDirection: "column",
19973
20092
  borderStyle: "round",
@@ -19977,14 +20096,14 @@ function FileEditPermissionRequest({
19977
20096
  paddingRight: 1,
19978
20097
  paddingBottom: 1
19979
20098
  },
19980
- /* @__PURE__ */ React77.createElement(
20099
+ /* @__PURE__ */ React78.createElement(
19981
20100
  PermissionRequestTitle,
19982
20101
  {
19983
20102
  title: "Edit file",
19984
20103
  riskScore: toolUseConfirm.riskScore
19985
20104
  }
19986
20105
  ),
19987
- /* @__PURE__ */ React77.createElement(
20106
+ /* @__PURE__ */ React78.createElement(
19988
20107
  FileEditToolDiff,
19989
20108
  {
19990
20109
  file_path,
@@ -19994,7 +20113,7 @@ function FileEditPermissionRequest({
19994
20113
  width: columns - 12
19995
20114
  }
19996
20115
  ),
19997
- /* @__PURE__ */ React77.createElement(Box57, { flexDirection: "column" }, /* @__PURE__ */ React77.createElement(Text62, null, "Do you want to make this edit to", " ", /* @__PURE__ */ React77.createElement(Text62, { bold: true }, basename(file_path)), "?"), /* @__PURE__ */ React77.createElement(
20116
+ /* @__PURE__ */ React78.createElement(Box58, { flexDirection: "column" }, /* @__PURE__ */ React78.createElement(Text63, null, "Do you want to make this edit to", " ", /* @__PURE__ */ React78.createElement(Text63, { bold: true }, basename(file_path)), "?"), /* @__PURE__ */ React78.createElement(
19998
20117
  Select,
19999
20118
  {
20000
20119
  options: getOptions({
@@ -20018,8 +20137,8 @@ async function extractLanguageName(file_path) {
20018
20137
  }
20019
20138
 
20020
20139
  // src/ui/components/permissions/bash-permission-request/BashPermissionRequest.tsx
20021
- import { Box as Box58, Text as Text63 } from "ink";
20022
- import React78, { useMemo as useMemo16 } from "react";
20140
+ import { Box as Box59, Text as Text64 } from "ink";
20141
+ import React79, { useMemo as useMemo16 } from "react";
20023
20142
 
20024
20143
  // src/ui/components/permissions/hooks.ts
20025
20144
  import { useEffect as useEffect18 } from "react";
@@ -20124,8 +20243,8 @@ function BashPermissionRequest({
20124
20243
  []
20125
20244
  );
20126
20245
  usePermissionRequestLogging2(toolUseConfirm, unaryEvent);
20127
- return /* @__PURE__ */ React78.createElement(
20128
- Box58,
20246
+ return /* @__PURE__ */ React79.createElement(
20247
+ Box59,
20129
20248
  {
20130
20249
  flexDirection: "column",
20131
20250
  borderStyle: "round",
@@ -20135,19 +20254,19 @@ function BashPermissionRequest({
20135
20254
  paddingRight: 1,
20136
20255
  paddingBottom: 1
20137
20256
  },
20138
- /* @__PURE__ */ React78.createElement(
20257
+ /* @__PURE__ */ React79.createElement(
20139
20258
  PermissionRequestTitle,
20140
20259
  {
20141
20260
  title: "Bash command",
20142
20261
  riskScore: toolUseConfirm.riskScore
20143
20262
  }
20144
20263
  ),
20145
- /* @__PURE__ */ React78.createElement(Box58, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React78.createElement(Text63, null, BashTool.renderToolUseMessage({
20264
+ /* @__PURE__ */ React79.createElement(Box59, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React79.createElement(Text64, null, BashTool.renderToolUseMessage({
20146
20265
  command: command4,
20147
20266
  run_in_background,
20148
20267
  description: description3
20149
- })), /* @__PURE__ */ React78.createElement(Text63, { color: theme.secondaryText }, toolUseConfirm.description)),
20150
- /* @__PURE__ */ React78.createElement(Box58, { flexDirection: "column" }, /* @__PURE__ */ React78.createElement(Text63, null, "Do you want to proceed?"), /* @__PURE__ */ React78.createElement(
20268
+ })), /* @__PURE__ */ React79.createElement(Text64, { color: theme.secondaryText }, toolUseConfirm.description)),
20269
+ /* @__PURE__ */ React79.createElement(Box59, { flexDirection: "column" }, /* @__PURE__ */ React79.createElement(Text64, null, "Do you want to proceed?"), /* @__PURE__ */ React79.createElement(
20151
20270
  Select,
20152
20271
  {
20153
20272
  options: toolUseOptions({ toolUseConfirm, command: command4 }),
@@ -20215,8 +20334,8 @@ function BashPermissionRequest({
20215
20334
  }
20216
20335
 
20217
20336
  // src/ui/components/permissions/FallbackPermissionRequest.tsx
20218
- import { Box as Box59, Text as Text64 } from "ink";
20219
- import React79, { useMemo as useMemo17 } from "react";
20337
+ import { Box as Box60, Text as Text65 } from "ink";
20338
+ import React80, { useMemo as useMemo17 } from "react";
20220
20339
  import chalk9 from "chalk";
20221
20340
  function __getFallbackPermissionInputForTests(tool, input) {
20222
20341
  return tool === WebSearchTool ? { query: "" } : input;
@@ -20237,8 +20356,8 @@ function FallbackPermissionRequest({
20237
20356
  []
20238
20357
  );
20239
20358
  usePermissionRequestLogging(toolUseConfirm, unaryEvent);
20240
- return /* @__PURE__ */ React79.createElement(
20241
- Box59,
20359
+ return /* @__PURE__ */ React80.createElement(
20360
+ Box60,
20242
20361
  {
20243
20362
  flexDirection: "column",
20244
20363
  borderStyle: "round",
@@ -20248,18 +20367,18 @@ function FallbackPermissionRequest({
20248
20367
  paddingRight: 1,
20249
20368
  paddingBottom: 1
20250
20369
  },
20251
- /* @__PURE__ */ React79.createElement(
20370
+ /* @__PURE__ */ React80.createElement(
20252
20371
  PermissionRequestTitle,
20253
20372
  {
20254
20373
  title: "Tool use",
20255
20374
  riskScore: toolUseConfirm.riskScore
20256
20375
  }
20257
20376
  ),
20258
- /* @__PURE__ */ React79.createElement(Box59, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React79.createElement(Text64, null, userFacingName3, "(", toolUseConfirm.tool.renderToolUseMessage(
20377
+ /* @__PURE__ */ React80.createElement(Box60, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React80.createElement(Text65, null, userFacingName3, "(", toolUseConfirm.tool.renderToolUseMessage(
20259
20378
  toolUseConfirm.input,
20260
20379
  { verbose }
20261
- ), ")", originalUserFacingName.endsWith(" (MCP)") ? /* @__PURE__ */ React79.createElement(Text64, { color: theme.secondaryText }, " (MCP)") : ""), /* @__PURE__ */ React79.createElement(Text64, { color: theme.secondaryText }, toolUseConfirm.description)),
20262
- /* @__PURE__ */ React79.createElement(Box59, { flexDirection: "column" }, /* @__PURE__ */ React79.createElement(Text64, null, "Do you want to proceed?"), /* @__PURE__ */ React79.createElement(
20380
+ ), ")", originalUserFacingName.endsWith(" (MCP)") ? /* @__PURE__ */ React80.createElement(Text65, { color: theme.secondaryText }, " (MCP)") : ""), /* @__PURE__ */ React80.createElement(Text65, { color: theme.secondaryText }, toolUseConfirm.description)),
20381
+ /* @__PURE__ */ React80.createElement(Box60, { flexDirection: "column" }, /* @__PURE__ */ React80.createElement(Text65, null, "Do you want to proceed?"), /* @__PURE__ */ React80.createElement(
20263
20382
  Select,
20264
20383
  {
20265
20384
  options: [
@@ -20375,17 +20494,17 @@ function useNotifyAfterTimeout(message, timeout = DEFAULT_INTERACTION_THRESHOLD_
20375
20494
  }
20376
20495
 
20377
20496
  // src/ui/components/permissions/file-write-permission-request/FileWritePermissionRequest.tsx
20378
- import { Box as Box61, Text as Text66, useInput as useInput20 } from "ink";
20379
- import React81, { useCallback as useCallback9, useMemo as useMemo19 } from "react";
20497
+ import { Box as Box62, Text as Text67, useInput as useInput20 } from "ink";
20498
+ import React82, { useCallback as useCallback9, useMemo as useMemo19 } from "react";
20380
20499
  import { basename as basename2, dirname as dirname6, extname as extname8 } from "path";
20381
20500
  import { existsSync as existsSync12 } from "fs";
20382
20501
  import chalk10 from "chalk";
20383
20502
 
20384
20503
  // src/ui/components/permissions/file-write-permission-request/FileWriteToolDiff.tsx
20385
- import * as React80 from "react";
20504
+ import * as React81 from "react";
20386
20505
  import { existsSync as existsSync11, readFileSync as readFileSync8 } from "fs";
20387
20506
  import { useMemo as useMemo18 } from "react";
20388
- import { Box as Box60, Text as Text65 } from "ink";
20507
+ import { Box as Box61, Text as Text66 } from "ink";
20389
20508
  import { extname as extname7, relative as relative11 } from "path";
20390
20509
  function FileWriteToolDiff({
20391
20510
  file_path,
@@ -20412,17 +20531,17 @@ function FileWriteToolDiff({
20412
20531
  newStr: content
20413
20532
  });
20414
20533
  }, [fileExists, file_path, oldContent, content]);
20415
- return /* @__PURE__ */ React80.createElement(
20416
- Box60,
20534
+ return /* @__PURE__ */ React81.createElement(
20535
+ Box61,
20417
20536
  {
20418
20537
  borderColor: getTheme().secondaryBorder,
20419
20538
  borderStyle: "round",
20420
20539
  flexDirection: "column",
20421
20540
  paddingX: 1
20422
20541
  },
20423
- /* @__PURE__ */ React80.createElement(Box60, { paddingBottom: 1 }, /* @__PURE__ */ React80.createElement(Text65, { bold: true }, verbose ? file_path : relative11(getCwd(), file_path))),
20542
+ /* @__PURE__ */ React81.createElement(Box61, { paddingBottom: 1 }, /* @__PURE__ */ React81.createElement(Text66, { bold: true }, verbose ? file_path : relative11(getCwd(), file_path))),
20424
20543
  hunks ? intersperse(
20425
- hunks.map((_) => /* @__PURE__ */ React80.createElement(
20544
+ hunks.map((_) => /* @__PURE__ */ React81.createElement(
20426
20545
  StructuredDiff,
20427
20546
  {
20428
20547
  key: _.newStart,
@@ -20431,8 +20550,8 @@ function FileWriteToolDiff({
20431
20550
  width
20432
20551
  }
20433
20552
  )),
20434
- (i) => /* @__PURE__ */ React80.createElement(React80.Fragment, { key: `ellipsis-${i}` }, /* @__PURE__ */ React80.createElement(Text65, { color: getTheme().secondaryText }, "..."))
20435
- ) : /* @__PURE__ */ React80.createElement(
20553
+ (i) => /* @__PURE__ */ React81.createElement(React81.Fragment, { key: `ellipsis-${i}` }, /* @__PURE__ */ React81.createElement(Text66, { color: getTheme().secondaryText }, "..."))
20554
+ ) : /* @__PURE__ */ React81.createElement(
20436
20555
  HighlightedCode,
20437
20556
  {
20438
20557
  code: content || "(No content)",
@@ -20567,8 +20686,8 @@ function FileWritePermissionRequest({
20567
20686
  handleChoice("yes-session");
20568
20687
  return true;
20569
20688
  });
20570
- return /* @__PURE__ */ React81.createElement(
20571
- Box61,
20689
+ return /* @__PURE__ */ React82.createElement(
20690
+ Box62,
20572
20691
  {
20573
20692
  flexDirection: "column",
20574
20693
  borderStyle: "round",
@@ -20578,14 +20697,14 @@ function FileWritePermissionRequest({
20578
20697
  paddingRight: 1,
20579
20698
  paddingBottom: 1
20580
20699
  },
20581
- /* @__PURE__ */ React81.createElement(
20700
+ /* @__PURE__ */ React82.createElement(
20582
20701
  PermissionRequestTitle,
20583
20702
  {
20584
20703
  title: `${fileExists ? "Edit" : "Create"} file`,
20585
20704
  riskScore: toolUseConfirm.riskScore
20586
20705
  }
20587
20706
  ),
20588
- /* @__PURE__ */ React81.createElement(Box61, { flexDirection: "column" }, /* @__PURE__ */ React81.createElement(
20707
+ /* @__PURE__ */ React82.createElement(Box62, { flexDirection: "column" }, /* @__PURE__ */ React82.createElement(
20589
20708
  FileWriteToolDiff,
20590
20709
  {
20591
20710
  file_path,
@@ -20594,7 +20713,7 @@ function FileWritePermissionRequest({
20594
20713
  width: columns - 12
20595
20714
  }
20596
20715
  )),
20597
- /* @__PURE__ */ React81.createElement(Box61, { flexDirection: "column" }, /* @__PURE__ */ React81.createElement(Text66, null, "Do you want to ", fileExists ? "make this edit to" : "create", " ", /* @__PURE__ */ React81.createElement(Text66, { bold: true }, basename2(file_path)), "?"), /* @__PURE__ */ React81.createElement(
20716
+ /* @__PURE__ */ React82.createElement(Box62, { flexDirection: "column" }, /* @__PURE__ */ React82.createElement(Text67, null, "Do you want to ", fileExists ? "make this edit to" : "create", " ", /* @__PURE__ */ React82.createElement(Text67, { bold: true }, basename2(file_path)), "?"), /* @__PURE__ */ React82.createElement(
20598
20717
  Select,
20599
20718
  {
20600
20719
  options: [
@@ -20628,8 +20747,8 @@ async function extractLanguageName2(file_path) {
20628
20747
  }
20629
20748
 
20630
20749
  // src/ui/components/permissions/filesystem-permission-request/FilesystemPermissionRequest.tsx
20631
- import { Box as Box62, Text as Text67, useInput as useInput21 } from "ink";
20632
- import React82, { useCallback as useCallback10, useMemo as useMemo20 } from "react";
20750
+ import { Box as Box63, Text as Text68, useInput as useInput21 } from "ink";
20751
+ import React83, { useCallback as useCallback10, useMemo as useMemo20 } from "react";
20633
20752
  import chalk11 from "chalk";
20634
20753
  import { basename as basename3, dirname as dirname7 } from "path";
20635
20754
  import { statSync as statSync10 } from "fs";
@@ -20686,7 +20805,7 @@ function FilesystemPermissionRequest({
20686
20805
  }) {
20687
20806
  const path5 = pathFromToolUse(toolUseConfirm);
20688
20807
  if (!path5) {
20689
- return /* @__PURE__ */ React82.createElement(
20808
+ return /* @__PURE__ */ React83.createElement(
20690
20809
  FallbackPermissionRequest,
20691
20810
  {
20692
20811
  toolUseConfirm,
@@ -20695,7 +20814,7 @@ function FilesystemPermissionRequest({
20695
20814
  }
20696
20815
  );
20697
20816
  }
20698
- return /* @__PURE__ */ React82.createElement(
20817
+ return /* @__PURE__ */ React83.createElement(
20699
20818
  FilesystemPermissionRequestImpl,
20700
20819
  {
20701
20820
  toolUseConfirm,
@@ -20837,8 +20956,8 @@ function FilesystemPermissionRequestImpl({
20837
20956
  handleChoice("yes-session");
20838
20957
  return true;
20839
20958
  });
20840
- return /* @__PURE__ */ React82.createElement(
20841
- Box62,
20959
+ return /* @__PURE__ */ React83.createElement(
20960
+ Box63,
20842
20961
  {
20843
20962
  flexDirection: "column",
20844
20963
  borderStyle: "round",
@@ -20848,18 +20967,18 @@ function FilesystemPermissionRequestImpl({
20848
20967
  paddingRight: 1,
20849
20968
  paddingBottom: 1
20850
20969
  },
20851
- /* @__PURE__ */ React82.createElement(
20970
+ /* @__PURE__ */ React83.createElement(
20852
20971
  PermissionRequestTitle,
20853
20972
  {
20854
20973
  title,
20855
20974
  riskScore: toolUseConfirm.riskScore
20856
20975
  }
20857
20976
  ),
20858
- /* @__PURE__ */ React82.createElement(Box62, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React82.createElement(Text67, null, userFacingName3, "(", toolUseConfirm.tool.renderToolUseMessage(
20977
+ /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React83.createElement(Text68, null, userFacingName3, "(", toolUseConfirm.tool.renderToolUseMessage(
20859
20978
  toolUseConfirm.input,
20860
20979
  { verbose }
20861
20980
  ), ")")),
20862
- /* @__PURE__ */ React82.createElement(Box62, { flexDirection: "column" }, /* @__PURE__ */ React82.createElement(Text67, null, "Do you want to proceed?"), /* @__PURE__ */ React82.createElement(
20981
+ /* @__PURE__ */ React83.createElement(Box63, { flexDirection: "column" }, /* @__PURE__ */ React83.createElement(Text68, null, "Do you want to proceed?"), /* @__PURE__ */ React83.createElement(
20863
20982
  Select,
20864
20983
  {
20865
20984
  options: [
@@ -20887,7 +21006,7 @@ function FilesystemPermissionRequestImpl({
20887
21006
 
20888
21007
  // src/tools/ai/SkillTool/SkillTool.tsx
20889
21008
  import { z as z9 } from "zod";
20890
- import * as React83 from "react";
21009
+ import * as React84 from "react";
20891
21010
 
20892
21011
  // src/tools/ai/SkillTool/prompt.ts
20893
21012
  var TOOL_NAME_FOR_PROMPT5 = "Skill";
@@ -20984,7 +21103,7 @@ ${availableSkills}${truncatedNotice}
20984
21103
  return skill || "";
20985
21104
  },
20986
21105
  renderToolUseRejectedMessage() {
20987
- return /* @__PURE__ */ React83.createElement(FallbackToolUseRejectedMessage, null);
21106
+ return /* @__PURE__ */ React84.createElement(FallbackToolUseRejectedMessage, null);
20988
21107
  },
20989
21108
  renderResultForAssistant(output) {
20990
21109
  return `Launching skill: ${output.commandName}`;
@@ -21119,8 +21238,8 @@ function findCommand(commandName, commands) {
21119
21238
  }
21120
21239
 
21121
21240
  // src/ui/components/permissions/slash-command-permission-request/SlashCommandPermissionRequest.tsx
21122
- import { Box as Box63, Text as Text68 } from "ink";
21123
- import React84, { useMemo as useMemo21 } from "react";
21241
+ import { Box as Box64, Text as Text69 } from "ink";
21242
+ import React85, { useMemo as useMemo21 } from "react";
21124
21243
  import chalk12 from "chalk";
21125
21244
  function parsePrefix(command4) {
21126
21245
  const trimmed = command4.trim();
@@ -21145,8 +21264,8 @@ function SlashCommandPermissionRequest({
21145
21264
  const command4 = typeof toolUseConfirm.input.command === "string" ? toolUseConfirm.input.command : "";
21146
21265
  const prefix = parsePrefix(command4);
21147
21266
  const showPrefixOption = !!prefix && hasArgs(command4);
21148
- return /* @__PURE__ */ React84.createElement(
21149
- Box63,
21267
+ return /* @__PURE__ */ React85.createElement(
21268
+ Box64,
21150
21269
  {
21151
21270
  flexDirection: "column",
21152
21271
  borderStyle: "round",
@@ -21156,14 +21275,14 @@ function SlashCommandPermissionRequest({
21156
21275
  paddingRight: 1,
21157
21276
  paddingBottom: 1
21158
21277
  },
21159
- /* @__PURE__ */ React84.createElement(PermissionRequestTitle, { title: "Slash command", riskScore: null }),
21160
- /* @__PURE__ */ React84.createElement(Box63, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React84.createElement(Text68, null, toolUseConfirm.tool.userFacingName?.() || "SlashCommand", "(", toolUseConfirm.tool.renderToolUseMessage(
21278
+ /* @__PURE__ */ React85.createElement(PermissionRequestTitle, { title: "Slash command", riskScore: null }),
21279
+ /* @__PURE__ */ React85.createElement(Box64, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React85.createElement(Text69, null, toolUseConfirm.tool.userFacingName?.() || "SlashCommand", "(", toolUseConfirm.tool.renderToolUseMessage(
21161
21280
  toolUseConfirm.input,
21162
21281
  {
21163
21282
  verbose
21164
21283
  }
21165
- ), ")"), /* @__PURE__ */ React84.createElement(Text68, { color: theme.secondaryText }, toolUseConfirm.description)),
21166
- /* @__PURE__ */ React84.createElement(Box63, { flexDirection: "column" }, /* @__PURE__ */ React84.createElement(Text68, null, "Do you want to proceed?"), /* @__PURE__ */ React84.createElement(
21284
+ ), ")"), /* @__PURE__ */ React85.createElement(Text69, { color: theme.secondaryText }, toolUseConfirm.description)),
21285
+ /* @__PURE__ */ React85.createElement(Box64, { flexDirection: "column" }, /* @__PURE__ */ React85.createElement(Text69, null, "Do you want to proceed?"), /* @__PURE__ */ React85.createElement(
21167
21286
  Select,
21168
21287
  {
21169
21288
  options: [
@@ -21264,8 +21383,8 @@ function SlashCommandPermissionRequest({
21264
21383
  }
21265
21384
 
21266
21385
  // src/ui/components/permissions/skill-permission-request/SkillPermissionRequest.tsx
21267
- import { Box as Box64, Text as Text69 } from "ink";
21268
- import React85, { useMemo as useMemo22 } from "react";
21386
+ import { Box as Box65, Text as Text70 } from "ink";
21387
+ import React86, { useMemo as useMemo22 } from "react";
21269
21388
  import chalk13 from "chalk";
21270
21389
  function SkillPermissionRequest({
21271
21390
  toolUseConfirm,
@@ -21280,8 +21399,8 @@ function SkillPermissionRequest({
21280
21399
  usePermissionRequestLogging(toolUseConfirm, unaryEvent);
21281
21400
  const raw = typeof toolUseConfirm.input.skill === "string" ? toolUseConfirm.input.skill : "";
21282
21401
  const skill = raw.trim().replace(/^\//, "");
21283
- return /* @__PURE__ */ React85.createElement(
21284
- Box64,
21402
+ return /* @__PURE__ */ React86.createElement(
21403
+ Box65,
21285
21404
  {
21286
21405
  flexDirection: "column",
21287
21406
  borderStyle: "round",
@@ -21291,14 +21410,14 @@ function SkillPermissionRequest({
21291
21410
  paddingRight: 1,
21292
21411
  paddingBottom: 1
21293
21412
  },
21294
- /* @__PURE__ */ React85.createElement(PermissionRequestTitle, { title: "Skill", riskScore: null }),
21295
- /* @__PURE__ */ React85.createElement(Box64, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React85.createElement(Text69, null, toolUseConfirm.tool.userFacingName?.() || "Skill", "(", toolUseConfirm.tool.renderToolUseMessage(
21413
+ /* @__PURE__ */ React86.createElement(PermissionRequestTitle, { title: "Skill", riskScore: null }),
21414
+ /* @__PURE__ */ React86.createElement(Box65, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React86.createElement(Text70, null, toolUseConfirm.tool.userFacingName?.() || "Skill", "(", toolUseConfirm.tool.renderToolUseMessage(
21296
21415
  toolUseConfirm.input,
21297
21416
  {
21298
21417
  verbose
21299
21418
  }
21300
- ), ")"), /* @__PURE__ */ React85.createElement(Text69, { color: theme.secondaryText }, toolUseConfirm.description)),
21301
- /* @__PURE__ */ React85.createElement(Box64, { flexDirection: "column" }, /* @__PURE__ */ React85.createElement(Text69, null, "Do you want to proceed?"), /* @__PURE__ */ React85.createElement(
21419
+ ), ")"), /* @__PURE__ */ React86.createElement(Text70, { color: theme.secondaryText }, toolUseConfirm.description)),
21420
+ /* @__PURE__ */ React86.createElement(Box65, { flexDirection: "column" }, /* @__PURE__ */ React86.createElement(Text70, null, "Do you want to proceed?"), /* @__PURE__ */ React86.createElement(
21302
21421
  Select,
21303
21422
  {
21304
21423
  options: [
@@ -21368,8 +21487,8 @@ function SkillPermissionRequest({
21368
21487
  }
21369
21488
 
21370
21489
  // src/tools/agent/PlanModeTool/EnterPlanModeTool.tsx
21371
- import { Box as Box65, Text as Text70 } from "ink";
21372
- import React86 from "react";
21490
+ import { Box as Box66, Text as Text71 } from "ink";
21491
+ import React87 from "react";
21373
21492
  import { z as z10 } from "zod";
21374
21493
 
21375
21494
  // src/tools/agent/PlanModeTool/prompt.ts
@@ -21521,11 +21640,11 @@ var EnterPlanModeTool = {
21521
21640
  },
21522
21641
  renderToolUseRejectedMessage() {
21523
21642
  const theme = getTheme();
21524
- return /* @__PURE__ */ React86.createElement(Box65, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React86.createElement(Text70, { color: theme.text }, BLACK_CIRCLE), /* @__PURE__ */ React86.createElement(Text70, null, " User declined to enter plan mode"));
21643
+ return /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React87.createElement(Text71, { color: theme.text }, BLACK_CIRCLE), /* @__PURE__ */ React87.createElement(Text71, null, " User declined to enter plan mode"));
21525
21644
  },
21526
21645
  renderToolResultMessage(_output) {
21527
21646
  const theme = getTheme();
21528
- return /* @__PURE__ */ React86.createElement(Box65, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React86.createElement(Box65, { flexDirection: "row" }, /* @__PURE__ */ React86.createElement(Text70, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React86.createElement(Text70, null, " Entered plan mode")), /* @__PURE__ */ React86.createElement(Box65, { paddingLeft: 2 }, /* @__PURE__ */ React86.createElement(Text70, { dimColor: true }, "Pyb Agent is now exploring and designing an implementation approach.")));
21647
+ return /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text71, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React87.createElement(Text71, null, " Entered plan mode")), /* @__PURE__ */ React87.createElement(Box66, { paddingLeft: 2 }, /* @__PURE__ */ React87.createElement(Text71, { dimColor: true }, "Pyb Agent is now exploring and designing an implementation approach.")));
21529
21648
  },
21530
21649
  renderResultForAssistant(output) {
21531
21650
  return `${output.message}
@@ -21558,8 +21677,8 @@ Remember: DO NOT write or edit any files yet. This is a read-only exploration an
21558
21677
  };
21559
21678
 
21560
21679
  // src/tools/agent/PlanModeTool/ExitPlanModeTool.tsx
21561
- import { Box as Box66, Text as Text71 } from "ink";
21562
- import React87 from "react";
21680
+ import { Box as Box67, Text as Text72 } from "ink";
21681
+ import React88 from "react";
21563
21682
  import { z as z11 } from "zod";
21564
21683
  function getExitPlanModePlanText(conversationKey) {
21565
21684
  const { content } = readPlanFile(void 0, conversationKey);
@@ -21604,8 +21723,8 @@ var ExitPlanModeTool = {
21604
21723
  const conversationKey = typeof options.conversationKey === "string" && options.conversationKey.trim() ? options.conversationKey.trim() : void 0;
21605
21724
  const { content } = readPlanFile(void 0, conversationKey);
21606
21725
  const plan = getExitPlanModePlanText(conversationKey);
21607
- return /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text71, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React87.createElement(Text71, { color: theme.error }, "User rejected Pyb Agent's plan:"), /* @__PURE__ */ React87.createElement(
21608
- Box66,
21726
+ return /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "row" }, /* @__PURE__ */ React88.createElement(Text72, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", width: "100%" }, /* @__PURE__ */ React88.createElement(Text72, { color: theme.error }, "User rejected Pyb Agent's plan:"), /* @__PURE__ */ React88.createElement(
21727
+ Box67,
21609
21728
  {
21610
21729
  borderStyle: "round",
21611
21730
  borderColor: theme.planMode,
@@ -21613,14 +21732,14 @@ var ExitPlanModeTool = {
21613
21732
  paddingX: 1,
21614
21733
  overflow: "hidden"
21615
21734
  },
21616
- /* @__PURE__ */ React87.createElement(Text71, { dimColor: true }, plan)
21735
+ /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, plan)
21617
21736
  ))));
21618
21737
  },
21619
21738
  renderToolResultMessage(output) {
21620
21739
  const theme = getTheme();
21621
21740
  const planPath = typeof output.filePath === "string" ? output.filePath : null;
21622
21741
  const plan = output.plan || "No plan found";
21623
- return /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text71, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React87.createElement(Text71, null, " User approved Pyb Agent's plan")), /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "row" }, /* @__PURE__ */ React87.createElement(Text71, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React87.createElement(Box66, { flexDirection: "column" }, planPath ? /* @__PURE__ */ React87.createElement(Text71, { dimColor: true }, "Plan saved to: ", planPath, " \xB7 /plan to edit") : null, /* @__PURE__ */ React87.createElement(Text71, { dimColor: true }, plan))));
21742
+ return /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", marginTop: 1, width: "100%" }, /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "row" }, /* @__PURE__ */ React88.createElement(Text72, { color: theme.planMode }, BLACK_CIRCLE), /* @__PURE__ */ React88.createElement(Text72, null, " User approved Pyb Agent's plan")), /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "row" }, /* @__PURE__ */ React88.createElement(Text72, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column" }, planPath ? /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, "Plan saved to: ", planPath, " \xB7 /plan to edit") : null, /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, plan))));
21624
21743
  },
21625
21744
  renderResultForAssistant(output) {
21626
21745
  if (output.isAgent) {
@@ -21704,8 +21823,8 @@ ${output.plan}`;
21704
21823
  };
21705
21824
 
21706
21825
  // src/ui/components/permissions/plan-mode-permission-request/EnterPlanModePermissionRequest.tsx
21707
- import { Box as Box67, Text as Text72, useInput as useInput22 } from "ink";
21708
- import React88 from "react";
21826
+ import { Box as Box68, Text as Text73, useInput as useInput22 } from "ink";
21827
+ import React89 from "react";
21709
21828
  function EnterPlanModePermissionRequest({
21710
21829
  toolUseConfirm,
21711
21830
  onDone
@@ -21718,8 +21837,8 @@ function EnterPlanModePermissionRequest({
21718
21837
  onDone();
21719
21838
  }
21720
21839
  });
21721
- return /* @__PURE__ */ React88.createElement(
21722
- Box67,
21840
+ return /* @__PURE__ */ React89.createElement(
21841
+ Box68,
21723
21842
  {
21724
21843
  flexDirection: "column",
21725
21844
  borderStyle: "round",
@@ -21729,11 +21848,11 @@ function EnterPlanModePermissionRequest({
21729
21848
  paddingRight: 1,
21730
21849
  paddingBottom: 1
21731
21850
  },
21732
- /* @__PURE__ */ React88.createElement(PermissionRequestTitle, { title: "Enter plan mode?", riskScore: null }),
21733
- /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React88.createElement(Text72, null, "The assistant wants to enter plan mode to explore and design an implementation approach.")),
21734
- /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", paddingX: 2 }, /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, "In plan mode, the assistant will:"), /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, " \xB7 Explore the codebase thoroughly"), /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, " \xB7 Identify existing patterns"), /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, " \xB7 Design an implementation strategy"), /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, " \xB7 Present a plan for your approval")),
21735
- /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column", paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React88.createElement(Text72, { dimColor: true }, "No code changes will be made until you approve the plan.")),
21736
- /* @__PURE__ */ React88.createElement(Box67, { flexDirection: "column" }, /* @__PURE__ */ React88.createElement(Text72, null, "Would you like to proceed?"), /* @__PURE__ */ React88.createElement(
21851
+ /* @__PURE__ */ React89.createElement(PermissionRequestTitle, { title: "Enter plan mode?", riskScore: null }),
21852
+ /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React89.createElement(Text73, null, "The assistant wants to enter plan mode to explore and design an implementation approach.")),
21853
+ /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2 }, /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, "In plan mode, the assistant will:"), /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, " \xB7 Explore the codebase thoroughly"), /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, " \xB7 Identify existing patterns"), /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, " \xB7 Design an implementation strategy"), /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, " \xB7 Present a plan for your approval")),
21854
+ /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2, marginTop: 1 }, /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, "No code changes will be made until you approve the plan.")),
21855
+ /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column" }, /* @__PURE__ */ React89.createElement(Text73, null, "Would you like to proceed?"), /* @__PURE__ */ React89.createElement(
21737
21856
  Select,
21738
21857
  {
21739
21858
  options: [
@@ -21756,8 +21875,8 @@ function EnterPlanModePermissionRequest({
21756
21875
  }
21757
21876
 
21758
21877
  // src/ui/components/permissions/plan-mode-permission-request/ExitPlanModePermissionRequest.tsx
21759
- import { Box as Box68, Text as Text73, useInput as useInput23 } from "ink";
21760
- import React89, { useEffect as useEffect20, useMemo as useMemo23, useState as useState21 } from "react";
21878
+ import { Box as Box69, Text as Text74, useInput as useInput23 } from "ink";
21879
+ import React90, { useEffect as useEffect20, useMemo as useMemo23, useState as useState21 } from "react";
21761
21880
 
21762
21881
  // src/utils/system/externalEditor.ts
21763
21882
  import { spawn, spawnSync } from "child_process";
@@ -22064,8 +22183,8 @@ function ExitPlanModePermissionRequest({
22064
22183
  [bypassAvailable, launchSwarmAvailable, teammateCount]
22065
22184
  );
22066
22185
  if (showRejectInput) {
22067
- return /* @__PURE__ */ React89.createElement(
22068
- Box68,
22186
+ return /* @__PURE__ */ React90.createElement(
22187
+ Box69,
22069
22188
  {
22070
22189
  flexDirection: "column",
22071
22190
  borderStyle: "round",
@@ -22075,8 +22194,8 @@ function ExitPlanModePermissionRequest({
22075
22194
  paddingRight: 1,
22076
22195
  paddingBottom: 1
22077
22196
  },
22078
- /* @__PURE__ */ React89.createElement(PermissionRequestTitle, { title: "No, keep planning", riskScore: null }),
22079
- /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, "Type here to tell Pyb Agent what to change (Enter submits, Esc cancels)"), rejectError ? /* @__PURE__ */ React89.createElement(Text73, { color: theme.error }, rejectError) : null, /* @__PURE__ */ React89.createElement(
22197
+ /* @__PURE__ */ React90.createElement(PermissionRequestTitle, { title: "No, keep planning", riskScore: null }),
22198
+ /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React90.createElement(Text74, { dimColor: true }, "Type here to tell Pyb Agent what to change (Enter submits, Esc cancels)"), rejectError ? /* @__PURE__ */ React90.createElement(Text74, { color: theme.error }, rejectError) : null, /* @__PURE__ */ React90.createElement(
22080
22199
  TextInput,
22081
22200
  {
22082
22201
  value: rejectFeedback,
@@ -22105,8 +22224,8 @@ function ExitPlanModePermissionRequest({
22105
22224
  ))
22106
22225
  );
22107
22226
  }
22108
- return /* @__PURE__ */ React89.createElement(
22109
- Box68,
22227
+ return /* @__PURE__ */ React90.createElement(
22228
+ Box69,
22110
22229
  {
22111
22230
  flexDirection: "column",
22112
22231
  borderStyle: "round",
@@ -22116,9 +22235,9 @@ function ExitPlanModePermissionRequest({
22116
22235
  paddingRight: 1,
22117
22236
  paddingBottom: 1
22118
22237
  },
22119
- /* @__PURE__ */ React89.createElement(PermissionRequestTitle, { title: "Ready to code?", riskScore: null }),
22120
- /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React89.createElement(Text73, null, "Here is Pyb Agent's plan:"), /* @__PURE__ */ React89.createElement(
22121
- Box68,
22238
+ /* @__PURE__ */ React90.createElement(PermissionRequestTitle, { title: "Ready to code?", riskScore: null }),
22239
+ /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React90.createElement(Text74, null, "Here is Pyb Agent's plan:"), /* @__PURE__ */ React90.createElement(
22240
+ Box69,
22122
22241
  {
22123
22242
  borderStyle: "dashed",
22124
22243
  borderColor: theme.secondaryBorder,
@@ -22130,10 +22249,10 @@ function ExitPlanModePermissionRequest({
22130
22249
  marginBottom: 1,
22131
22250
  flexDirection: "column"
22132
22251
  },
22133
- /* @__PURE__ */ React89.createElement(Text73, null, planText)
22252
+ /* @__PURE__ */ React90.createElement(Text74, null, planText)
22134
22253
  )),
22135
- /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", paddingX: 2 }, /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, "Tip: Press ctrl+g to edit", " ", planSource === "file" ? `plan file: ${planFilePath}` : "plan text", planSaved ? " \xB7 Plan saved!" : "")),
22136
- /* @__PURE__ */ React89.createElement(Box68, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React89.createElement(Text73, { dimColor: true }, "Would you like to proceed?"), /* @__PURE__ */ React89.createElement(
22254
+ /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", paddingX: 2 }, /* @__PURE__ */ React90.createElement(Text74, { dimColor: true }, "Tip: Press ctrl+g to edit", " ", planSource === "file" ? `plan file: ${planFilePath}` : "plan text", planSaved ? " \xB7 Plan saved!" : "")),
22255
+ /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React90.createElement(Text74, { dimColor: true }, "Would you like to proceed?"), /* @__PURE__ */ React90.createElement(
22137
22256
  Select,
22138
22257
  {
22139
22258
  options,
@@ -22159,8 +22278,8 @@ function ExitPlanModePermissionRequest({
22159
22278
  }
22160
22279
 
22161
22280
  // src/tools/interaction/AskUserQuestionTool/AskUserQuestionTool.tsx
22162
- import { Box as Box69, Text as Text74 } from "ink";
22163
- import React90 from "react";
22281
+ import { Box as Box70, Text as Text75 } from "ink";
22282
+ import React91 from "react";
22164
22283
  import { z as z12 } from "zod";
22165
22284
 
22166
22285
  // src/tools/interaction/AskUserQuestionTool/prompt.ts
@@ -22237,11 +22356,11 @@ var AskUserQuestionTool = {
22237
22356
  },
22238
22357
  renderToolUseRejectedMessage() {
22239
22358
  const theme = getTheme();
22240
- return /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React90.createElement(Text74, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React90.createElement(Text74, null, "User declined to answer questions"));
22359
+ return /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "row", marginTop: 1 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React91.createElement(Text75, null, "User declined to answer questions"));
22241
22360
  },
22242
22361
  renderToolResultMessage(output, _options) {
22243
22362
  const theme = getTheme();
22244
- return /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "row" }, /* @__PURE__ */ React90.createElement(Text74, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React90.createElement(Text74, null, "User answered Pyb Agent's questions:")), /* @__PURE__ */ React90.createElement(Box69, { flexDirection: "column", paddingLeft: 2 }, Object.entries(output.answers).map(([question, answer]) => /* @__PURE__ */ React90.createElement(Box69, { key: question }, /* @__PURE__ */ React90.createElement(Text74, { dimColor: true }, "\xB7 ", question, " \u2192 ", answer)))));
22363
+ return /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "row" }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.text }, BLACK_CIRCLE, "\xA0"), /* @__PURE__ */ React91.createElement(Text75, null, "User answered Pyb Agent's questions:")), /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", paddingLeft: 2 }, Object.entries(output.answers).map(([question, answer]) => /* @__PURE__ */ React91.createElement(Box70, { key: question }, /* @__PURE__ */ React91.createElement(Text75, { dimColor: true }, "\xB7 ", question, " \u2192 ", answer)))));
22245
22364
  },
22246
22365
  renderResultForAssistant(output) {
22247
22366
  const formatted = Object.entries(output.answers).map(([question, answer]) => `"${question}"="${answer}"`).join(", ");
@@ -22258,8 +22377,8 @@ var AskUserQuestionTool = {
22258
22377
  };
22259
22378
 
22260
22379
  // src/ui/components/permissions/ask-user-question-permission-request/AskUserQuestionPermissionRequest.tsx
22261
- import React91, { useCallback as useCallback11, useMemo as useMemo24, useState as useState22 } from "react";
22262
- import { Box as Box70, Text as Text75, useInput as useInput24 } from "ink";
22380
+ import React92, { useCallback as useCallback11, useMemo as useMemo24, useState as useState22 } from "react";
22381
+ import { Box as Box71, Text as Text76, useInput as useInput24 } from "ink";
22263
22382
  import figures8 from "figures";
22264
22383
  import stringWidth from "string-width";
22265
22384
  function isTextInputChar(input, key) {
@@ -22613,18 +22732,18 @@ function AskUserQuestionPermissionRequest({
22613
22732
  const rightArrowInactive = currentQuestionIndex === maxTabIndex;
22614
22733
  const allQuestionsAnswered = questions.every((q) => q?.question && Boolean(answers[q.question])) ?? false;
22615
22734
  if (questions.length === 0) {
22616
- return /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.error }, "Invalid AskUserQuestion input."), /* @__PURE__ */ React91.createElement(Text75, { dimColor: true }, "Press Esc to cancel."));
22735
+ return /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React92.createElement(Text76, { color: theme.error }, "Invalid AskUserQuestion input."), /* @__PURE__ */ React92.createElement(Text76, { dimColor: true }, "Press Esc to cancel."));
22617
22736
  }
22618
- return /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React91.createElement(
22619
- Box70,
22737
+ return /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React92.createElement(
22738
+ Box71,
22620
22739
  {
22621
22740
  borderTop: true,
22622
22741
  borderColor: theme.secondaryText,
22623
22742
  flexDirection: "column",
22624
22743
  paddingTop: 0
22625
22744
  },
22626
- /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "row", marginBottom: 1 }, showArrows && /* @__PURE__ */ React91.createElement(
22627
- Text75,
22745
+ /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "row", marginBottom: 1 }, showArrows && /* @__PURE__ */ React92.createElement(
22746
+ Text76,
22628
22747
  {
22629
22748
  color: currentQuestionIndex === 0 ? theme.secondaryText : void 0
22630
22749
  },
@@ -22635,16 +22754,16 @@ function AskUserQuestionPermissionRequest({
22635
22754
  const checkbox = question.question && answers[question.question] ? figures8.checkboxOn : figures8.checkboxOff;
22636
22755
  const headerText = tabHeaders[index] ?? question.header ?? `Q${index + 1}`;
22637
22756
  const tabText = ` ${checkbox} ${headerText} `;
22638
- return /* @__PURE__ */ React91.createElement(React91.Fragment, { key: question.question || `question-${index}` }, /* @__PURE__ */ React91.createElement(
22639
- Text75,
22757
+ return /* @__PURE__ */ React92.createElement(React92.Fragment, { key: question.question || `question-${index}` }, /* @__PURE__ */ React92.createElement(
22758
+ Text76,
22640
22759
  {
22641
22760
  backgroundColor: isSelected ? theme.permission : void 0,
22642
22761
  color: isSelected ? inverseText : void 0
22643
22762
  },
22644
22763
  tabText
22645
22764
  ));
22646
- }), !hideSubmitTab && /* @__PURE__ */ React91.createElement(
22647
- Text75,
22765
+ }), !hideSubmitTab && /* @__PURE__ */ React92.createElement(
22766
+ Text76,
22648
22767
  {
22649
22768
  backgroundColor: isSubmitTab ? theme.permission : void 0,
22650
22769
  color: isSubmitTab ? inverseText : void 0
@@ -22653,23 +22772,23 @@ function AskUserQuestionPermissionRequest({
22653
22772
  figures8.tick,
22654
22773
  " Submit",
22655
22774
  " "
22656
- ), showArrows && /* @__PURE__ */ React91.createElement(Text75, { color: rightArrowInactive ? theme.secondaryText : void 0 }, " ", "\u2192")),
22657
- !isSubmitTab && currentQuestion && /* @__PURE__ */ React91.createElement(React91.Fragment, null, /* @__PURE__ */ React91.createElement(Text75, { bold: true }, currentQuestion.question), /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", marginTop: 1 }, (() => {
22775
+ ), showArrows && /* @__PURE__ */ React92.createElement(Text76, { color: rightArrowInactive ? theme.secondaryText : void 0 }, " ", "\u2192")),
22776
+ !isSubmitTab && currentQuestion && /* @__PURE__ */ React92.createElement(React92.Fragment, null, /* @__PURE__ */ React92.createElement(Text76, { bold: true }, currentQuestion.question), /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column", marginTop: 1 }, (() => {
22658
22777
  const rawSelected = activeQuestionState?.selectedValue;
22659
22778
  const selectedValues = Array.isArray(rawSelected) ? rawSelected : [];
22660
22779
  const otherSelected = currentQuestion.multiSelect ? selectedValues.includes("__other__") : rawSelected === "__other__";
22661
22780
  const otherText = questionStates[currentQuestion.question]?.textInputValue ?? "";
22662
22781
  const otherPlaceholder = currentQuestion.multiSelect ? "Type something" : "Type something.";
22663
22782
  const otherLine = otherText.length > 0 ? otherText : isOtherFocused || otherSelected ? otherPlaceholder : "";
22664
- return /* @__PURE__ */ React91.createElement(React91.Fragment, null, currentQuestion.options.map((option, index) => {
22783
+ return /* @__PURE__ */ React92.createElement(React92.Fragment, null, currentQuestion.options.map((option, index) => {
22665
22784
  const isFocused = !isMultiSelectSubmitFocused && index === focusedOptionIndex;
22666
22785
  const isSelected = currentQuestion.multiSelect ? selectedValues.includes(option.label) : rawSelected === option.label;
22667
22786
  const pointer = isFocused ? figures8.pointer : " ";
22668
22787
  const color = isFocused ? theme.pyb : theme.text;
22669
22788
  const indicator = currentQuestion.multiSelect ? isSelected ? figures8.checkboxOn : figures8.checkboxOff : isSelected ? figures8.tick : " ";
22670
- return /* @__PURE__ */ React91.createElement(Box70, { key: option.label, flexDirection: "column" }, /* @__PURE__ */ React91.createElement(Text75, { color }, pointer, " ", indicator, " ", option.label), /* @__PURE__ */ React91.createElement(Text75, { color: theme.secondaryText }, " ", option.description));
22671
- }), /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column" }, /* @__PURE__ */ React91.createElement(Text75, { color: isOtherFocused ? theme.pyb : theme.text }, isOtherFocused ? figures8.pointer : " ", " ", currentQuestion.multiSelect ? otherSelected ? figures8.checkboxOn : figures8.checkboxOff : otherSelected ? figures8.tick : " ", " ", "Other"), (isOtherFocused || otherSelected || otherText.trim().length > 0) && /* @__PURE__ */ React91.createElement(Text75, { color: theme.secondaryText }, otherLine, isOtherFocused && /* @__PURE__ */ React91.createElement(Text75, { color: "gray" }, "\u258C"))), currentQuestion.multiSelect && /* @__PURE__ */ React91.createElement(Box70, { marginTop: 0 }, /* @__PURE__ */ React91.createElement(
22672
- Text75,
22789
+ return /* @__PURE__ */ React92.createElement(Box71, { key: option.label, flexDirection: "column" }, /* @__PURE__ */ React92.createElement(Text76, { color }, pointer, " ", indicator, " ", option.label), /* @__PURE__ */ React92.createElement(Text76, { color: theme.secondaryText }, " ", option.description));
22790
+ }), /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column" }, /* @__PURE__ */ React92.createElement(Text76, { color: isOtherFocused ? theme.pyb : theme.text }, isOtherFocused ? figures8.pointer : " ", " ", currentQuestion.multiSelect ? otherSelected ? figures8.checkboxOn : figures8.checkboxOff : otherSelected ? figures8.tick : " ", " ", "Other"), (isOtherFocused || otherSelected || otherText.trim().length > 0) && /* @__PURE__ */ React92.createElement(Text76, { color: theme.secondaryText }, otherLine, isOtherFocused && /* @__PURE__ */ React92.createElement(Text76, { color: "gray" }, "\u258C"))), currentQuestion.multiSelect && /* @__PURE__ */ React92.createElement(Box71, { marginTop: 0 }, /* @__PURE__ */ React92.createElement(
22791
+ Text76,
22673
22792
  {
22674
22793
  color: isMultiSelectSubmitFocused ? theme.pyb : theme.text,
22675
22794
  bold: isMultiSelectSubmitFocused
@@ -22677,9 +22796,9 @@ function AskUserQuestionPermissionRequest({
22677
22796
  isMultiSelectSubmitFocused ? figures8.pointer : " ",
22678
22797
  " ",
22679
22798
  currentQuestionIndex === questions.length - 1 ? "Submit" : "Next"
22680
- )), /* @__PURE__ */ React91.createElement(Box70, { marginTop: 1 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.secondaryText, dimColor: true }, "Enter to select \xB7 Tab/Arrow keys to navigate \xB7 Esc to cancel")));
22799
+ )), /* @__PURE__ */ React92.createElement(Box71, { marginTop: 1 }, /* @__PURE__ */ React92.createElement(Text76, { color: theme.secondaryText, dimColor: true }, "Enter to select \xB7 Tab/Arrow keys to navigate \xB7 Esc to cancel")));
22681
22800
  })())),
22682
- isSubmitTab && /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column" }, /* @__PURE__ */ React91.createElement(Text75, { bold: true }, "Review your answers"), !allQuestionsAnswered && /* @__PURE__ */ React91.createElement(Box70, { marginTop: 1 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.warning }, figures8.warning, " You have not answered all questions")), /* @__PURE__ */ React91.createElement(Box70, { flexDirection: "column", marginTop: 1 }, questions.filter((q) => q?.question && answers[q.question]).map((q) => /* @__PURE__ */ React91.createElement(Box70, { key: q.question, flexDirection: "column", marginLeft: 1 }, /* @__PURE__ */ React91.createElement(Text75, null, figures8.bullet, " ", q.question), /* @__PURE__ */ React91.createElement(Box70, { marginLeft: 2 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.success }, figures8.arrowRight, " ", answers[q.question]))))), /* @__PURE__ */ React91.createElement(Box70, { marginTop: 1 }, /* @__PURE__ */ React91.createElement(Text75, { color: theme.secondaryText }, "Ready to submit your answers?")), /* @__PURE__ */ React91.createElement(Box70, { marginTop: 1 }, /* @__PURE__ */ React91.createElement(
22801
+ isSubmitTab && /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column" }, /* @__PURE__ */ React92.createElement(Text76, { bold: true }, "Review your answers"), !allQuestionsAnswered && /* @__PURE__ */ React92.createElement(Box71, { marginTop: 1 }, /* @__PURE__ */ React92.createElement(Text76, { color: theme.warning }, figures8.warning, " You have not answered all questions")), /* @__PURE__ */ React92.createElement(Box71, { flexDirection: "column", marginTop: 1 }, questions.filter((q) => q?.question && answers[q.question]).map((q) => /* @__PURE__ */ React92.createElement(Box71, { key: q.question, flexDirection: "column", marginLeft: 1 }, /* @__PURE__ */ React92.createElement(Text76, null, figures8.bullet, " ", q.question), /* @__PURE__ */ React92.createElement(Box71, { marginLeft: 2 }, /* @__PURE__ */ React92.createElement(Text76, { color: theme.success }, figures8.arrowRight, " ", answers[q.question]))))), /* @__PURE__ */ React92.createElement(Box71, { marginTop: 1 }, /* @__PURE__ */ React92.createElement(Text76, { color: theme.secondaryText }, "Ready to submit your answers?")), /* @__PURE__ */ React92.createElement(Box71, { marginTop: 1 }, /* @__PURE__ */ React92.createElement(
22683
22802
  Select,
22684
22803
  {
22685
22804
  options: [
@@ -22749,7 +22868,7 @@ function PermissionRequest({
22749
22868
  `${PRODUCT_NAME} needs your permission to use ${toolName}`
22750
22869
  );
22751
22870
  const PermissionComponent = permissionComponentForTool(toolUseConfirm.tool);
22752
- return /* @__PURE__ */ React92.createElement(
22871
+ return /* @__PURE__ */ React93.createElement(
22753
22872
  PermissionComponent,
22754
22873
  {
22755
22874
  toolUseConfirm,
@@ -22760,8 +22879,8 @@ function PermissionRequest({
22760
22879
  }
22761
22880
 
22762
22881
  // src/ui/components/PromptInput.tsx
22763
- import { Box as Box73, Text as Text78, useInput as useInput27 } from "ink";
22764
- import * as React96 from "react";
22882
+ import { Box as Box74, Text as Text79, useInput as useInput27 } from "ink";
22883
+ import * as React97 from "react";
22765
22884
 
22766
22885
  // src/ui/hooks/useArrowKeyHistory.ts
22767
22886
  import { useState as useState23 } from "react";
@@ -24795,8 +24914,8 @@ function countTokens(messages) {
24795
24914
  }
24796
24915
 
24797
24916
  // src/ui/components/SentryErrorBoundary.ts
24798
- import * as React93 from "react";
24799
- var SentryErrorBoundary = class extends React93.Component {
24917
+ import * as React94 from "react";
24918
+ var SentryErrorBoundary = class extends React94.Component {
24800
24919
  constructor(props) {
24801
24920
  super(props);
24802
24921
  this.state = { hasError: false };
@@ -24819,8 +24938,8 @@ var SentryErrorBoundary = class extends React93.Component {
24819
24938
  };
24820
24939
 
24821
24940
  // src/ui/components/TokenWarning.tsx
24822
- import { Box as Box71, Text as Text76 } from "ink";
24823
- import * as React94 from "react";
24941
+ import { Box as Box72, Text as Text77 } from "ink";
24942
+ import * as React95 from "react";
24824
24943
  var MAX_TOKENS = 19e4;
24825
24944
  var WARNING_THRESHOLD = MAX_TOKENS * 0.6;
24826
24945
  var ERROR_THRESHOLD = MAX_TOKENS * 0.8;
@@ -24830,7 +24949,7 @@ function TokenWarning({ tokenUsage }) {
24830
24949
  return null;
24831
24950
  }
24832
24951
  const isError = tokenUsage >= ERROR_THRESHOLD;
24833
- return /* @__PURE__ */ React94.createElement(Box71, { flexDirection: "row" }, /* @__PURE__ */ React94.createElement(Text76, { color: isError ? theme.error : theme.warning }, "Context low (", Math.max(0, 100 - Math.round(tokenUsage / MAX_TOKENS * 100)), "% remaining) \xB7 Run /compact to compact & continue"));
24952
+ return /* @__PURE__ */ React95.createElement(Box72, { flexDirection: "row" }, /* @__PURE__ */ React95.createElement(Text77, { color: isError ? theme.error : theme.warning }, "Context low (", Math.max(0, 100 - Math.round(tokenUsage / MAX_TOKENS * 100)), "% remaining) \xB7 Run /compact to compact & continue"));
24834
24953
  }
24835
24954
 
24836
24955
  // src/utils/commands/hashCommand.ts
@@ -24876,8 +24995,8 @@ _Added on ${now.toLocaleString()} ${timezone}_`;
24876
24995
  }
24877
24996
 
24878
24997
  // src/ui/components/ModeIndicator.tsx
24879
- import React95 from "react";
24880
- import { Box as Box72, Text as Text77 } from "ink";
24998
+ import React96 from "react";
24999
+ import { Box as Box73, Text as Text78 } from "ink";
24881
25000
  function __getModeIndicatorDisplayForTests(args) {
24882
25001
  if (args.mode === "default") {
24883
25002
  return {
@@ -24948,7 +25067,7 @@ function CompactModeIndicator() {
24948
25067
  shortcutDisplayText: shortcut.displayText,
24949
25068
  theme
24950
25069
  });
24951
- return /* @__PURE__ */ React95.createElement(Text77, { color: indicator.color }, indicator.mainText, /* @__PURE__ */ React95.createElement(Text77, { dimColor: true }, indicator.shortcutHintText));
25070
+ return /* @__PURE__ */ React96.createElement(Text78, { color: indicator.color }, indicator.mainText, /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, indicator.shortcutHintText));
24952
25071
  }
24953
25072
 
24954
25073
  // src/utils/terminal/promptInputSpecialKey.ts
@@ -25075,7 +25194,7 @@ function useStatusLine() {
25075
25194
  // src/ui/components/PromptInput.tsx
25076
25195
  async function interpretHashCommand(input) {
25077
25196
  try {
25078
- const { queryQuick: queryQuick2 } = await import("./llm-7DBQPG47.js");
25197
+ const { queryQuick: queryQuick2 } = await import("./llm-VHGMLUMA.js");
25079
25198
  const systemPrompt = [
25080
25199
  "You're helping the user structure notes that will be added to their PYB.md file.",
25081
25200
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -25126,7 +25245,10 @@ function PromptInput({
25126
25245
  onShowMessageSelector,
25127
25246
  setForkConvoWithMessagesOnTheNextRender,
25128
25247
  readFileTimestamps,
25129
- onModelChange
25248
+ onModelChange,
25249
+ onQueueMessage,
25250
+ onQueueEditRequest,
25251
+ hasQueuedMessages
25130
25252
  }) {
25131
25253
  useEffect23(() => {
25132
25254
  if (!isDisabled && !isLoading) {
@@ -25147,8 +25269,9 @@ function PromptInput({
25147
25269
  const [pastedImages, setPastedImages] = useState26([]);
25148
25270
  const [isEditingExternally, setIsEditingExternally] = useState26(false);
25149
25271
  const [currentPwd, setCurrentPwd] = useState26(process.cwd());
25150
- const pastedTextCounter = React96.useRef(1);
25151
- const pastedImageCounter = React96.useRef(1);
25272
+ const [editingQueuedId, setEditingQueuedId] = useState26(null);
25273
+ const pastedTextCounter = React97.useRef(1);
25274
+ const pastedImageCounter = React97.useRef(1);
25152
25275
  const { cycleMode, currentMode, toolPermissionContext } = usePermissionContext();
25153
25276
  const modeCycleShortcut = useMemo25(() => getPermissionModeCycleShortcut(), []);
25154
25277
  const showQuickModelSwitchShortcut = modeCycleShortcut.displayText !== "alt+m";
@@ -25183,13 +25306,13 @@ function PromptInput({
25183
25306
  const isSelected = index === selectedIndex;
25184
25307
  const isAgent = suggestion.type === "agent";
25185
25308
  const displayColor = isSelected ? theme.suggestion : isAgent && suggestion.metadata?.color ? suggestion.metadata.color : void 0;
25186
- return /* @__PURE__ */ React96.createElement(
25187
- Box73,
25309
+ return /* @__PURE__ */ React97.createElement(
25310
+ Box74,
25188
25311
  {
25189
25312
  key: `${suggestion.type}-${suggestion.value}-${index}`,
25190
25313
  flexDirection: "row"
25191
25314
  },
25192
- /* @__PURE__ */ React96.createElement(Text78, { color: displayColor, dimColor: !isSelected && !displayColor }, isSelected ? "\u25C6 " : " ", suggestion.displayValue)
25315
+ /* @__PURE__ */ React97.createElement(Text79, { color: displayColor, dimColor: !isSelected && !displayColor }, isSelected ? "\u25C6 " : " ", suggestion.displayValue)
25193
25316
  );
25194
25317
  });
25195
25318
  }, [suggestions, selectedIndex, theme.suggestion]);
@@ -25256,6 +25379,16 @@ function PromptInput({
25256
25379
  );
25257
25380
  const handleHistoryUp = () => {
25258
25381
  if (!completionActive) {
25382
+ if (isLoading && hasQueuedMessages && onQueueEditRequest) {
25383
+ const queued = onQueueEditRequest(editingQueuedId ?? void 0);
25384
+ if (queued) {
25385
+ onInputChange(queued.content);
25386
+ onModeChange(queued.mode);
25387
+ setCursorOffset(queued.content.length);
25388
+ setEditingQueuedId(queued.id);
25389
+ return;
25390
+ }
25391
+ }
25259
25392
  onHistoryUp();
25260
25393
  }
25261
25394
  };
@@ -25268,6 +25401,47 @@ function PromptInput({
25268
25401
  if (!isSubmittingSlashCommand && completionActive && suggestions.length > 0) {
25269
25402
  return;
25270
25403
  }
25404
+ if (input2 === "" && !(isLoading && editingQueuedId)) {
25405
+ return;
25406
+ }
25407
+ if (isDisabled) {
25408
+ return;
25409
+ }
25410
+ if (isLoading) {
25411
+ if (onQueueMessage) {
25412
+ if (editingQueuedId) {
25413
+ if (input2 === "") {
25414
+ onQueueMessage({
25415
+ content: "",
25416
+ mode,
25417
+ replaceId: editingQueuedId,
25418
+ delete: true
25419
+ });
25420
+ setEditingQueuedId(null);
25421
+ onInputChange("");
25422
+ setCursorOffset(0);
25423
+ return;
25424
+ }
25425
+ const inputToAdd2 = mode === "bash" ? `!${input2}` : input2;
25426
+ addToHistory(inputToAdd2);
25427
+ resetHistory();
25428
+ onInputChange("");
25429
+ onQueueMessage({
25430
+ content: input2,
25431
+ mode,
25432
+ replaceId: editingQueuedId
25433
+ });
25434
+ setEditingQueuedId(null);
25435
+ return;
25436
+ }
25437
+ const inputToAdd = mode === "bash" ? `!${input2}` : input2;
25438
+ addToHistory(inputToAdd);
25439
+ resetHistory();
25440
+ onInputChange("");
25441
+ onQueueMessage({ content: input2, mode });
25442
+ }
25443
+ return;
25444
+ }
25271
25445
  if ((mode === "pyb" || input2.startsWith("#")) && input2.match(/^(#\s*)?(put|create|generate|write|give|provide)/i)) {
25272
25446
  try {
25273
25447
  const originalInput = input2;
@@ -25334,15 +25508,6 @@ function PromptInput({
25334
25508
  onModeChange("prompt");
25335
25509
  return;
25336
25510
  }
25337
- if (input2 === "") {
25338
- return;
25339
- }
25340
- if (isDisabled) {
25341
- return;
25342
- }
25343
- if (isLoading) {
25344
- return;
25345
- }
25346
25511
  if (["exit", "quit", ":q", ":q!", ":wq", ":wq!"].includes(input2.trim())) {
25347
25512
  exit();
25348
25513
  }
@@ -25388,7 +25553,7 @@ function PromptInput({
25388
25553
  if (messages2.length) {
25389
25554
  if (mode === "bash") {
25390
25555
  onQuery(messages2, newAbortController).then(async () => {
25391
- const { getCwd: getCwd2 } = await import("./state-YP6DLLAI.js");
25556
+ const { getCwd: getCwd2 } = await import("./state-OQTB4HM4.js");
25392
25557
  setCurrentPwd(getCwd2());
25393
25558
  });
25394
25559
  } else {
@@ -25440,6 +25605,12 @@ function PromptInput({
25440
25605
  }, [input]);
25441
25606
  useInput27(
25442
25607
  (inputChar, key) => {
25608
+ if (key.escape && isLoading && editingQueuedId) {
25609
+ setEditingQueuedId(null);
25610
+ onInputChange("");
25611
+ setCursorOffset(0);
25612
+ return true;
25613
+ }
25443
25614
  if (mode === "bash" && (key.backspace || key.delete)) {
25444
25615
  if (input === "") {
25445
25616
  onModeChange("prompt");
@@ -25544,17 +25715,17 @@ function PromptInput({
25544
25715
  currentTokens: tokenUsage
25545
25716
  };
25546
25717
  }, [tokenUsage, modelSwitchMessage.show, submitCount, currentModelId]);
25547
- return /* @__PURE__ */ React96.createElement(Box73, { flexDirection: "column" }, (mode === "bash" || modelInfo) && /* @__PURE__ */ React96.createElement(
25548
- Box73,
25718
+ return /* @__PURE__ */ React97.createElement(Box74, { flexDirection: "column" }, (mode === "bash" || modelInfo) && /* @__PURE__ */ React97.createElement(
25719
+ Box74,
25549
25720
  {
25550
25721
  justifyContent: "space-between",
25551
25722
  marginBottom: 1,
25552
25723
  flexDirection: "row"
25553
25724
  },
25554
- mode === "bash" ? /* @__PURE__ */ React96.createElement(Text78, { color: theme.bashBorder }, "Shell PWD: ", currentPwd) : /* @__PURE__ */ React96.createElement(Text78, null, " "),
25555
- modelInfo && /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, "[", modelInfo.provider, "] ", modelInfo.name, ":", " ", Math.round(modelInfo.currentTokens / 1e3), "k /", " ", Math.round(modelInfo.contextLength / 1e3), "k")
25556
- ), /* @__PURE__ */ React96.createElement(
25557
- Box73,
25725
+ mode === "bash" ? /* @__PURE__ */ React97.createElement(Text79, { color: theme.bashBorder }, "Shell PWD: ", currentPwd) : /* @__PURE__ */ React97.createElement(Text79, null, " "),
25726
+ modelInfo && /* @__PURE__ */ React97.createElement(Text79, { dimColor: true }, "[", modelInfo.provider, "] ", modelInfo.name, ":", " ", Math.round(modelInfo.currentTokens / 1e3), "k /", " ", Math.round(modelInfo.contextLength / 1e3), "k")
25727
+ ), /* @__PURE__ */ React97.createElement(
25728
+ Box74,
25558
25729
  {
25559
25730
  alignItems: "flex-start",
25560
25731
  justifyContent: "flex-start",
@@ -25568,8 +25739,8 @@ function PromptInput({
25568
25739
  marginTop: 1,
25569
25740
  width: "100%"
25570
25741
  },
25571
- /* @__PURE__ */ React96.createElement(
25572
- Box73,
25742
+ /* @__PURE__ */ React97.createElement(
25743
+ Box74,
25573
25744
  {
25574
25745
  alignItems: "flex-start",
25575
25746
  alignSelf: "flex-start",
@@ -25577,9 +25748,9 @@ function PromptInput({
25577
25748
  justifyContent: "flex-start",
25578
25749
  width: 3
25579
25750
  },
25580
- mode === "bash" ? /* @__PURE__ */ React96.createElement(Text78, { color: theme.bashBorder }, "\xA0!\xA0") : mode === "pyb" ? /* @__PURE__ */ React96.createElement(Text78, { color: theme.noting }, "\xA0#\xA0") : /* @__PURE__ */ React96.createElement(Text78, { color: isLoading ? theme.secondaryText : void 0 }, "P>\xA0")
25751
+ mode === "bash" ? /* @__PURE__ */ React97.createElement(Text79, { color: theme.bashBorder }, "\xA0!\xA0") : mode === "pyb" ? /* @__PURE__ */ React97.createElement(Text79, { color: theme.noting }, "\xA0#\xA0") : /* @__PURE__ */ React97.createElement(Text79, { color: isLoading ? theme.secondaryText : void 0 }, "P>\xA0")
25581
25752
  ),
25582
- /* @__PURE__ */ React96.createElement(Box73, { paddingRight: 1 }, /* @__PURE__ */ React96.createElement(
25753
+ /* @__PURE__ */ React97.createElement(Box74, { paddingRight: 1 }, /* @__PURE__ */ React97.createElement(
25583
25754
  TextInput,
25584
25755
  {
25585
25756
  multiline: true,
@@ -25604,44 +25775,44 @@ function PromptInput({
25604
25775
  onSpecialKey: handleSpecialKey
25605
25776
  }
25606
25777
  ))
25607
- ), !completionActive && suggestions.length === 0 && /* @__PURE__ */ React96.createElement(Box73, { flexDirection: "column", paddingX: 2, paddingY: 0 }, /* @__PURE__ */ React96.createElement(Box73, { flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React96.createElement(Box73, { justifyContent: "flex-start", gap: 1 }, exitMessage.show ? /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, "Press ", exitMessage.key, " again to exit") : message.show ? /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, message.text) : rewindMessagePending ? /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, "Press Escape again to undo") : modelSwitchMessage.show ? /* @__PURE__ */ React96.createElement(Text78, { color: theme.success }, modelSwitchMessage.text) : mode === "prompt" && currentMode !== "default" ? /* @__PURE__ */ React96.createElement(CompactModeIndicator, null) : /* @__PURE__ */ React96.createElement(React96.Fragment, null, /* @__PURE__ */ React96.createElement(
25608
- Text78,
25778
+ ), !completionActive && suggestions.length === 0 && /* @__PURE__ */ React97.createElement(Box74, { flexDirection: "column", paddingX: 2, paddingY: 0 }, /* @__PURE__ */ React97.createElement(Box74, { flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React97.createElement(Box74, { justifyContent: "flex-start", gap: 1 }, exitMessage.show ? /* @__PURE__ */ React97.createElement(Text79, { dimColor: true }, "Press ", exitMessage.key, " again to exit") : message.show ? /* @__PURE__ */ React97.createElement(Text79, { dimColor: true }, message.text) : rewindMessagePending ? /* @__PURE__ */ React97.createElement(Text79, { dimColor: true }, "Press Escape again to undo") : modelSwitchMessage.show ? /* @__PURE__ */ React97.createElement(Text79, { color: theme.success }, modelSwitchMessage.text) : mode === "prompt" && currentMode !== "default" ? /* @__PURE__ */ React97.createElement(CompactModeIndicator, null) : /* @__PURE__ */ React97.createElement(React97.Fragment, null, /* @__PURE__ */ React97.createElement(
25779
+ Text79,
25609
25780
  {
25610
25781
  color: mode === "bash" ? theme.bashBorder : void 0,
25611
25782
  dimColor: mode !== "bash"
25612
25783
  },
25613
25784
  "! run some shell command"
25614
- ), /* @__PURE__ */ React96.createElement(Text78, { dimColor: true }, " \xB7 / for commands"), /* @__PURE__ */ React96.createElement(
25615
- Text78,
25785
+ ), /* @__PURE__ */ React97.createElement(Text79, { dimColor: true }, " \xB7 / for commands"), /* @__PURE__ */ React97.createElement(
25786
+ Text79,
25616
25787
  {
25617
25788
  color: mode === "pyb" ? theme.noting : void 0,
25618
25789
  dimColor: mode !== "pyb"
25619
25790
  },
25620
25791
  " ",
25621
25792
  "\xB7 # tell agent something to remember forever"
25622
- ))), /* @__PURE__ */ React96.createElement(Box73, { justifyContent: "flex-end" }, /* @__PURE__ */ React96.createElement(Text78, { dimColor: true, wrap: "truncate-end" }, statusLine ? `${statusLine} \xB7 ESC to interrupt \xB7 2\xD7ESC for undo` : "ESC to interrupt \xB7 2\xD7ESC for undo"))), !exitMessage.show && !message.show && !modelSwitchMessage.show && !rewindMessagePending && /* @__PURE__ */ React96.createElement(Box73, { flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React96.createElement(Box73, { justifyContent: "flex-start", gap: 1 }, /* @__PURE__ */ React96.createElement(Text78, { dimColor: true, wrap: "truncate-end" }, "option+enter: newline \xB7", " ", showQuickModelSwitchShortcut ? "option+m: switch model \xB7 " : "", "option+g: external editor \xB7 ", modeCycleShortcut.displayText, ": switch mode")), /* @__PURE__ */ React96.createElement(
25793
+ ))), /* @__PURE__ */ React97.createElement(Box74, { justifyContent: "flex-end" }, /* @__PURE__ */ React97.createElement(Text79, { dimColor: true, wrap: "truncate-end" }, statusLine ? `${statusLine} \xB7 ESC to interrupt \xB7 2\xD7ESC for undo` : "ESC to interrupt \xB7 2\xD7ESC for undo"))), !exitMessage.show && !message.show && !modelSwitchMessage.show && !rewindMessagePending && /* @__PURE__ */ React97.createElement(Box74, { flexDirection: "row", justifyContent: "space-between" }, /* @__PURE__ */ React97.createElement(Box74, { justifyContent: "flex-start", gap: 1 }, /* @__PURE__ */ React97.createElement(Text79, { dimColor: true, wrap: "truncate-end" }, "option+enter: newline \xB7", " ", showQuickModelSwitchShortcut ? "option+m: switch model \xB7 " : "", "option+g: external editor \xB7 ", modeCycleShortcut.displayText, ": switch mode")), /* @__PURE__ */ React97.createElement(
25623
25794
  SentryErrorBoundary,
25624
25795
  {
25625
- children: /* @__PURE__ */ React96.createElement(Box73, { justifyContent: "flex-end", gap: 1 }, /* @__PURE__ */ React96.createElement(TokenWarning, { tokenUsage }))
25796
+ children: /* @__PURE__ */ React97.createElement(Box74, { justifyContent: "flex-end", gap: 1 }, /* @__PURE__ */ React97.createElement(TokenWarning, { tokenUsage }))
25626
25797
  }
25627
- ))), suggestions.length > 0 && /* @__PURE__ */ React96.createElement(
25628
- Box73,
25798
+ ))), suggestions.length > 0 && /* @__PURE__ */ React97.createElement(
25799
+ Box74,
25629
25800
  {
25630
25801
  flexDirection: "row",
25631
25802
  justifyContent: "space-between",
25632
25803
  paddingX: 2,
25633
25804
  paddingY: 0
25634
25805
  },
25635
- /* @__PURE__ */ React96.createElement(Box73, { flexDirection: "column" }, renderedSuggestions, /* @__PURE__ */ React96.createElement(
25636
- Box73,
25806
+ /* @__PURE__ */ React97.createElement(Box74, { flexDirection: "column" }, renderedSuggestions, /* @__PURE__ */ React97.createElement(
25807
+ Box74,
25637
25808
  {
25638
25809
  marginTop: 1,
25639
25810
  paddingX: 3,
25640
25811
  borderStyle: "round",
25641
25812
  borderColor: "gray"
25642
25813
  },
25643
- /* @__PURE__ */ React96.createElement(
25644
- Text78,
25814
+ /* @__PURE__ */ React97.createElement(
25815
+ Text79,
25645
25816
  {
25646
25817
  dimColor: !emptyDirMessage,
25647
25818
  color: emptyDirMessage ? "yellow" : void 0
@@ -25661,10 +25832,10 @@ function PromptInput({
25661
25832
  })()
25662
25833
  )
25663
25834
  )),
25664
- /* @__PURE__ */ React96.createElement(
25835
+ /* @__PURE__ */ React97.createElement(
25665
25836
  SentryErrorBoundary,
25666
25837
  {
25667
- children: /* @__PURE__ */ React96.createElement(Box73, { justifyContent: "flex-end", gap: 1 }, /* @__PURE__ */ React96.createElement(TokenWarning, { tokenUsage: countTokens(messages) }))
25838
+ children: /* @__PURE__ */ React97.createElement(Box74, { justifyContent: "flex-end", gap: 1 }, /* @__PURE__ */ React97.createElement(TokenWarning, { tokenUsage: countTokens(messages) }))
25668
25839
  }
25669
25840
  )
25670
25841
  ));
@@ -27020,6 +27191,22 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
27020
27191
  return;
27021
27192
  }
27022
27193
  }
27194
+ const queuedMessages = await toolUseContext.options?.dequeueQueuedMessagesForNextTurn?.(
27195
+ assistantMessage.message?.id
27196
+ );
27197
+ if (queuedMessages && queuedMessages.length > 0) {
27198
+ yield assistantMessage;
27199
+ yield* await queryCore(
27200
+ [...messages, assistantMessage, ...queuedMessages],
27201
+ systemPrompt,
27202
+ context,
27203
+ canUseTool,
27204
+ toolUseContext,
27205
+ getBinaryFeedbackResponse,
27206
+ hookState
27207
+ );
27208
+ return;
27209
+ }
27023
27210
  yield assistantMessage;
27024
27211
  return;
27025
27212
  }
@@ -27048,8 +27235,17 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
27048
27235
  return;
27049
27236
  }
27050
27237
  try {
27238
+ const queuedMessages = await toolUseContext.options?.dequeueQueuedMessagesForNextTurn?.(
27239
+ assistantMessage.message?.id
27240
+ );
27241
+ const nextMessages = queuedMessages?.length ? [
27242
+ ...messages,
27243
+ assistantMessage,
27244
+ ...toolMessagesForNextTurn,
27245
+ ...queuedMessages
27246
+ ] : [...messages, assistantMessage, ...toolMessagesForNextTurn];
27051
27247
  yield* await queryCore(
27052
- [...messages, assistantMessage, ...toolMessagesForNextTurn],
27248
+ nextMessages,
27053
27249
  systemPrompt,
27054
27250
  context,
27055
27251
  canUseTool,
@@ -27465,18 +27661,99 @@ function createErrorToolResultBlock(args) {
27465
27661
  };
27466
27662
  }
27467
27663
 
27664
+ // src/utils/queue/queuedInput.ts
27665
+ function applyQueuedEdit(args) {
27666
+ const { entries, replaceId, content, mode, delete: shouldDelete } = args;
27667
+ const index = entries.findIndex((entry) => entry.id === replaceId);
27668
+ if (index === -1) {
27669
+ return entries;
27670
+ }
27671
+ if (shouldDelete) {
27672
+ return entries.filter((entry) => entry.id !== replaceId);
27673
+ }
27674
+ const target = entries[index];
27675
+ const updated = {
27676
+ ...target,
27677
+ content: content ?? target.content,
27678
+ mode: mode ?? target.mode
27679
+ };
27680
+ const next = [...entries];
27681
+ next[index] = updated;
27682
+ return next;
27683
+ }
27684
+ function takeQueuedBatch(args) {
27685
+ const { entries, activeTurnId, windowMs } = args;
27686
+ if (entries.length === 0) {
27687
+ return { batch: null, remaining: entries };
27688
+ }
27689
+ const targetId = activeTurnId ?? entries[0].activeTurnId;
27690
+ const matching = entries.filter((entry) => entry.activeTurnId === targetId);
27691
+ if (matching.length === 0) {
27692
+ return { batch: null, remaining: entries };
27693
+ }
27694
+ const sorted = [...matching].sort((a, b) => a.queuedAt - b.queuedAt);
27695
+ const first = sorted[0];
27696
+ const batchEntries = [first];
27697
+ let lastQueuedAt = first.queuedAt;
27698
+ for (let i = 1; i < sorted.length; i += 1) {
27699
+ const next = sorted[i];
27700
+ if (next.mode !== first.mode) {
27701
+ break;
27702
+ }
27703
+ if (next.queuedAt - lastQueuedAt > windowMs) {
27704
+ break;
27705
+ }
27706
+ batchEntries.push(next);
27707
+ lastQueuedAt = next.queuedAt;
27708
+ }
27709
+ const batchIds = new Set(batchEntries.map((entry) => entry.id));
27710
+ const remaining = entries.filter((entry) => !batchIds.has(entry.id));
27711
+ return {
27712
+ batch: {
27713
+ entries: batchEntries,
27714
+ activeTurnId: first.activeTurnId,
27715
+ mode: first.mode,
27716
+ queuedAt: first.queuedAt
27717
+ },
27718
+ remaining
27719
+ };
27720
+ }
27721
+ function buildQueuedWrapper(args) {
27722
+ const turn = args.activeTurnId ?? "unknown";
27723
+ const prefix = [
27724
+ "<system-reminder>",
27725
+ "\u7528\u6237\u521A\u8FFD\u52A0\u4E86\u4E00\u6761\u4EFB\u52A1\u6307\u4EE4\uFF0C\u53D1\u751F\u5728\u6A21\u578B\u8F93\u51FA\u671F\u95F4",
27726
+ "</system-reminder>",
27727
+ "<queued-user-message>",
27728
+ `<queued-at>${args.queuedAt}</queued-at>`,
27729
+ "<queued-during>assistant_response</queued-during>",
27730
+ `<queued-after-turn>${turn}</queued-after-turn>`
27731
+ ].join("\n");
27732
+ const suffix = "</queued-user-message>";
27733
+ return { prefix, suffix };
27734
+ }
27735
+ function wrapQueuedContent(args) {
27736
+ const { prefix, suffix } = buildQueuedWrapper({
27737
+ queuedAt: args.queuedAt,
27738
+ activeTurnId: args.activeTurnId
27739
+ });
27740
+ return `${prefix}
27741
+ ${args.content}
27742
+ ${suffix}`;
27743
+ }
27744
+
27468
27745
  // src/ui/components/binary-feedback/BinaryFeedback.tsx
27469
- import { default as React100, useCallback as useCallback15 } from "react";
27746
+ import { default as React101, useCallback as useCallback15 } from "react";
27470
27747
 
27471
27748
  // src/ui/components/binary-feedback/BinaryFeedbackView.tsx
27472
27749
  import chalk14 from "chalk";
27473
- import { Box as Box75, Text as Text79, useInput as useInput29 } from "ink";
27750
+ import { Box as Box76, Text as Text80, useInput as useInput29 } from "ink";
27474
27751
  import Link2 from "ink-link";
27475
- import React99, { useState as useState27 } from "react";
27752
+ import React100, { useState as useState27 } from "react";
27476
27753
 
27477
27754
  // src/ui/components/binary-feedback/BinaryFeedbackOption.tsx
27478
- import * as React98 from "react";
27479
- import { Box as Box74 } from "ink";
27755
+ import * as React99 from "react";
27756
+ import { Box as Box75 } from "ink";
27480
27757
  function BinaryFeedbackOption({
27481
27758
  debug: debug2,
27482
27759
  erroredToolUseIDs,
@@ -27488,7 +27765,7 @@ function BinaryFeedbackOption({
27488
27765
  verbose
27489
27766
  }) {
27490
27767
  const { columns } = useTerminalSize();
27491
- return normalizeMessages([message]).filter((_) => _.type !== "progress").map((_, index) => /* @__PURE__ */ React98.createElement(Box74, { flexDirection: "column", key: index }, /* @__PURE__ */ React98.createElement(
27768
+ return normalizeMessages([message]).filter((_) => _.type !== "progress").map((_, index) => /* @__PURE__ */ React99.createElement(Box75, { flexDirection: "column", key: index }, /* @__PURE__ */ React99.createElement(
27492
27769
  Message,
27493
27770
  {
27494
27771
  addMargin: false,
@@ -27504,7 +27781,7 @@ function BinaryFeedbackOption({
27504
27781
  verbose,
27505
27782
  width: columns / 2 - 6
27506
27783
  }
27507
- ), /* @__PURE__ */ React98.createElement(AdditionalContext, { message: _, verbose })));
27784
+ ), /* @__PURE__ */ React99.createElement(AdditionalContext, { message: _, verbose })));
27508
27785
  }
27509
27786
  function AdditionalContext({
27510
27787
  message,
@@ -27536,7 +27813,7 @@ function AdditionalContext({
27536
27813
  } catch {
27537
27814
  return null;
27538
27815
  }
27539
- return /* @__PURE__ */ React98.createElement(
27816
+ return /* @__PURE__ */ React99.createElement(
27540
27817
  FileEditToolDiff,
27541
27818
  {
27542
27819
  file_path: input.data.file_path,
@@ -27552,7 +27829,7 @@ function AdditionalContext({
27552
27829
  if (!input.success) {
27553
27830
  return null;
27554
27831
  }
27555
- return /* @__PURE__ */ React98.createElement(
27832
+ return /* @__PURE__ */ React99.createElement(
27556
27833
  FileWriteToolDiff,
27557
27834
  {
27558
27835
  file_path: input.data.file_path,
@@ -27617,8 +27894,8 @@ function BinaryFeedbackView({
27617
27894
  onChoose?.("neither");
27618
27895
  }
27619
27896
  });
27620
- return /* @__PURE__ */ React99.createElement(React99.Fragment, null, /* @__PURE__ */ React99.createElement(
27621
- Box75,
27897
+ return /* @__PURE__ */ React100.createElement(React100.Fragment, null, /* @__PURE__ */ React100.createElement(
27898
+ Box76,
27622
27899
  {
27623
27900
  flexDirection: "column",
27624
27901
  height: "100%",
@@ -27626,9 +27903,9 @@ function BinaryFeedbackView({
27626
27903
  borderStyle: "round",
27627
27904
  borderColor: theme.permission
27628
27905
  },
27629
- /* @__PURE__ */ React99.createElement(Box75, { width: "100%", justifyContent: "space-between", paddingX: 1 }, /* @__PURE__ */ React99.createElement(Text79, { bold: true, color: theme.permission }, "[ANT-ONLY] Help train ", PRODUCT_NAME), /* @__PURE__ */ React99.createElement(Text79, null, /* @__PURE__ */ React99.createElement(Link2, { url: HELP_URL }, "[?]"))),
27630
- /* @__PURE__ */ React99.createElement(Box75, { flexDirection: "row", width: "100%", flexGrow: 1, paddingTop: 1 }, /* @__PURE__ */ React99.createElement(
27631
- Box75,
27906
+ /* @__PURE__ */ React100.createElement(Box76, { width: "100%", justifyContent: "space-between", paddingX: 1 }, /* @__PURE__ */ React100.createElement(Text80, { bold: true, color: theme.permission }, "[ANT-ONLY] Help train ", PRODUCT_NAME), /* @__PURE__ */ React100.createElement(Text80, null, /* @__PURE__ */ React100.createElement(Link2, { url: HELP_URL }, "[?]"))),
27907
+ /* @__PURE__ */ React100.createElement(Box76, { flexDirection: "row", width: "100%", flexGrow: 1, paddingTop: 1 }, /* @__PURE__ */ React100.createElement(
27908
+ Box76,
27632
27909
  {
27633
27910
  flexDirection: "column",
27634
27911
  flexGrow: 1,
@@ -27639,7 +27916,7 @@ function BinaryFeedbackView({
27639
27916
  marginRight: 1,
27640
27917
  padding: 1
27641
27918
  },
27642
- /* @__PURE__ */ React99.createElement(
27919
+ /* @__PURE__ */ React100.createElement(
27643
27920
  BinaryFeedbackOption,
27644
27921
  {
27645
27922
  erroredToolUseIDs,
@@ -27652,8 +27929,8 @@ function BinaryFeedbackView({
27652
27929
  verbose
27653
27930
  }
27654
27931
  )
27655
- ), /* @__PURE__ */ React99.createElement(
27656
- Box75,
27932
+ ), /* @__PURE__ */ React100.createElement(
27933
+ Box76,
27657
27934
  {
27658
27935
  flexDirection: "column",
27659
27936
  flexGrow: 1,
@@ -27664,7 +27941,7 @@ function BinaryFeedbackView({
27664
27941
  marginLeft: 1,
27665
27942
  padding: 1
27666
27943
  },
27667
- /* @__PURE__ */ React99.createElement(
27944
+ /* @__PURE__ */ React100.createElement(
27668
27945
  BinaryFeedbackOption,
27669
27946
  {
27670
27947
  erroredToolUseIDs,
@@ -27678,7 +27955,7 @@ function BinaryFeedbackView({
27678
27955
  }
27679
27956
  )
27680
27957
  )),
27681
- /* @__PURE__ */ React99.createElement(Box75, { flexDirection: "column", paddingTop: 1, paddingX: 1 }, /* @__PURE__ */ React99.createElement(Text79, null, "How do you want to proceed?"), /* @__PURE__ */ React99.createElement(
27958
+ /* @__PURE__ */ React100.createElement(Box76, { flexDirection: "column", paddingTop: 1, paddingX: 1 }, /* @__PURE__ */ React100.createElement(Text80, null, "How do you want to proceed?"), /* @__PURE__ */ React100.createElement(
27682
27959
  Select,
27683
27960
  {
27684
27961
  options: getOptions2(),
@@ -27687,7 +27964,7 @@ function BinaryFeedbackView({
27687
27964
  onChange: onChoose
27688
27965
  }
27689
27966
  ))
27690
- ), exitState.pending ? /* @__PURE__ */ React99.createElement(Box75, { marginLeft: 3 }, /* @__PURE__ */ React99.createElement(Text79, { dimColor: true }, "Press ", exitState.keyName, " again to exit")) : /* @__PURE__ */ React99.createElement(Text79, null, " "));
27967
+ ), exitState.pending ? /* @__PURE__ */ React100.createElement(Box76, { marginLeft: 3 }, /* @__PURE__ */ React100.createElement(Text80, { dimColor: true }, "Press ", exitState.keyName, " again to exit")) : /* @__PURE__ */ React100.createElement(Text80, null, " "));
27691
27968
  }
27692
27969
 
27693
27970
  // src/ui/components/binary-feedback/BinaryFeedback.tsx
@@ -27713,7 +27990,7 @@ function BinaryFeedback({
27713
27990
  useNotifyAfterTimeout(
27714
27991
  `${PRODUCT_NAME} needs your input on a response comparison`
27715
27992
  );
27716
- return /* @__PURE__ */ React100.createElement(
27993
+ return /* @__PURE__ */ React101.createElement(
27717
27994
  BinaryFeedbackView,
27718
27995
  {
27719
27996
  debug: debug2,
@@ -27784,6 +28061,7 @@ async function getReasoningEffort(modelProfile, messages) {
27784
28061
  }
27785
28062
 
27786
28063
  // src/ui/screens/REPL.tsx
28064
+ import { randomUUID as randomUUID5 } from "crypto";
27787
28065
  function REPL({
27788
28066
  commands,
27789
28067
  safeMode,
@@ -27821,6 +28099,8 @@ function REPL({
27821
28099
  null
27822
28100
  );
27823
28101
  const [messages, setMessages2] = useState28(initialMessages ?? []);
28102
+ const [queuedMessages, setQueuedMessages] = useState28([]);
28103
+ const queuedMessagesRef = useRef13([]);
27824
28104
  const [inputValue, setInputValue] = useState28("");
27825
28105
  const [inputMode, setInputMode] = useState28(
27826
28106
  "prompt"
@@ -27847,6 +28127,112 @@ function REPL({
27847
28127
  []
27848
28128
  );
27849
28129
  const readFileTimestamps = useRef13({});
28130
+ const QUEUE_MERGE_WINDOW_MS = 500;
28131
+ const updateQueuedMessages = useCallback16(
28132
+ (next) => {
28133
+ queuedMessagesRef.current = next;
28134
+ setQueuedMessages(next);
28135
+ },
28136
+ []
28137
+ );
28138
+ const enqueueQueuedMessage = useCallback16(
28139
+ (args) => {
28140
+ if (args.replaceId) {
28141
+ const next = applyQueuedEdit({
28142
+ entries: queuedMessagesRef.current,
28143
+ replaceId: args.replaceId,
28144
+ content: args.content,
28145
+ mode: args.mode,
28146
+ delete: args.delete
28147
+ });
28148
+ updateQueuedMessages(next);
28149
+ return;
28150
+ }
28151
+ const entry = {
28152
+ id: randomUUID5(),
28153
+ content: args.content,
28154
+ queuedAt: Date.now(),
28155
+ activeTurnId: getLastAssistantMessageId(messages),
28156
+ mode: args.mode
28157
+ };
28158
+ updateQueuedMessages([...queuedMessagesRef.current, entry]);
28159
+ },
28160
+ [messages, updateQueuedMessages]
28161
+ );
28162
+ const dequeueQueuedMessageForEdit = useCallback16(
28163
+ (currentEditId) => {
28164
+ const current = queuedMessagesRef.current;
28165
+ if (current.length === 0) return null;
28166
+ if (!currentEditId) {
28167
+ const last2 = current[current.length - 1];
28168
+ return { id: last2.id, content: last2.content, mode: last2.mode };
28169
+ }
28170
+ const index = current.findIndex((entry) => entry.id === currentEditId);
28171
+ if (index > 0) {
28172
+ const prev = current[index - 1];
28173
+ return { id: prev.id, content: prev.content, mode: prev.mode };
28174
+ }
28175
+ const fallback = current[current.length - 1];
28176
+ return fallback ? { id: fallback.id, content: fallback.content, mode: fallback.mode } : null;
28177
+ },
28178
+ []
28179
+ );
28180
+ const dequeueQueuedMessagesForNextTurn = useCallback16(
28181
+ async (activeTurnId) => {
28182
+ const { batch, remaining } = takeQueuedBatch({
28183
+ entries: queuedMessagesRef.current,
28184
+ activeTurnId,
28185
+ windowMs: QUEUE_MERGE_WINDOW_MS
28186
+ });
28187
+ if (!batch) return null;
28188
+ updateQueuedMessages(remaining);
28189
+ const combinedContent = batch.entries.length === 1 ? batch.entries[0].content : batch.entries.map((entry, index) => `${index + 1}) ${entry.content}`).join("\n");
28190
+ const wrappedContent = batch.mode === "bash" ? combinedContent : wrapQueuedContent({
28191
+ content: combinedContent,
28192
+ queuedAt: new Date(batch.queuedAt).toISOString(),
28193
+ activeTurnId: batch.activeTurnId
28194
+ });
28195
+ const generatedMessages = await processUserInput(
28196
+ wrappedContent,
28197
+ batch.mode,
28198
+ setToolJSX,
28199
+ {
28200
+ options: {
28201
+ commands,
28202
+ forkNumber,
28203
+ messageLogName,
28204
+ tools,
28205
+ verbose,
28206
+ maxThinkingTokens: 0,
28207
+ safeMode,
28208
+ toolPermissionContext: getToolPermissionContextForConversationKey({
28209
+ conversationKey: `${messageLogName}:${forkNumber}`,
28210
+ isBypassPermissionsModeAvailable: !(safeMode ?? false)
28211
+ })
28212
+ },
28213
+ messageId: batch.activeTurnId,
28214
+ setForkConvoWithMessagesOnTheNextRender,
28215
+ readFileTimestamps: readFileTimestamps.current,
28216
+ abortController: abortController || new AbortController()
28217
+ },
28218
+ null
28219
+ );
28220
+ return generatedMessages;
28221
+ },
28222
+ [
28223
+ commands,
28224
+ forkNumber,
28225
+ messageLogName,
28226
+ tools,
28227
+ verbose,
28228
+ safeMode,
28229
+ setToolJSX,
28230
+ setForkConvoWithMessagesOnTheNextRender,
28231
+ messages,
28232
+ abortController,
28233
+ updateQueuedMessages
28234
+ ]
28235
+ );
27850
28236
  const { status: apiKeyStatus, reverify } = useApiKeyVerification();
27851
28237
  function onCancel() {
27852
28238
  if (!isLoading) {
@@ -27964,6 +28350,7 @@ function REPL({
27964
28350
  verbose,
27965
28351
  safeMode,
27966
28352
  maxThinkingTokens,
28353
+ dequeueQueuedMessagesForNextTurn,
27967
28354
  toolPermissionContext: getToolPermissionContextForConversationKey({
27968
28355
  conversationKey: `${messageLogName}:${forkNumber}`,
27969
28356
  isBypassPermissionsModeAvailable: !(safeMode ?? false)
@@ -28028,6 +28415,7 @@ function REPL({
28028
28415
  safeMode,
28029
28416
  maxThinkingTokens,
28030
28417
  isPybRequest: isPybRequest || void 0,
28418
+ dequeueQueuedMessagesForNextTurn,
28031
28419
  toolPermissionContext: getToolPermissionContextForConversationKey({
28032
28420
  conversationKey: `${messageLogName}:${forkNumber}`,
28033
28421
  isBypassPermissionsModeAvailable: !(safeMode ?? false)
@@ -28116,7 +28504,7 @@ function REPL({
28116
28504
  const messagesJSX = useMemo26(() => {
28117
28505
  return orderedMessages.map((_, index) => {
28118
28506
  const toolUseID = getToolUseID(_);
28119
- const message = _.type === "progress" ? _.content.message.content[0]?.type === "text" && _.content.message.content[0].text === INTERRUPT_MESSAGE ? /* @__PURE__ */ React101.createElement(
28507
+ const message = _.type === "progress" ? _.content.message.content[0]?.type === "text" && _.content.message.content[0].text === INTERRUPT_MESSAGE ? /* @__PURE__ */ React102.createElement(
28120
28508
  Message,
28121
28509
  {
28122
28510
  message: _.content,
@@ -28131,10 +28519,10 @@ function REPL({
28131
28519
  shouldAnimate: false,
28132
28520
  shouldShowDot: false
28133
28521
  }
28134
- ) : /* @__PURE__ */ React101.createElement(
28522
+ ) : /* @__PURE__ */ React102.createElement(
28135
28523
  MessageResponse,
28136
28524
  {
28137
- children: /* @__PURE__ */ React101.createElement(
28525
+ children: /* @__PURE__ */ React102.createElement(
28138
28526
  Message,
28139
28527
  {
28140
28528
  message: _.content,
@@ -28153,7 +28541,7 @@ function REPL({
28153
28541
  }
28154
28542
  )
28155
28543
  }
28156
- ) : /* @__PURE__ */ React101.createElement(
28544
+ ) : /* @__PURE__ */ React102.createElement(
28157
28545
  Message,
28158
28546
  {
28159
28547
  message: _,
@@ -28172,8 +28560,8 @@ function REPL({
28172
28560
  const isInStaticPrefix = index < replStaticPrefixLength;
28173
28561
  if (debug2) {
28174
28562
  return {
28175
- jsx: /* @__PURE__ */ React101.createElement(
28176
- Box76,
28563
+ jsx: /* @__PURE__ */ React102.createElement(
28564
+ Box77,
28177
28565
  {
28178
28566
  borderStyle: "single",
28179
28567
  borderColor: isInStaticPrefix ? "green" : "red",
@@ -28185,7 +28573,7 @@ function REPL({
28185
28573
  };
28186
28574
  }
28187
28575
  return {
28188
- jsx: /* @__PURE__ */ React101.createElement(Box76, { key: _.uuid, width: "100%" }, message)
28576
+ jsx: /* @__PURE__ */ React102.createElement(Box77, { key: _.uuid, width: "100%" }, message)
28189
28577
  };
28190
28578
  });
28191
28579
  }, [
@@ -28208,7 +28596,7 @@ function REPL({
28208
28596
  const staticItems = useMemo26(
28209
28597
  () => [
28210
28598
  {
28211
- jsx: /* @__PURE__ */ React101.createElement(Box76, { flexDirection: "column", key: `logo${forkNumber}` }, /* @__PURE__ */ React101.createElement(
28599
+ jsx: /* @__PURE__ */ React102.createElement(Box77, { flexDirection: "column", key: `logo${forkNumber}` }, /* @__PURE__ */ React102.createElement(
28212
28600
  Logo,
28213
28601
  {
28214
28602
  mcpClients,
@@ -28216,7 +28604,7 @@ function REPL({
28216
28604
  updateBannerVersion: updateAvailableVersion,
28217
28605
  updateBannerCommands: updateCommands
28218
28606
  }
28219
- ), /* @__PURE__ */ React101.createElement(ProjectOnboarding, { workspaceDir: getOriginalCwd() }))
28607
+ ), /* @__PURE__ */ React102.createElement(ProjectOnboarding, { workspaceDir: getOriginalCwd() }))
28220
28608
  },
28221
28609
  ...messagesJSX.slice(0, replStaticPrefixLength)
28222
28610
  ],
@@ -28236,23 +28624,24 @@ function REPL({
28236
28624
  );
28237
28625
  const showingCostDialog = !isLoading && showCostDialog;
28238
28626
  const conversationKey = `${messageLogName}:${forkNumber}`;
28239
- return /* @__PURE__ */ React101.createElement(
28627
+ const hasQueuedMessages = queuedMessages.length > 0;
28628
+ return /* @__PURE__ */ React102.createElement(
28240
28629
  PermissionProvider,
28241
28630
  {
28242
28631
  conversationKey,
28243
28632
  isBypassPermissionsModeAvailable: !safeMode
28244
28633
  },
28245
- /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(React101.Fragment, { key: `static-messages-${forkNumber}` }, /* @__PURE__ */ React101.createElement(Static2, { items: staticItems, children: (item) => item.jsx })), /* @__PURE__ */ React101.createElement(TaskPanel, null), transientItems.map((_) => _.jsx), /* @__PURE__ */ React101.createElement(
28246
- Box76,
28634
+ /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(React102.Fragment, { key: `static-messages-${forkNumber}` }, /* @__PURE__ */ React102.createElement(Static2, { items: staticItems, children: (item) => item.jsx })), /* @__PURE__ */ React102.createElement(TaskPanel, null), transientItems.map((_) => _.jsx), /* @__PURE__ */ React102.createElement(
28635
+ Box77,
28247
28636
  {
28248
28637
  borderColor: "red",
28249
28638
  borderStyle: debug2 ? "single" : void 0,
28250
28639
  flexDirection: "column",
28251
28640
  width: "100%"
28252
28641
  },
28253
- !toolJSX && !toolUseConfirm && !binaryFeedbackContext && isLoading && /* @__PURE__ */ React101.createElement(RequestStatusIndicator, null),
28642
+ !toolJSX && !toolUseConfirm && !binaryFeedbackContext && isLoading && /* @__PURE__ */ React102.createElement(RequestStatusIndicator, null),
28254
28643
  toolJSX ? toolJSX.jsx : null,
28255
- !toolJSX && binaryFeedbackContext && !isMessageSelectorVisible && /* @__PURE__ */ React101.createElement(
28644
+ !toolJSX && binaryFeedbackContext && !isMessageSelectorVisible && /* @__PURE__ */ React102.createElement(
28256
28645
  BinaryFeedback,
28257
28646
  {
28258
28647
  m1: binaryFeedbackContext.m1,
@@ -28270,7 +28659,7 @@ function REPL({
28270
28659
  unresolvedToolUseIDs
28271
28660
  }
28272
28661
  ),
28273
- !toolJSX && toolUseConfirm && !isMessageSelectorVisible && !binaryFeedbackContext && /* @__PURE__ */ React101.createElement(
28662
+ !toolJSX && toolUseConfirm && !isMessageSelectorVisible && !binaryFeedbackContext && /* @__PURE__ */ React102.createElement(
28274
28663
  PermissionRequest,
28275
28664
  {
28276
28665
  toolUseConfirm,
@@ -28278,7 +28667,7 @@ function REPL({
28278
28667
  verbose
28279
28668
  }
28280
28669
  ),
28281
- !toolJSX && !toolUseConfirm && !isMessageSelectorVisible && !binaryFeedbackContext && showingCostDialog && /* @__PURE__ */ React101.createElement(
28670
+ !toolJSX && !toolUseConfirm && !isMessageSelectorVisible && !binaryFeedbackContext && showingCostDialog && /* @__PURE__ */ React102.createElement(
28282
28671
  CostThresholdDialog,
28283
28672
  {
28284
28673
  onDone: () => {
@@ -28292,7 +28681,17 @@ function REPL({
28292
28681
  }
28293
28682
  }
28294
28683
  ),
28295
- !toolUseConfirm && !toolJSX?.shouldHidePromptInput && shouldShowPromptInput && !isMessageSelectorVisible && !binaryFeedbackContext && !showingCostDialog && /* @__PURE__ */ React101.createElement(React101.Fragment, null, /* @__PURE__ */ React101.createElement(
28684
+ /* @__PURE__ */ React102.createElement(
28685
+ QueuedMessageList,
28686
+ {
28687
+ items: queuedMessages.map((item) => ({
28688
+ id: item.id,
28689
+ content: item.content
28690
+ }))
28691
+ }
28692
+ ),
28693
+ /* @__PURE__ */ React102.createElement(QueuedHintLine, { show: hasQueuedMessages && isLoading }),
28694
+ !toolUseConfirm && !toolJSX?.shouldHidePromptInput && shouldShowPromptInput && !isMessageSelectorVisible && !binaryFeedbackContext && !showingCostDialog && /* @__PURE__ */ React102.createElement(React102.Fragment, null, /* @__PURE__ */ React102.createElement(
28296
28695
  PromptInput_default,
28297
28696
  {
28298
28697
  commands,
@@ -28319,10 +28718,13 @@ function REPL({
28319
28718
  onShowMessageSelector: () => setIsMessageSelectorVisible((prev) => !prev),
28320
28719
  setForkConvoWithMessagesOnTheNextRender,
28321
28720
  readFileTimestamps: readFileTimestamps.current,
28322
- abortController
28721
+ abortController,
28722
+ onQueueMessage: enqueueQueuedMessage,
28723
+ onQueueEditRequest: dequeueQueuedMessageForEdit,
28724
+ hasQueuedMessages
28323
28725
  }
28324
28726
  ))
28325
- ), isMessageSelectorVisible && /* @__PURE__ */ React101.createElement(
28727
+ ), isMessageSelectorVisible && /* @__PURE__ */ React102.createElement(
28326
28728
  MessageSelector,
28327
28729
  {
28328
28730
  erroredToolUseIDs,
@@ -28348,13 +28750,13 @@ function REPL({
28348
28750
  onEscape: () => setIsMessageSelectorVisible(false),
28349
28751
  tools
28350
28752
  }
28351
- ), /* @__PURE__ */ React101.createElement(Newline4, null))
28753
+ ), /* @__PURE__ */ React102.createElement(Newline4, null))
28352
28754
  );
28353
28755
  }
28354
28756
 
28355
28757
  // src/ui/components/SessionSelector.tsx
28356
- import React102 from "react";
28357
- import { Box as Box77, Text as Text81 } from "ink";
28758
+ import React103 from "react";
28759
+ import { Box as Box78, Text as Text82 } from "ink";
28358
28760
  function SessionSelector({
28359
28761
  sessions,
28360
28762
  onSelect
@@ -28382,18 +28784,18 @@ function SessionSelector({
28382
28784
  const truncated = labelTxt.length > columns - 2 ? `${labelTxt.slice(0, columns - 5)}...` : labelTxt;
28383
28785
  return { label: truncated, value: String(i) };
28384
28786
  });
28385
- return /* @__PURE__ */ React102.createElement(Box77, { flexDirection: "column", height: "100%", width: "100%" }, /* @__PURE__ */ React102.createElement(Box77, { paddingLeft: 9 }, /* @__PURE__ */ React102.createElement(Text81, { bold: true, color: getTheme().text }, "Modified"), /* @__PURE__ */ React102.createElement(Text81, null, " "), /* @__PURE__ */ React102.createElement(Text81, { bold: true, color: getTheme().text }, "Created"), /* @__PURE__ */ React102.createElement(Text81, null, " "), /* @__PURE__ */ React102.createElement(Text81, { bold: true, color: getTheme().text }, "Tag"), /* @__PURE__ */ React102.createElement(Text81, null, " "), /* @__PURE__ */ React102.createElement(Text81, { bold: true, color: getTheme().text }, "Session")), /* @__PURE__ */ React102.createElement(
28787
+ return /* @__PURE__ */ React103.createElement(Box78, { flexDirection: "column", height: "100%", width: "100%" }, /* @__PURE__ */ React103.createElement(Box78, { paddingLeft: 9 }, /* @__PURE__ */ React103.createElement(Text82, { bold: true, color: getTheme().text }, "Modified"), /* @__PURE__ */ React103.createElement(Text82, null, " "), /* @__PURE__ */ React103.createElement(Text82, { bold: true, color: getTheme().text }, "Created"), /* @__PURE__ */ React103.createElement(Text82, null, " "), /* @__PURE__ */ React103.createElement(Text82, { bold: true, color: getTheme().text }, "Tag"), /* @__PURE__ */ React103.createElement(Text82, null, " "), /* @__PURE__ */ React103.createElement(Text82, { bold: true, color: getTheme().text }, "Session")), /* @__PURE__ */ React103.createElement(
28386
28788
  Select,
28387
28789
  {
28388
28790
  options,
28389
28791
  onChange: (value) => onSelect(parseInt(value, 10)),
28390
28792
  visibleOptionCount: visibleCount
28391
28793
  }
28392
- ), hiddenCount > 0 && /* @__PURE__ */ React102.createElement(Box77, { paddingLeft: 2 }, /* @__PURE__ */ React102.createElement(Text81, { color: getTheme().secondaryText }, "and ", hiddenCount, " more\u2026")));
28794
+ ), hiddenCount > 0 && /* @__PURE__ */ React103.createElement(Box78, { paddingLeft: 2 }, /* @__PURE__ */ React103.createElement(Text82, { color: getTheme().secondaryText }, "and ", hiddenCount, " more\u2026")));
28393
28795
  }
28394
28796
 
28395
28797
  // src/ui/screens/ResumeConversation.tsx
28396
- import { randomUUID as randomUUID5 } from "crypto";
28798
+ import { randomUUID as randomUUID6 } from "crypto";
28397
28799
  function ResumeConversation({
28398
28800
  cwd,
28399
28801
  context,
@@ -28417,7 +28819,7 @@ function ResumeConversation({
28417
28819
  if (!selected) return;
28418
28820
  context.unmount?.();
28419
28821
  const resumedFromSessionId = selected.sessionId;
28420
- const effectiveSessionId = forkSession ? forkSessionId?.trim() || randomUUID5() : resumedFromSessionId;
28822
+ const effectiveSessionId = forkSession ? forkSessionId?.trim() || randomUUID6() : resumedFromSessionId;
28421
28823
  setPybAgentSessionId(effectiveSessionId);
28422
28824
  const messages = loadPybAgentSessionMessages({
28423
28825
  cwd,
@@ -28425,7 +28827,7 @@ function ResumeConversation({
28425
28827
  });
28426
28828
  const isDefaultModel = await isDefaultSlowAndCapableModel();
28427
28829
  render(
28428
- /* @__PURE__ */ React103.createElement(
28830
+ /* @__PURE__ */ React104.createElement(
28429
28831
  REPL,
28430
28832
  {
28431
28833
  commands,
@@ -28453,7 +28855,7 @@ function ResumeConversation({
28453
28855
  throw e;
28454
28856
  }
28455
28857
  }
28456
- return /* @__PURE__ */ React103.createElement(SessionSelector, { sessions, onSelect });
28858
+ return /* @__PURE__ */ React104.createElement(SessionSelector, { sessions, onSelect });
28457
28859
  }
28458
28860
 
28459
28861
  // src/commands/resume.tsx
@@ -28476,7 +28878,7 @@ var resume_default = {
28476
28878
  return null;
28477
28879
  }
28478
28880
  render2(
28479
- /* @__PURE__ */ React104.createElement(
28881
+ /* @__PURE__ */ React105.createElement(
28480
28882
  ResumeConversation,
28481
28883
  {
28482
28884
  cwd,
@@ -28493,11 +28895,11 @@ var resume_default = {
28493
28895
  };
28494
28896
 
28495
28897
  // src/commands/agents.tsx
28496
- import React106 from "react";
28898
+ import React107 from "react";
28497
28899
 
28498
28900
  // src/commands/agents/ui.tsx
28499
- import React105, { useCallback as useCallback17, useEffect as useEffect27, useMemo as useMemo27, useRef as useRef14, useState as useState29 } from "react";
28500
- import { Box as Box78, Text as Text82, useInput as useInput30 } from "ink";
28901
+ import React106, { useCallback as useCallback17, useEffect as useEffect27, useMemo as useMemo27, useRef as useRef14, useState as useState29 } from "react";
28902
+ import { Box as Box79, Text as Text83, useInput as useInput30 } from "ink";
28501
28903
  import figures9 from "figures";
28502
28904
  import chalk15 from "chalk";
28503
28905
  import { join as join13 } from "path";
@@ -28565,9 +28967,9 @@ import { join as join12 } from "path";
28565
28967
  import { homedir as homedir8 } from "os";
28566
28968
 
28567
28969
  // src/commands/agents/generation.ts
28568
- import { randomUUID as randomUUID6 } from "crypto";
28970
+ import { randomUUID as randomUUID7 } from "crypto";
28569
28971
  async function generateAgentWithClaude(prompt) {
28570
- const { queryModel } = await import("./llm-7DBQPG47.js");
28972
+ const { queryModel } = await import("./llm-VHGMLUMA.js");
28571
28973
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
28572
28974
 
28573
28975
  Return your response as a JSON object with exactly these fields:
@@ -28580,7 +28982,7 @@ Make the agent highly specialized and effective for the described use case.`;
28580
28982
  const messages = [
28581
28983
  {
28582
28984
  type: "user",
28583
- uuid: randomUUID6(),
28985
+ uuid: randomUUID7(),
28584
28986
  message: { role: "user", content: prompt }
28585
28987
  }
28586
28988
  ];
@@ -28949,21 +29351,21 @@ function panelBorderColor(kind) {
28949
29351
  }
28950
29352
  function Panel(props) {
28951
29353
  const theme = getTheme();
28952
- return /* @__PURE__ */ React105.createElement(
28953
- Box78,
29354
+ return /* @__PURE__ */ React106.createElement(
29355
+ Box79,
28954
29356
  {
28955
29357
  borderStyle: "round",
28956
29358
  borderColor: props.borderColor ?? theme.suggestion,
28957
29359
  flexDirection: "column"
28958
29360
  },
28959
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React105.createElement(Text82, { bold: true, color: props.titleColor ?? theme.text }, props.title), props.subtitle ? /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, props.subtitle) : null),
28960
- /* @__PURE__ */ React105.createElement(Box78, { paddingX: 1, flexDirection: "column" }, props.children)
29361
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", paddingX: 1 }, /* @__PURE__ */ React106.createElement(Text83, { bold: true, color: props.titleColor ?? theme.text }, props.title), props.subtitle ? /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, props.subtitle) : null),
29362
+ /* @__PURE__ */ React106.createElement(Box79, { paddingX: 1, flexDirection: "column" }, props.children)
28961
29363
  );
28962
29364
  }
28963
29365
  function Instructions({
28964
29366
  instructions = "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back"
28965
29367
  }) {
28966
- return /* @__PURE__ */ React105.createElement(Box78, { marginLeft: 3 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, instructions));
29368
+ return /* @__PURE__ */ React106.createElement(Box79, { marginLeft: 3 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, instructions));
28967
29369
  }
28968
29370
  function computeOverrides(args) {
28969
29371
  const activeByType = /* @__PURE__ */ new Map();
@@ -29042,38 +29444,38 @@ function AgentsListView(props) {
29042
29444
  setSelectedAgent(nextAgent);
29043
29445
  }
29044
29446
  });
29045
- const renderCreateNew = () => /* @__PURE__ */ React105.createElement(Box78, null, /* @__PURE__ */ React105.createElement(Text82, { color: onCreateOption ? theme.suggestion : void 0 }, onCreateOption ? `${figures9.pointer} ` : " "), /* @__PURE__ */ React105.createElement(Text82, { color: onCreateOption ? theme.suggestion : void 0 }, "Create new agent"));
29447
+ const renderCreateNew = () => /* @__PURE__ */ React106.createElement(Box79, null, /* @__PURE__ */ React106.createElement(Text83, { color: onCreateOption ? theme.suggestion : void 0 }, onCreateOption ? `${figures9.pointer} ` : " "), /* @__PURE__ */ React106.createElement(Text83, { color: onCreateOption ? theme.suggestion : void 0 }, "Create new agent"));
29046
29448
  const renderAgentRow = (agent) => {
29047
29449
  const isBuiltIn = agent.source === "built-in";
29048
29450
  const isSelected = !isBuiltIn && !onCreateOption && selectedAgent?.agentType === agent.agentType && selectedAgent?.source === agent.source;
29049
29451
  const dimmed = Boolean(isBuiltIn || agent.overriddenBy);
29050
29452
  const rowColor = isSelected ? theme.suggestion : void 0;
29051
29453
  const pointer = isBuiltIn ? "" : isSelected ? `${figures9.pointer} ` : " ";
29052
- return /* @__PURE__ */ React105.createElement(Box78, { key: `${agent.agentType}-${agent.source}`, flexDirection: "row" }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: dimmed && !isSelected, color: rowColor }, pointer), /* @__PURE__ */ React105.createElement(Text82, { dimColor: dimmed && !isSelected, color: rowColor }, agent.agentType), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true, color: rowColor }, " \xB7 ", formatModelShort(agent.model)), agent.overriddenBy ? /* @__PURE__ */ React105.createElement(Text82, { dimColor: !isSelected, color: isSelected ? theme.warning : void 0 }, " ", figures9.warning, " overridden by ", agent.overriddenBy) : null);
29454
+ return /* @__PURE__ */ React106.createElement(Box79, { key: `${agent.agentType}-${agent.source}`, flexDirection: "row" }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: dimmed && !isSelected, color: rowColor }, pointer), /* @__PURE__ */ React106.createElement(Text83, { dimColor: dimmed && !isSelected, color: rowColor }, agent.agentType), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true, color: rowColor }, " \xB7 ", formatModelShort(agent.model)), agent.overriddenBy ? /* @__PURE__ */ React106.createElement(Text83, { dimColor: !isSelected, color: isSelected ? theme.warning : void 0 }, " ", figures9.warning, " overridden by ", agent.overriddenBy) : null);
29053
29455
  };
29054
29456
  const group = (label, agents) => {
29055
29457
  if (agents.length === 0) return null;
29056
29458
  const baseDir = agents[0]?.baseDir;
29057
- return /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React105.createElement(Box78, { paddingLeft: 2 }, /* @__PURE__ */ React105.createElement(Text82, { bold: true, dimColor: true }, label), baseDir ? /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, " ", "(", baseDir, ")") : null), agents.map(renderAgentRow));
29459
+ return /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginBottom: 1 }, /* @__PURE__ */ React106.createElement(Box79, { paddingLeft: 2 }, /* @__PURE__ */ React106.createElement(Text83, { bold: true, dimColor: true }, label), baseDir ? /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, " ", "(", baseDir, ")") : null), agents.map(renderAgentRow));
29058
29460
  };
29059
29461
  const builtInSection = (label = "Built-in (always available):") => {
29060
29462
  const builtIn = props.agents.filter((a) => a.source === "built-in");
29061
29463
  if (builtIn.length === 0) return null;
29062
- return /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginBottom: 1, paddingLeft: 2 }, /* @__PURE__ */ React105.createElement(Text82, { bold: true, dimColor: true }, label), builtIn.map(renderAgentRow));
29464
+ return /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginBottom: 1, paddingLeft: 2 }, /* @__PURE__ */ React106.createElement(Text83, { bold: true, dimColor: true }, label), builtIn.map(renderAgentRow));
29063
29465
  };
29064
29466
  const notOverriddenCount = props.agents.filter((a) => !a.overriddenBy).length;
29065
29467
  const title = titleForSource(props.source);
29066
29468
  if (props.agents.length === 0 || props.source !== "built-in" && !props.agents.some((a) => a.source !== "built-in")) {
29067
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title, subtitle: "No agents found" }, props.onCreateNew ? /* @__PURE__ */ React105.createElement(Box78, { marginY: 1 }, renderCreateNew()) : null, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "No agents found. Create specialized subagents that Claude can delegate to."), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Each subagent has its own context window, custom system prompt, and specific tools."), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Try creating: Code Reviewer, Code Simplifier, Security Reviewer, Tech Lead, or UX Reviewer."), props.source !== "built-in" && props.agents.some((a) => a.source === "built-in") ? /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "\u2500".repeat(40))), builtInSection()) : null), /* @__PURE__ */ React105.createElement(Instructions, null));
29469
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title, subtitle: "No agents found" }, props.onCreateNew ? /* @__PURE__ */ React106.createElement(Box79, { marginY: 1 }, renderCreateNew()) : null, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "No agents found. Create specialized subagents that Claude can delegate to."), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Each subagent has its own context window, custom system prompt, and specific tools."), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Try creating: Code Reviewer, Code Simplifier, Security Reviewer, Tech Lead, or UX Reviewer."), props.source !== "built-in" && props.agents.some((a) => a.source === "built-in") ? /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "\u2500".repeat(40))), builtInSection()) : null), /* @__PURE__ */ React106.createElement(Instructions, null));
29068
29470
  }
29069
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(
29471
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(
29070
29472
  Panel,
29071
29473
  {
29072
29474
  title,
29073
29475
  subtitle: `${notOverriddenCount} agents`
29074
29476
  },
29075
- props.changes.length > 0 ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, props.changes[props.changes.length - 1])) : null,
29076
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1 }, props.onCreateNew ? /* @__PURE__ */ React105.createElement(Box78, { marginBottom: 1 }, renderCreateNew()) : null, props.source === "all" ? /* @__PURE__ */ React105.createElement(React105.Fragment, null, group(
29477
+ props.changes.length > 0 ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, props.changes[props.changes.length - 1])) : null,
29478
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1 }, props.onCreateNew ? /* @__PURE__ */ React106.createElement(Box79, { marginBottom: 1 }, renderCreateNew()) : null, props.source === "all" ? /* @__PURE__ */ React106.createElement(React106.Fragment, null, group(
29077
29479
  "User agents",
29078
29480
  props.agents.filter((a) => a.source === "userSettings")
29079
29481
  ), group(
@@ -29088,8 +29490,8 @@ function AgentsListView(props) {
29088
29490
  ), group(
29089
29491
  "CLI arg agents",
29090
29492
  props.agents.filter((a) => a.source === "flagSettings")
29091
- ), builtInSection("Built-in agents (always available)")) : props.source === "built-in" ? /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true, italic: true }, "Built-in agents are provided by default and cannot be modified."), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, props.agents.map(renderAgentRow))) : /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column" }, props.agents.filter((a) => a.source !== "built-in").map(renderAgentRow)))
29092
- ), /* @__PURE__ */ React105.createElement(Instructions, null));
29493
+ ), builtInSection("Built-in agents (always available)")) : props.source === "built-in" ? /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true, italic: true }, "Built-in agents are provided by default and cannot be modified."), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, props.agents.map(renderAgentRow))) : /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column" }, props.agents.filter((a) => a.source !== "built-in").map(renderAgentRow)))
29494
+ ), /* @__PURE__ */ React106.createElement(Instructions, null));
29093
29495
  }
29094
29496
  function wizardLocationToStorageLocation(location) {
29095
29497
  return location === "projectSettings" ? "project" : "user";
@@ -29180,16 +29582,16 @@ function Wizard(props) {
29180
29582
  cancel
29181
29583
  ]
29182
29584
  );
29183
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, props.steps[stepIndex]?.(ctx) ?? null);
29585
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, props.steps[stepIndex]?.(ctx) ?? null);
29184
29586
  }
29185
29587
  function WizardPanel(props) {
29186
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: "Create new agent", subtitle: props.subtitle }, props.children), /* @__PURE__ */ React105.createElement(Instructions, { instructions: props.footerText }));
29588
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: "Create new agent", subtitle: props.subtitle }, props.children), /* @__PURE__ */ React106.createElement(Instructions, { instructions: props.footerText }));
29187
29589
  }
29188
29590
  function StepChooseLocation({ ctx }) {
29189
29591
  useInput30((_input, key) => {
29190
29592
  if (key.escape) ctx.cancel();
29191
29593
  });
29192
- return /* @__PURE__ */ React105.createElement(WizardPanel, { subtitle: "Choose location", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to cancel" }, /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(
29594
+ return /* @__PURE__ */ React106.createElement(WizardPanel, { subtitle: "Choose location", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to cancel" }, /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(
29193
29595
  Select,
29194
29596
  {
29195
29597
  options: [
@@ -29208,7 +29610,7 @@ function StepChooseMethod({ ctx }) {
29208
29610
  useInput30((_input, key) => {
29209
29611
  if (key.escape) ctx.goBack();
29210
29612
  });
29211
- return /* @__PURE__ */ React105.createElement(WizardPanel, { subtitle: "Creation method" }, /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(
29613
+ return /* @__PURE__ */ React106.createElement(WizardPanel, { subtitle: "Creation method" }, /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(
29212
29614
  Select,
29213
29615
  {
29214
29616
  options: [
@@ -29292,7 +29694,7 @@ function StepGenerationPrompt(props) {
29292
29694
  abortRef.current = null;
29293
29695
  }
29294
29696
  };
29295
- return /* @__PURE__ */ React105.createElement(WizardPanel, { subtitle: "Describe the agent you want" }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, "What should this agent do?"), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Describe a role like \u201Ccode reviewer\u201D, \u201Csecurity auditor\u201D, or \u201Ctech lead\u201D."), /* @__PURE__ */ React105.createElement(
29697
+ return /* @__PURE__ */ React106.createElement(WizardPanel, { subtitle: "Describe the agent you want" }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, "What should this agent do?"), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Describe a role like \u201Ccode reviewer\u201D, \u201Csecurity auditor\u201D, or \u201Ctech lead\u201D."), /* @__PURE__ */ React106.createElement(
29296
29698
  TextInput,
29297
29699
  {
29298
29700
  value,
@@ -29303,7 +29705,7 @@ function StepGenerationPrompt(props) {
29303
29705
  cursorOffset,
29304
29706
  onChangeCursorOffset: setCursorOffset
29305
29707
  }
29306
- ), error ? /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error) : null, isGenerating ? /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Generating\u2026") : null));
29708
+ ), error ? /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error) : null, isGenerating ? /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Generating\u2026") : null));
29307
29709
  }
29308
29710
  function themeColor(kind) {
29309
29711
  const theme = getTheme();
@@ -29339,13 +29741,13 @@ function StepAgentType(props) {
29339
29741
  ctx.updateWizardData({ agentType: trimmed });
29340
29742
  ctx.goNext();
29341
29743
  };
29342
- return /* @__PURE__ */ React105.createElement(
29744
+ return /* @__PURE__ */ React106.createElement(
29343
29745
  WizardPanel,
29344
29746
  {
29345
29747
  subtitle: "Agent type (identifier)",
29346
29748
  footerText: "Press Enter to continue \xB7 Esc to go back"
29347
29749
  },
29348
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, "Enter a unique identifier for your agent:"), /* @__PURE__ */ React105.createElement(
29750
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, "Enter a unique identifier for your agent:"), /* @__PURE__ */ React106.createElement(
29349
29751
  TextInput,
29350
29752
  {
29351
29753
  value,
@@ -29355,7 +29757,7 @@ function StepAgentType(props) {
29355
29757
  cursorOffset,
29356
29758
  onChangeCursorOffset: setCursorOffset
29357
29759
  }
29358
- ), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "e.g., code-reviewer, tech-lead, etc"), error ? /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error) : null)
29760
+ ), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "e.g., code-reviewer, tech-lead, etc"), error ? /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error) : null)
29359
29761
  );
29360
29762
  }
29361
29763
  function StepSystemPrompt({ ctx }) {
@@ -29376,13 +29778,13 @@ function StepSystemPrompt({ ctx }) {
29376
29778
  ctx.updateWizardData({ systemPrompt: trimmed });
29377
29779
  ctx.goNext();
29378
29780
  };
29379
- return /* @__PURE__ */ React105.createElement(
29781
+ return /* @__PURE__ */ React106.createElement(
29380
29782
  WizardPanel,
29381
29783
  {
29382
29784
  subtitle: "System prompt",
29383
29785
  footerText: "Press Enter to continue \xB7 Esc to go back"
29384
29786
  },
29385
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, "Enter the system prompt for your agent:"), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Be comprehensive for best results"), /* @__PURE__ */ React105.createElement(
29787
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, "Enter the system prompt for your agent:"), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Be comprehensive for best results"), /* @__PURE__ */ React106.createElement(
29386
29788
  TextInput,
29387
29789
  {
29388
29790
  value,
@@ -29393,7 +29795,7 @@ function StepSystemPrompt({ ctx }) {
29393
29795
  cursorOffset,
29394
29796
  onChangeCursorOffset: setCursorOffset
29395
29797
  }
29396
- ), error ? /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error) : null)
29798
+ ), error ? /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error) : null)
29397
29799
  );
29398
29800
  }
29399
29801
  function StepDescription({ ctx }) {
@@ -29414,13 +29816,13 @@ function StepDescription({ ctx }) {
29414
29816
  ctx.updateWizardData({ whenToUse: trimmed });
29415
29817
  ctx.goNext();
29416
29818
  };
29417
- return /* @__PURE__ */ React105.createElement(
29819
+ return /* @__PURE__ */ React106.createElement(
29418
29820
  WizardPanel,
29419
29821
  {
29420
29822
  subtitle: "Description (tell Claude when to use this agent)",
29421
29823
  footerText: "Press Enter to continue \xB7 Esc to go back"
29422
29824
  },
29423
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, "When should Claude use this agent?"), /* @__PURE__ */ React105.createElement(
29825
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, "When should Claude use this agent?"), /* @__PURE__ */ React106.createElement(
29424
29826
  TextInput,
29425
29827
  {
29426
29828
  value,
@@ -29431,7 +29833,7 @@ function StepDescription({ ctx }) {
29431
29833
  cursorOffset,
29432
29834
  onChangeCursorOffset: setCursorOffset
29433
29835
  }
29434
- ), error ? /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error) : null)
29836
+ ), error ? /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error) : null)
29435
29837
  );
29436
29838
  }
29437
29839
  function ToolPicker(props) {
@@ -29590,12 +29992,12 @@ function ToolPicker(props) {
29590
29992
  return;
29591
29993
  }
29592
29994
  });
29593
- return /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: cursorIndex === 0 ? themeColor("suggestion") : void 0, bold: cursorIndex === 0 }, cursorIndex === 0 ? `${figures9.pointer} ` : " ", "[ Continue ]"), /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "\u2500".repeat(40)), items.slice(1).map((item, idx) => {
29995
+ return /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: cursorIndex === 0 ? themeColor("suggestion") : void 0, bold: cursorIndex === 0 }, cursorIndex === 0 ? `${figures9.pointer} ` : " ", "[ Continue ]"), /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "\u2500".repeat(40)), items.slice(1).map((item, idx) => {
29594
29996
  const index = idx + 1;
29595
29997
  const focused = index === cursorIndex;
29596
29998
  const prefix = item.isHeader ? "" : focused ? `${figures9.pointer} ` : " ";
29597
- return /* @__PURE__ */ React105.createElement(React105.Fragment, { key: item.id }, item.isToggle ? /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "\u2500".repeat(40)) : null, /* @__PURE__ */ React105.createElement(
29598
- Text82,
29999
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, { key: item.id }, item.isToggle ? /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "\u2500".repeat(40)) : null, /* @__PURE__ */ React106.createElement(
30000
+ Text83,
29599
30001
  {
29600
30002
  dimColor: item.isHeader,
29601
30003
  color: !item.isHeader && focused ? themeColor("suggestion") : void 0,
@@ -29603,12 +30005,12 @@ function ToolPicker(props) {
29603
30005
  },
29604
30006
  item.isToggle ? `${prefix}[ ${item.label} ]` : `${prefix}${item.label}`
29605
30007
  ));
29606
- }), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, isAllSelected ? "All tools selected" : `${selectedSet.size} of ${allToolNames.length} tools selected`)));
30008
+ }), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, isAllSelected ? "All tools selected" : `${selectedSet.size} of ${allToolNames.length} tools selected`)));
29607
30009
  }
29608
30010
  function StepSelectTools(props) {
29609
30011
  const { ctx } = props;
29610
30012
  const initialTools = ctx.wizardData.selectedTools;
29611
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: "Create new agent", subtitle: "Select tools" }, /* @__PURE__ */ React105.createElement(
30013
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: "Create new agent", subtitle: "Select tools" }, /* @__PURE__ */ React106.createElement(
29612
30014
  ToolPicker,
29613
30015
  {
29614
30016
  tools: props.tools,
@@ -29619,7 +30021,7 @@ function StepSelectTools(props) {
29619
30021
  },
29620
30022
  onCancel: ctx.goBack
29621
30023
  }
29622
- )), /* @__PURE__ */ React105.createElement(Instructions, { instructions: "Press Enter to toggle selection \xB7 \u2191\u2193 Navigate \xB7 Esc to go back" }));
30024
+ )), /* @__PURE__ */ React106.createElement(Instructions, { instructions: "Press Enter to toggle selection \xB7 \u2191\u2193 Navigate \xB7 Esc to go back" }));
29623
30025
  }
29624
30026
  function StepSelectModel({ ctx }) {
29625
30027
  useInput30((_input, key) => {
@@ -29627,7 +30029,7 @@ function StepSelectModel({ ctx }) {
29627
30029
  });
29628
30030
  const options = modelOptions();
29629
30031
  const defaultValue = ctx.wizardData.selectedModel ?? DEFAULT_AGENT_MODEL;
29630
- return /* @__PURE__ */ React105.createElement(WizardPanel, { subtitle: "Select model", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back" }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Model determines the agent's reasoning capabilities and speed."), /* @__PURE__ */ React105.createElement(
30032
+ return /* @__PURE__ */ React106.createElement(WizardPanel, { subtitle: "Select model", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back" }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Model determines the agent's reasoning capabilities and speed."), /* @__PURE__ */ React106.createElement(
29631
30033
  Select,
29632
30034
  {
29633
30035
  options,
@@ -29648,12 +30050,12 @@ function ColorPicker(props) {
29648
30050
  else if (key.downArrow) setIndex((i) => i < COLOR_OPTIONS.length - 1 ? i + 1 : 0);
29649
30051
  else if (key.return) props.onConfirm(COLOR_OPTIONS[index] ?? "automatic");
29650
30052
  });
29651
- return /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", gap: 1 }, COLOR_OPTIONS.map((color, i) => {
30053
+ return /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", gap: 1 }, COLOR_OPTIONS.map((color, i) => {
29652
30054
  const focused = i === index;
29653
30055
  const prefix = focused ? figures9.pointer : " ";
29654
30056
  const label = color === "automatic" ? "Automatic color" : color.charAt(0).toUpperCase() + color.slice(1);
29655
- return /* @__PURE__ */ React105.createElement(React105.Fragment, { key: color }, /* @__PURE__ */ React105.createElement(
29656
- Text82,
30057
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, { key: color }, /* @__PURE__ */ React106.createElement(
30058
+ Text83,
29657
30059
  {
29658
30060
  color: focused ? themeColor("suggestion") : void 0,
29659
30061
  bold: focused
@@ -29686,7 +30088,7 @@ function StepChooseColor({ ctx }) {
29686
30088
  });
29687
30089
  ctx.goNext();
29688
30090
  };
29689
- return /* @__PURE__ */ React105.createElement(WizardPanel, { subtitle: "Choose background color", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back" }, /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(ColorPicker, { agentName: agentType, currentColor: "automatic", onConfirm })));
30091
+ return /* @__PURE__ */ React106.createElement(WizardPanel, { subtitle: "Choose background color", footerText: "Press \u2191\u2193 to navigate \xB7 Enter to select \xB7 Esc to go back" }, /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(ColorPicker, { agentName: agentType, currentColor: "automatic", onConfirm })));
29690
30092
  }
29691
30093
  function validateFinalAgent(args) {
29692
30094
  const errors = [];
@@ -29751,28 +30153,28 @@ function StepConfirm(props) {
29751
30153
  });
29752
30154
  const locationPath = finalAgent.source === "projectSettings" ? getPrimaryAgentFilePath("project", finalAgent.agentType) : getPrimaryAgentFilePath("user", finalAgent.agentType);
29753
30155
  const truncate = (text) => text.length > 240 ? `${text.slice(0, 240)}\u2026` : text;
29754
- return /* @__PURE__ */ React105.createElement(
30156
+ return /* @__PURE__ */ React106.createElement(
29755
30157
  WizardPanel,
29756
30158
  {
29757
30159
  subtitle: "Confirm and save",
29758
30160
  footerText: "Press s/Enter to save \xB7 e to edit in your editor \xB7 Esc to cancel"
29759
30161
  },
29760
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Name"), ": ", finalAgent.agentType), /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Location"), ": ", locationPath), /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Tools"), ": ", toolSummary(finalAgent.tools)), /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Model"), ": ", formatModelLong(finalAgent.model)), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Description"), " (tells Claude when to use this agent):"), /* @__PURE__ */ React105.createElement(Box78, { marginLeft: 2, marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, truncate(finalAgent.whenToUse)))), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "System prompt"), ":"), /* @__PURE__ */ React105.createElement(Box78, { marginLeft: 2, marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, truncate(finalAgent.systemPrompt)))), validation.warnings.length > 0 ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("warning") }, "Warnings:"), validation.warnings.map((w, i) => /* @__PURE__ */ React105.createElement(React105.Fragment, { key: i }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, " ", "\u2022 ", w)))) : null, validation.errors.length > 0 ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, "Errors:"), validation.errors.map((e, i) => /* @__PURE__ */ React105.createElement(React105.Fragment, { key: i }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, " ", "\u2022 ", e)))) : null, error ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error)) : null)
30162
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1, gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Name"), ": ", finalAgent.agentType), /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Location"), ": ", locationPath), /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Tools"), ": ", toolSummary(finalAgent.tools)), /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Model"), ": ", formatModelLong(finalAgent.model)), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Description"), " (tells Claude when to use this agent):"), /* @__PURE__ */ React106.createElement(Box79, { marginLeft: 2, marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, truncate(finalAgent.whenToUse)))), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "System prompt"), ":"), /* @__PURE__ */ React106.createElement(Box79, { marginLeft: 2, marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, truncate(finalAgent.systemPrompt)))), validation.warnings.length > 0 ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("warning") }, "Warnings:"), validation.warnings.map((w, i) => /* @__PURE__ */ React106.createElement(React106.Fragment, { key: i }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, " ", "\u2022 ", w)))) : null, validation.errors.length > 0 ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, "Errors:"), validation.errors.map((e, i) => /* @__PURE__ */ React106.createElement(React106.Fragment, { key: i }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, " ", "\u2022 ", e)))) : null, error ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error)) : null)
29761
30163
  );
29762
30164
  }
29763
30165
  function CreateAgentWizard(props) {
29764
30166
  const steps = useMemo27(() => {
29765
30167
  return [
29766
- (ctx) => /* @__PURE__ */ React105.createElement(StepChooseLocation, { ctx }),
29767
- (ctx) => /* @__PURE__ */ React105.createElement(StepChooseMethod, { ctx }),
29768
- (ctx) => /* @__PURE__ */ React105.createElement(StepGenerationPrompt, { ctx, existingAgents: props.existingAgents }),
29769
- (ctx) => /* @__PURE__ */ React105.createElement(StepAgentType, { ctx, existingAgents: props.existingAgents }),
29770
- (ctx) => /* @__PURE__ */ React105.createElement(StepSystemPrompt, { ctx }),
29771
- (ctx) => /* @__PURE__ */ React105.createElement(StepDescription, { ctx }),
29772
- (ctx) => /* @__PURE__ */ React105.createElement(StepSelectTools, { ctx, tools: props.tools }),
29773
- (ctx) => /* @__PURE__ */ React105.createElement(StepSelectModel, { ctx }),
29774
- (ctx) => /* @__PURE__ */ React105.createElement(StepChooseColor, { ctx }),
29775
- (ctx) => /* @__PURE__ */ React105.createElement(
30168
+ (ctx) => /* @__PURE__ */ React106.createElement(StepChooseLocation, { ctx }),
30169
+ (ctx) => /* @__PURE__ */ React106.createElement(StepChooseMethod, { ctx }),
30170
+ (ctx) => /* @__PURE__ */ React106.createElement(StepGenerationPrompt, { ctx, existingAgents: props.existingAgents }),
30171
+ (ctx) => /* @__PURE__ */ React106.createElement(StepAgentType, { ctx, existingAgents: props.existingAgents }),
30172
+ (ctx) => /* @__PURE__ */ React106.createElement(StepSystemPrompt, { ctx }),
30173
+ (ctx) => /* @__PURE__ */ React106.createElement(StepDescription, { ctx }),
30174
+ (ctx) => /* @__PURE__ */ React106.createElement(StepSelectTools, { ctx, tools: props.tools }),
30175
+ (ctx) => /* @__PURE__ */ React106.createElement(StepSelectModel, { ctx }),
30176
+ (ctx) => /* @__PURE__ */ React106.createElement(StepChooseColor, { ctx }),
30177
+ (ctx) => /* @__PURE__ */ React106.createElement(
29776
30178
  StepConfirm,
29777
30179
  {
29778
30180
  ctx,
@@ -29805,7 +30207,7 @@ function CreateAgentWizard(props) {
29805
30207
  )
29806
30208
  ];
29807
30209
  }, [props]);
29808
- return /* @__PURE__ */ React105.createElement(
30210
+ return /* @__PURE__ */ React106.createElement(
29809
30211
  Wizard,
29810
30212
  {
29811
30213
  steps,
@@ -29828,13 +30230,13 @@ function AgentMenu(props) {
29828
30230
  ],
29829
30231
  { label: "Back", value: "back" }
29830
30232
  ];
29831
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: props.agent.agentType }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React105.createElement(
30233
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: props.agent.agentType }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", marginTop: 1 }, /* @__PURE__ */ React106.createElement(
29832
30234
  Select,
29833
30235
  {
29834
30236
  options,
29835
30237
  onChange: (value) => props.onChoose(value)
29836
30238
  }
29837
- ))), /* @__PURE__ */ React105.createElement(Instructions, null));
30239
+ ))), /* @__PURE__ */ React106.createElement(Instructions, null));
29838
30240
  }
29839
30241
  function ViewAgent(props) {
29840
30242
  useInput30((_input, key) => {
@@ -29870,9 +30272,9 @@ function ViewAgent(props) {
29870
30272
  const toolsSummary = () => {
29871
30273
  if (parsedTools.hasWildcard) return "All tools";
29872
30274
  if (!props.agent.tools || props.agent.tools === "*" || props.agent.tools.length === 0) return "None";
29873
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, parsedTools.valid.length > 0 ? parsedTools.valid.join(", ") : null, parsedTools.invalid.length > 0 ? /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("warning") }, " ", figures9.warning, " Unrecognized: ", parsedTools.invalid.join(", "))) : null);
30275
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, parsedTools.valid.length > 0 ? parsedTools.valid.join(", ") : null, parsedTools.invalid.length > 0 ? /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("warning") }, " ", figures9.warning, " Unrecognized: ", parsedTools.invalid.join(", "))) : null);
29874
30276
  };
29875
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: props.agent.agentType }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, sourceLine), /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Description"), " (tells Claude when to use this agent):"), /* @__PURE__ */ React105.createElement(Box78, { marginLeft: 2 }, /* @__PURE__ */ React105.createElement(Text82, null, props.agent.whenToUse))), /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Tools"), ": ", toolsSummary()), /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Model"), ": ", formatModelLong(props.agent.model)), props.agent.color ? /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "Color"), ": ", props.agent.color) : null, props.agent.systemPrompt ? /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Text82, null, /* @__PURE__ */ React105.createElement(Text82, { bold: true }, "System prompt"), ":"), /* @__PURE__ */ React105.createElement(Box78, { marginLeft: 2, marginRight: 2 }, /* @__PURE__ */ React105.createElement(Text82, null, props.agent.systemPrompt))) : null)), /* @__PURE__ */ React105.createElement(Instructions, { instructions: "Press Enter or Esc to go back" }));
30277
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: props.agent.agentType }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, sourceLine), /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Description"), " (tells Claude when to use this agent):"), /* @__PURE__ */ React106.createElement(Box79, { marginLeft: 2 }, /* @__PURE__ */ React106.createElement(Text83, null, props.agent.whenToUse))), /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Tools"), ": ", toolsSummary()), /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Model"), ": ", formatModelLong(props.agent.model)), props.agent.color ? /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "Color"), ": ", props.agent.color) : null, props.agent.systemPrompt ? /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Text83, null, /* @__PURE__ */ React106.createElement(Text83, { bold: true }, "System prompt"), ":"), /* @__PURE__ */ React106.createElement(Box79, { marginLeft: 2, marginRight: 2 }, /* @__PURE__ */ React106.createElement(Text83, null, props.agent.systemPrompt))) : null)), /* @__PURE__ */ React106.createElement(Instructions, { instructions: "Press Enter or Esc to go back" }));
29876
30278
  }
29877
30279
  function EditAgent(props) {
29878
30280
  const [mode, setMode] = useState29("menu");
@@ -29937,7 +30339,7 @@ function EditAgent(props) {
29937
30339
  }
29938
30340
  });
29939
30341
  if (mode === "edit-tools") {
29940
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React105.createElement(
30342
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React106.createElement(
29941
30343
  ToolPicker,
29942
30344
  {
29943
30345
  tools: props.tools,
@@ -29949,10 +30351,10 @@ function EditAgent(props) {
29949
30351
  },
29950
30352
  onCancel: () => setMode("menu")
29951
30353
  }
29952
- ), error ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React105.createElement(Instructions, { instructions: "Press Enter to toggle selection \xB7 \u2191\u2193 Navigate \xB7 Esc to go back" }));
30354
+ ), error ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React106.createElement(Instructions, { instructions: "Press Enter to toggle selection \xB7 \u2191\u2193 Navigate \xB7 Esc to go back" }));
29953
30355
  }
29954
30356
  if (mode === "edit-model") {
29955
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", gap: 1, marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Model determines the agent's reasoning capabilities and speed."), /* @__PURE__ */ React105.createElement(
30357
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", gap: 1, marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Model determines the agent's reasoning capabilities and speed."), /* @__PURE__ */ React106.createElement(
29956
30358
  Select,
29957
30359
  {
29958
30360
  options: modelOptions(),
@@ -29962,10 +30364,10 @@ function EditAgent(props) {
29962
30364
  setMode("menu");
29963
30365
  }
29964
30366
  }
29965
- )), error ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React105.createElement(Instructions, null));
30367
+ )), error ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React106.createElement(Instructions, null));
29966
30368
  }
29967
30369
  if (mode === "edit-color") {
29968
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(
30370
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(
29969
30371
  ColorPicker,
29970
30372
  {
29971
30373
  agentName: props.agent.agentType,
@@ -29975,29 +30377,29 @@ function EditAgent(props) {
29975
30377
  setMode("menu");
29976
30378
  }
29977
30379
  }
29978
- )), error ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React105.createElement(Instructions, null));
30380
+ )), error ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error)) : null), /* @__PURE__ */ React106.createElement(Instructions, null));
29979
30381
  }
29980
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column" }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Source: ", titleForSource(props.agent.source)), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1, flexDirection: "column" }, menuItems.map((item, idx) => /* @__PURE__ */ React105.createElement(React105.Fragment, { key: item.label }, /* @__PURE__ */ React105.createElement(
29981
- Text82,
30382
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: `Edit agent: ${props.agent.agentType}` }, /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column" }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Source: ", titleForSource(props.agent.source)), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1, flexDirection: "column" }, menuItems.map((item, idx) => /* @__PURE__ */ React106.createElement(React106.Fragment, { key: item.label }, /* @__PURE__ */ React106.createElement(
30383
+ Text83,
29982
30384
  {
29983
30385
  color: idx === selectedIndex ? themeColor("suggestion") : void 0
29984
30386
  },
29985
30387
  idx === selectedIndex ? `${figures9.pointer} ` : " ",
29986
30388
  item.label
29987
- )))), error ? /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { color: themeColor("error") }, error)) : null)), /* @__PURE__ */ React105.createElement(Instructions, null));
30389
+ )))), error ? /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { color: themeColor("error") }, error)) : null)), /* @__PURE__ */ React106.createElement(Instructions, null));
29988
30390
  }
29989
30391
  function DeleteConfirm(props) {
29990
30392
  useInput30((_input, key) => {
29991
30393
  if (key.escape) props.onCancel();
29992
30394
  });
29993
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(
30395
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(
29994
30396
  Panel,
29995
30397
  {
29996
30398
  title: "Delete agent",
29997
30399
  borderColor: panelBorderColor("error"),
29998
30400
  titleColor: themeColor("error")
29999
30401
  },
30000
- /* @__PURE__ */ React105.createElement(Box78, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React105.createElement(Text82, null, "Are you sure you want to delete the agent ", /* @__PURE__ */ React105.createElement(Text82, { bold: true }, props.agent.agentType), "?"), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Source: ", props.agent.source)), /* @__PURE__ */ React105.createElement(Box78, { marginTop: 1 }, /* @__PURE__ */ React105.createElement(
30402
+ /* @__PURE__ */ React106.createElement(Box79, { flexDirection: "column", gap: 1 }, /* @__PURE__ */ React106.createElement(Text83, null, "Are you sure you want to delete the agent ", /* @__PURE__ */ React106.createElement(Text83, { bold: true }, props.agent.agentType), "?"), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Source: ", props.agent.source)), /* @__PURE__ */ React106.createElement(Box79, { marginTop: 1 }, /* @__PURE__ */ React106.createElement(
30001
30403
  Select,
30002
30404
  {
30003
30405
  options: [
@@ -30010,7 +30412,7 @@ function DeleteConfirm(props) {
30010
30412
  }
30011
30413
  }
30012
30414
  )))
30013
- ), /* @__PURE__ */ React105.createElement(Instructions, { instructions: "Press \u2191\u2193 to navigate, Enter to select, Esc to cancel" }));
30415
+ ), /* @__PURE__ */ React106.createElement(Instructions, { instructions: "Press \u2191\u2193 to navigate, Enter to select, Esc to cancel" }));
30014
30416
  }
30015
30417
  function AgentsUI({ onExit }) {
30016
30418
  const [mode, setMode] = useState29({ mode: "list-agents", source: "all" });
@@ -30081,10 +30483,10 @@ ${changes.join("\n")}`);
30081
30483
  onExit("Agents dialog dismissed");
30082
30484
  }, [changes, onExit]);
30083
30485
  if (loading) {
30084
- return /* @__PURE__ */ React105.createElement(React105.Fragment, null, /* @__PURE__ */ React105.createElement(Panel, { title: "Agents", subtitle: "Loading\u2026" }, /* @__PURE__ */ React105.createElement(Text82, { dimColor: true }, "Loading agents\u2026")), /* @__PURE__ */ React105.createElement(Instructions, null));
30486
+ return /* @__PURE__ */ React106.createElement(React106.Fragment, null, /* @__PURE__ */ React106.createElement(Panel, { title: "Agents", subtitle: "Loading\u2026" }, /* @__PURE__ */ React106.createElement(Text83, { dimColor: true }, "Loading agents\u2026")), /* @__PURE__ */ React106.createElement(Instructions, null));
30085
30487
  }
30086
30488
  if (mode.mode === "list-agents") {
30087
- return /* @__PURE__ */ React105.createElement(
30489
+ return /* @__PURE__ */ React106.createElement(
30088
30490
  AgentsListView,
30089
30491
  {
30090
30492
  source: mode.source,
@@ -30097,7 +30499,7 @@ ${changes.join("\n")}`);
30097
30499
  );
30098
30500
  }
30099
30501
  if (mode.mode === "create-agent") {
30100
- return /* @__PURE__ */ React105.createElement(
30502
+ return /* @__PURE__ */ React106.createElement(
30101
30503
  CreateAgentWizard,
30102
30504
  {
30103
30505
  tools,
@@ -30112,7 +30514,7 @@ ${changes.join("\n")}`);
30112
30514
  );
30113
30515
  }
30114
30516
  if (mode.mode === "agent-menu") {
30115
- return /* @__PURE__ */ React105.createElement(
30517
+ return /* @__PURE__ */ React106.createElement(
30116
30518
  AgentMenu,
30117
30519
  {
30118
30520
  agent: mode.agent,
@@ -30127,7 +30529,7 @@ ${changes.join("\n")}`);
30127
30529
  );
30128
30530
  }
30129
30531
  if (mode.mode === "view-agent") {
30130
- return /* @__PURE__ */ React105.createElement(
30532
+ return /* @__PURE__ */ React106.createElement(
30131
30533
  ViewAgent,
30132
30534
  {
30133
30535
  agent: mode.agent,
@@ -30137,7 +30539,7 @@ ${changes.join("\n")}`);
30137
30539
  );
30138
30540
  }
30139
30541
  if (mode.mode === "edit-agent") {
30140
- return /* @__PURE__ */ React105.createElement(
30542
+ return /* @__PURE__ */ React106.createElement(
30141
30543
  EditAgent,
30142
30544
  {
30143
30545
  agent: mode.agent,
@@ -30152,7 +30554,7 @@ ${changes.join("\n")}`);
30152
30554
  );
30153
30555
  }
30154
30556
  if (mode.mode === "delete-confirm") {
30155
- return /* @__PURE__ */ React105.createElement(
30557
+ return /* @__PURE__ */ React106.createElement(
30156
30558
  DeleteConfirm,
30157
30559
  {
30158
30560
  agent: mode.agent,
@@ -30177,7 +30579,7 @@ var agents_default = {
30177
30579
  isEnabled: true,
30178
30580
  isHidden: false,
30179
30581
  async call(onExit) {
30180
- return /* @__PURE__ */ React106.createElement(AgentsUI, { onExit });
30582
+ return /* @__PURE__ */ React107.createElement(AgentsUI, { onExit });
30181
30583
  },
30182
30584
  userFacingName() {
30183
30585
  return "agents";
@@ -30338,7 +30740,7 @@ ${availableLines}${truncatedNotice}
30338
30740
  return command4 || "";
30339
30741
  },
30340
30742
  renderToolUseRejectedMessage() {
30341
- return /* @__PURE__ */ React107.createElement(FallbackToolUseRejectedMessage, null);
30743
+ return /* @__PURE__ */ React108.createElement(FallbackToolUseRejectedMessage, null);
30342
30744
  },
30343
30745
  renderResultForAssistant(output) {
30344
30746
  return `Launching command: /${output.commandName}`;
@@ -30494,8 +30896,8 @@ function parseMcpToolName2(name3) {
30494
30896
  }
30495
30897
 
30496
30898
  // src/tools/system/KillShellTool/KillShellTool.tsx
30497
- import { Box as Box79, Text as Text83 } from "ink";
30498
- import React108 from "react";
30899
+ import { Box as Box80, Text as Text84 } from "ink";
30900
+ import React109 from "react";
30499
30901
  import { z as z14 } from "zod";
30500
30902
 
30501
30903
  // src/tools/system/KillShellTool/prompt.ts
@@ -30541,10 +30943,10 @@ var KillShellTool = {
30541
30943
  return `Kill shell: ${shell_id}`;
30542
30944
  },
30543
30945
  renderToolUseRejectedMessage() {
30544
- return /* @__PURE__ */ React108.createElement(FallbackToolUseRejectedMessage, null);
30946
+ return /* @__PURE__ */ React109.createElement(FallbackToolUseRejectedMessage, null);
30545
30947
  },
30546
30948
  renderToolResultMessage(output) {
30547
- return /* @__PURE__ */ React108.createElement(Box79, { flexDirection: "row" }, /* @__PURE__ */ React108.createElement(Text83, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React108.createElement(Text83, null, "Shell ", output.shell_id, " killed"));
30949
+ return /* @__PURE__ */ React109.createElement(Box80, { flexDirection: "row" }, /* @__PURE__ */ React109.createElement(Text84, null, "\xA0\xA0\u23BF \xA0"), /* @__PURE__ */ React109.createElement(Text84, null, "Shell ", output.shell_id, " killed"));
30548
30950
  },
30549
30951
  renderResultForAssistant(output) {
30550
30952
  return JSON.stringify(output);
@@ -31271,8 +31673,8 @@ function WebFetchPermissionRequest({
31271
31673
  reject();
31272
31674
  }
31273
31675
  });
31274
- return /* @__PURE__ */ React109.createElement(
31275
- Box80,
31676
+ return /* @__PURE__ */ React110.createElement(
31677
+ Box81,
31276
31678
  {
31277
31679
  flexDirection: "column",
31278
31680
  borderStyle: "round",
@@ -31282,14 +31684,14 @@ function WebFetchPermissionRequest({
31282
31684
  paddingRight: 1,
31283
31685
  paddingBottom: 1
31284
31686
  },
31285
- /* @__PURE__ */ React109.createElement(
31687
+ /* @__PURE__ */ React110.createElement(
31286
31688
  PermissionRequestTitle,
31287
31689
  {
31288
31690
  title: "Network request outside of sandbox",
31289
31691
  riskScore: null
31290
31692
  }
31291
31693
  ),
31292
- /* @__PURE__ */ React109.createElement(Box80, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React109.createElement(Box80, null, /* @__PURE__ */ React109.createElement(Text84, { dimColor: true }, "Host:"), /* @__PURE__ */ React109.createElement(Text84, null, " ", hostLabel)), /* @__PURE__ */ React109.createElement(Box80, { marginTop: 1 }, /* @__PURE__ */ React109.createElement(Text84, null, "Do you want to allow this connection?")), /* @__PURE__ */ React109.createElement(Box80, { marginTop: 1 }, /* @__PURE__ */ React109.createElement(
31694
+ /* @__PURE__ */ React110.createElement(Box81, { flexDirection: "column", paddingX: 2, paddingY: 1 }, /* @__PURE__ */ React110.createElement(Box81, null, /* @__PURE__ */ React110.createElement(Text85, { dimColor: true }, "Host:"), /* @__PURE__ */ React110.createElement(Text85, null, " ", hostLabel)), /* @__PURE__ */ React110.createElement(Box81, { marginTop: 1 }, /* @__PURE__ */ React110.createElement(Text85, null, "Do you want to allow this connection?")), /* @__PURE__ */ React110.createElement(Box81, { marginTop: 1 }, /* @__PURE__ */ React110.createElement(
31293
31695
  Select,
31294
31696
  {
31295
31697
  options: [
@@ -31661,10 +32063,10 @@ var BashTool = {
31661
32063
  return withDescription(base.trim());
31662
32064
  },
31663
32065
  renderToolUseRejectedMessage() {
31664
- return /* @__PURE__ */ React110.createElement(FallbackToolUseRejectedMessage, null);
32066
+ return /* @__PURE__ */ React111.createElement(FallbackToolUseRejectedMessage, null);
31665
32067
  },
31666
32068
  renderToolResultMessage(content) {
31667
- return /* @__PURE__ */ React110.createElement(BashToolResultMessage_default, { content, verbose: false });
32069
+ return /* @__PURE__ */ React111.createElement(BashToolResultMessage_default, { content, verbose: false });
31668
32070
  },
31669
32071
  renderResultForAssistant({
31670
32072
  interrupted,
@@ -31905,7 +32307,7 @@ Did you mean "git ${cmdParts.slice(1).join(" ")}"?`;
31905
32307
  }
31906
32308
  };
31907
32309
  setToolJSX({
31908
- jsx: /* @__PURE__ */ React110.createElement(
32310
+ jsx: /* @__PURE__ */ React111.createElement(
31909
32311
  WebFetchPermissionRequest,
31910
32312
  {
31911
32313
  toolUseConfirm,
@@ -32101,7 +32503,7 @@ ${footerParts.join(" ")}`;
32101
32503
  if (!overlayShown && setToolJSX && Date.now() - startedAt >= PROGRESS_INITIAL_DELAY_MS) {
32102
32504
  overlayShown = true;
32103
32505
  setToolJSX({
32104
- jsx: /* @__PURE__ */ React110.createElement(
32506
+ jsx: /* @__PURE__ */ React111.createElement(
32105
32507
  BashToolRunInBackgroundOverlay,
32106
32508
  {
32107
32509
  onBackground: requestBackground