@shareai-lab/kode 2.0.1 → 2.0.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (132) hide show
  1. package/dist/REPL-GIU4ZIXM.js +42 -0
  2. package/dist/{acp-VEPJ74LT.js → acp-H3VJ77YG.js} +26 -26
  3. package/dist/{agentsValidate-7LH4HTNR.js → agentsValidate-XP3CFN6F.js} +7 -7
  4. package/dist/{ask-3NHFFUQG.js → ask-3G5H5KD5.js} +25 -25
  5. package/dist/{autoUpdater-ITPIHCOI.js → autoUpdater-DNRMJWFQ.js} +3 -3
  6. package/dist/{chunk-RZWOUA25.js → chunk-2KWKUXLT.js} +1 -1
  7. package/dist/{chunk-QVLYOPO5.js → chunk-2PMO2FS2.js} +1 -1
  8. package/dist/{chunk-MWRSY4X6.js → chunk-3TXNP6HH.js} +2 -2
  9. package/dist/{chunk-UHYRLID6.js → chunk-4GAIJGRH.js} +3 -3
  10. package/dist/{chunk-YC6LJCDE.js → chunk-54DNHKOD.js} +2 -2
  11. package/dist/{chunk-ND3XWFO6.js → chunk-67PY5IX6.js} +4 -4
  12. package/dist/{chunk-MIW7N2MY.js → chunk-6DRDLOLP.js} +11 -11
  13. package/dist/{chunk-CM3EGTG6.js → chunk-7CQVZNQV.js} +4 -4
  14. package/dist/{chunk-LC4TVOCZ.js → chunk-AIMIPK4B.js} +3 -3
  15. package/dist/{chunk-3IN27HA5.js → chunk-BHGTA6JQ.js} +3 -3
  16. package/dist/{chunk-AFFSCMYS.js → chunk-EH34V7CY.js} +3 -3
  17. package/dist/{chunk-F2SJXUDI.js → chunk-FH5CHM6L.js} +1 -1
  18. package/dist/{chunk-F2SJXUDI.js.map → chunk-FH5CHM6L.js.map} +1 -1
  19. package/dist/{chunk-ZVDRDPII.js → chunk-G6I7XROM.js} +1 -1
  20. package/dist/{chunk-FC5ZCKBI.js → chunk-HSPVVDIW.js} +196 -165
  21. package/dist/chunk-HSPVVDIW.js.map +7 -0
  22. package/dist/{chunk-7M2YN6TU.js → chunk-IE2CG2TV.js} +2 -2
  23. package/dist/{chunk-ARZSBOAO.js → chunk-K2MI4TPB.js} +3 -3
  24. package/dist/{chunk-YXYYDIMI.js → chunk-MN77D2F7.js} +1 -1
  25. package/dist/{chunk-K2CWOTI2.js → chunk-NQLEUHMS.js} +1 -1
  26. package/dist/{chunk-5PDP7R6N.js → chunk-OIFQB3S4.js} +3 -3
  27. package/dist/{chunk-4FX3IVPT.js → chunk-OWTG2W3A.js} +1 -1
  28. package/dist/{chunk-73WGVYLQ.js → chunk-OZNRLY3E.js} +2 -2
  29. package/dist/{chunk-STSX7GIX.js → chunk-QYFKRZQC.js} +1 -1
  30. package/dist/{chunk-7U7L4NMD.js → chunk-SDGKPKDK.js} +1 -1
  31. package/dist/{chunk-W7GRKO7Q.js → chunk-SRZZFAS7.js} +2 -2
  32. package/dist/{chunk-HCBELH4J.js → chunk-VBXVYQYY.js} +1 -1
  33. package/dist/{chunk-IZVMU4S2.js → chunk-Z33T5YN5.js} +3 -3
  34. package/dist/{chunk-DZE5YA7L.js → chunk-ZQU3TXLC.js} +2 -2
  35. package/dist/{cli-DOPVY2CW.js → cli-SRV2INSL.js} +77 -77
  36. package/dist/commands-TWH6PGVG.js +46 -0
  37. package/dist/{config-RUSD6G5Y.js → config-6ZMBCL23.js} +4 -4
  38. package/dist/{context-6FXPETYH.js → context-JQIOOI4W.js} +5 -5
  39. package/dist/{customCommands-TOIJFZAL.js → customCommands-DNEJS3ZU.js} +4 -4
  40. package/dist/{env-XGKBLU3D.js → env-OFAXZ3XG.js} +2 -2
  41. package/dist/index.js +3 -3
  42. package/dist/{kodeAgentSessionLoad-MITZADPB.js → kodeAgentSessionLoad-6N27AC5K.js} +4 -4
  43. package/dist/{kodeAgentSessionResume-GVRWB4WO.js → kodeAgentSessionResume-HUSAEO24.js} +4 -4
  44. package/dist/{kodeAgentStreamJsonSession-UGEZJJEB.js → kodeAgentStreamJsonSession-GRWG3SPE.js} +1 -1
  45. package/dist/{kodeHooks-QWM36A3D.js → kodeHooks-TDMXFWSO.js} +4 -4
  46. package/dist/{llm-ZUQC4WYM.js → llm-XVXWYOHK.js} +26 -26
  47. package/dist/{llmLazy-54QQHA54.js → llmLazy-7TD5N7XP.js} +1 -1
  48. package/dist/{loader-FYHJQES5.js → loader-AUXIJTY6.js} +4 -4
  49. package/dist/{mcp-J332IKT3.js → mcp-BXJ3K7NZ.js} +7 -7
  50. package/dist/{mentionProcessor-EE3XFHCJ.js → mentionProcessor-YD7YXYGF.js} +5 -5
  51. package/dist/{messages-EOYQKPGM.js → messages-OFUJSPRV.js} +1 -1
  52. package/dist/{model-FV3JDJKH.js → model-KPYCXWBK.js} +5 -5
  53. package/dist/{openai-RRCWW33N.js → openai-5G5D5Q4B.js} +5 -5
  54. package/dist/{outputStyles-62Q3VH2J.js → outputStyles-HLDXFQK3.js} +4 -4
  55. package/dist/{pluginRuntime-6ETCZ2LL.js → pluginRuntime-FPTKK6NY.js} +6 -6
  56. package/dist/{pluginValidation-I4YKUWGS.js → pluginValidation-DSFXZ4GF.js} +6 -6
  57. package/dist/prompts-LWLAJRS2.js +48 -0
  58. package/dist/query-HVPWL27C.js +50 -0
  59. package/dist/{ripgrep-3NTIKQYW.js → ripgrep-YOPCY2GO.js} +3 -3
  60. package/dist/{skillMarketplace-3RXQBVOL.js → skillMarketplace-PSNKDINM.js} +3 -3
  61. package/dist/{state-P5G6CO5V.js → state-KNRWP3FO.js} +2 -2
  62. package/dist/{theme-3LWP3BG7.js → theme-7S2QN2FO.js} +5 -5
  63. package/dist/{toolPermissionSettings-3ROBVTUK.js → toolPermissionSettings-GPOBH4IV.js} +6 -6
  64. package/dist/tools-FZU2FZBD.js +47 -0
  65. package/dist/{userInput-JSBJRFSK.js → userInput-VHNBN2MW.js} +27 -27
  66. package/package.json +1 -1
  67. package/dist/REPL-CW7AYLVL.js +0 -42
  68. package/dist/chunk-FC5ZCKBI.js.map +0 -7
  69. package/dist/commands-2BF2CJ3A.js +0 -46
  70. package/dist/prompts-ZLEKDD77.js +0 -48
  71. package/dist/query-VFRJPBGD.js +0 -50
  72. package/dist/tools-RO7HSSE5.js +0 -47
  73. /package/dist/{REPL-CW7AYLVL.js.map → REPL-GIU4ZIXM.js.map} +0 -0
  74. /package/dist/{acp-VEPJ74LT.js.map → acp-H3VJ77YG.js.map} +0 -0
  75. /package/dist/{agentsValidate-7LH4HTNR.js.map → agentsValidate-XP3CFN6F.js.map} +0 -0
  76. /package/dist/{ask-3NHFFUQG.js.map → ask-3G5H5KD5.js.map} +0 -0
  77. /package/dist/{autoUpdater-ITPIHCOI.js.map → autoUpdater-DNRMJWFQ.js.map} +0 -0
  78. /package/dist/{chunk-RZWOUA25.js.map → chunk-2KWKUXLT.js.map} +0 -0
  79. /package/dist/{chunk-QVLYOPO5.js.map → chunk-2PMO2FS2.js.map} +0 -0
  80. /package/dist/{chunk-MWRSY4X6.js.map → chunk-3TXNP6HH.js.map} +0 -0
  81. /package/dist/{chunk-UHYRLID6.js.map → chunk-4GAIJGRH.js.map} +0 -0
  82. /package/dist/{chunk-YC6LJCDE.js.map → chunk-54DNHKOD.js.map} +0 -0
  83. /package/dist/{chunk-ND3XWFO6.js.map → chunk-67PY5IX6.js.map} +0 -0
  84. /package/dist/{chunk-MIW7N2MY.js.map → chunk-6DRDLOLP.js.map} +0 -0
  85. /package/dist/{chunk-CM3EGTG6.js.map → chunk-7CQVZNQV.js.map} +0 -0
  86. /package/dist/{chunk-LC4TVOCZ.js.map → chunk-AIMIPK4B.js.map} +0 -0
  87. /package/dist/{chunk-3IN27HA5.js.map → chunk-BHGTA6JQ.js.map} +0 -0
  88. /package/dist/{chunk-AFFSCMYS.js.map → chunk-EH34V7CY.js.map} +0 -0
  89. /package/dist/{chunk-ZVDRDPII.js.map → chunk-G6I7XROM.js.map} +0 -0
  90. /package/dist/{chunk-7M2YN6TU.js.map → chunk-IE2CG2TV.js.map} +0 -0
  91. /package/dist/{chunk-ARZSBOAO.js.map → chunk-K2MI4TPB.js.map} +0 -0
  92. /package/dist/{chunk-YXYYDIMI.js.map → chunk-MN77D2F7.js.map} +0 -0
  93. /package/dist/{chunk-K2CWOTI2.js.map → chunk-NQLEUHMS.js.map} +0 -0
  94. /package/dist/{chunk-5PDP7R6N.js.map → chunk-OIFQB3S4.js.map} +0 -0
  95. /package/dist/{chunk-4FX3IVPT.js.map → chunk-OWTG2W3A.js.map} +0 -0
  96. /package/dist/{chunk-73WGVYLQ.js.map → chunk-OZNRLY3E.js.map} +0 -0
  97. /package/dist/{chunk-STSX7GIX.js.map → chunk-QYFKRZQC.js.map} +0 -0
  98. /package/dist/{chunk-7U7L4NMD.js.map → chunk-SDGKPKDK.js.map} +0 -0
  99. /package/dist/{chunk-W7GRKO7Q.js.map → chunk-SRZZFAS7.js.map} +0 -0
  100. /package/dist/{chunk-HCBELH4J.js.map → chunk-VBXVYQYY.js.map} +0 -0
  101. /package/dist/{chunk-IZVMU4S2.js.map → chunk-Z33T5YN5.js.map} +0 -0
  102. /package/dist/{chunk-DZE5YA7L.js.map → chunk-ZQU3TXLC.js.map} +0 -0
  103. /package/dist/{cli-DOPVY2CW.js.map → cli-SRV2INSL.js.map} +0 -0
  104. /package/dist/{commands-2BF2CJ3A.js.map → commands-TWH6PGVG.js.map} +0 -0
  105. /package/dist/{config-RUSD6G5Y.js.map → config-6ZMBCL23.js.map} +0 -0
  106. /package/dist/{context-6FXPETYH.js.map → context-JQIOOI4W.js.map} +0 -0
  107. /package/dist/{customCommands-TOIJFZAL.js.map → customCommands-DNEJS3ZU.js.map} +0 -0
  108. /package/dist/{env-XGKBLU3D.js.map → env-OFAXZ3XG.js.map} +0 -0
  109. /package/dist/{kodeAgentSessionLoad-MITZADPB.js.map → kodeAgentSessionLoad-6N27AC5K.js.map} +0 -0
  110. /package/dist/{kodeAgentSessionResume-GVRWB4WO.js.map → kodeAgentSessionResume-HUSAEO24.js.map} +0 -0
  111. /package/dist/{kodeAgentStreamJsonSession-UGEZJJEB.js.map → kodeAgentStreamJsonSession-GRWG3SPE.js.map} +0 -0
  112. /package/dist/{kodeHooks-QWM36A3D.js.map → kodeHooks-TDMXFWSO.js.map} +0 -0
  113. /package/dist/{llm-ZUQC4WYM.js.map → llm-XVXWYOHK.js.map} +0 -0
  114. /package/dist/{llmLazy-54QQHA54.js.map → llmLazy-7TD5N7XP.js.map} +0 -0
  115. /package/dist/{loader-FYHJQES5.js.map → loader-AUXIJTY6.js.map} +0 -0
  116. /package/dist/{mcp-J332IKT3.js.map → mcp-BXJ3K7NZ.js.map} +0 -0
  117. /package/dist/{mentionProcessor-EE3XFHCJ.js.map → mentionProcessor-YD7YXYGF.js.map} +0 -0
  118. /package/dist/{messages-EOYQKPGM.js.map → messages-OFUJSPRV.js.map} +0 -0
  119. /package/dist/{model-FV3JDJKH.js.map → model-KPYCXWBK.js.map} +0 -0
  120. /package/dist/{openai-RRCWW33N.js.map → openai-5G5D5Q4B.js.map} +0 -0
  121. /package/dist/{outputStyles-62Q3VH2J.js.map → outputStyles-HLDXFQK3.js.map} +0 -0
  122. /package/dist/{pluginRuntime-6ETCZ2LL.js.map → pluginRuntime-FPTKK6NY.js.map} +0 -0
  123. /package/dist/{pluginValidation-I4YKUWGS.js.map → pluginValidation-DSFXZ4GF.js.map} +0 -0
  124. /package/dist/{prompts-ZLEKDD77.js.map → prompts-LWLAJRS2.js.map} +0 -0
  125. /package/dist/{query-VFRJPBGD.js.map → query-HVPWL27C.js.map} +0 -0
  126. /package/dist/{ripgrep-3NTIKQYW.js.map → ripgrep-YOPCY2GO.js.map} +0 -0
  127. /package/dist/{skillMarketplace-3RXQBVOL.js.map → skillMarketplace-PSNKDINM.js.map} +0 -0
  128. /package/dist/{state-P5G6CO5V.js.map → state-KNRWP3FO.js.map} +0 -0
  129. /package/dist/{theme-3LWP3BG7.js.map → theme-7S2QN2FO.js.map} +0 -0
  130. /package/dist/{toolPermissionSettings-3ROBVTUK.js.map → toolPermissionSettings-GPOBH4IV.js.map} +0 -0
  131. /package/dist/{tools-RO7HSSE5.js.map → tools-FZU2FZBD.js.map} +0 -0
  132. /package/dist/{userInput-JSBJRFSK.js.map → userInput-VHNBN2MW.js.map} +0 -0
@@ -2,7 +2,7 @@ import { createRequire as __kodeCreateRequire } from "node:module";
2
2
  const require = __kodeCreateRequire(import.meta.url);
3
3
  import {
4
4
  listKodeAgentSessions
5
- } from "./chunk-K2CWOTI2.js";
5
+ } from "./chunk-NQLEUHMS.js";
6
6
  import {
7
7
  DEFAULT_TIMEOUT_MS,
8
8
  FallbackToolUseRejectedMessage,
@@ -16,11 +16,11 @@ import {
16
16
  listMCPServers,
17
17
  loadMergedSettings,
18
18
  normalizeSandboxRuntimeConfigFromSettings
19
- } from "./chunk-CM3EGTG6.js";
19
+ } from "./chunk-7CQVZNQV.js";
20
20
  import {
21
21
  formatValidationResult,
22
22
  validatePluginOrMarketplacePath
23
- } from "./chunk-UHYRLID6.js";
23
+ } from "./chunk-4GAIJGRH.js";
24
24
  import {
25
25
  addMarketplace,
26
26
  disableSkillPlugin,
@@ -33,15 +33,15 @@ import {
33
33
  refreshMarketplaceAsync,
34
34
  removeMarketplace,
35
35
  uninstallSkillPlugin
36
- } from "./chunk-QVLYOPO5.js";
36
+ } from "./chunk-2PMO2FS2.js";
37
37
  import {
38
38
  loadKodeAgentSessionMessages
39
- } from "./chunk-ZVDRDPII.js";
39
+ } from "./chunk-G6I7XROM.js";
40
40
  import {
41
41
  appendSessionCustomTitleRecord,
42
42
  appendSessionJsonlFromMessage,
43
43
  appendSessionTagRecord
44
- } from "./chunk-MWRSY4X6.js";
44
+ } from "./chunk-3TXNP6HH.js";
45
45
  import {
46
46
  getRequestStatus,
47
47
  setRequestStatus,
@@ -58,7 +58,7 @@ import {
58
58
  runStopHooks,
59
59
  runUserPromptSubmitHooks,
60
60
  updateHookTranscriptForMessages
61
- } from "./chunk-ARZSBOAO.js";
61
+ } from "./chunk-K2MI4TPB.js";
62
62
  import {
63
63
  getKodeAgentSessionId,
64
64
  setKodeAgentSessionId
@@ -71,34 +71,34 @@ import {
71
71
  getOutputStyleSystemPromptAdditions,
72
72
  resolveOutputStyleName,
73
73
  setCurrentOutputStyle
74
- } from "./chunk-YC6LJCDE.js";
74
+ } from "./chunk-54DNHKOD.js";
75
75
  import {
76
76
  fetchCustomModels,
77
77
  getModelFeatures
78
- } from "./chunk-DZE5YA7L.js";
78
+ } from "./chunk-ZQU3TXLC.js";
79
79
  import {
80
80
  queryLLM,
81
81
  queryQuick,
82
82
  verifyApiKey
83
- } from "./chunk-ND3XWFO6.js";
83
+ } from "./chunk-67PY5IX6.js";
84
84
  import {
85
85
  listAllContentFiles,
86
86
  ripGrep
87
- } from "./chunk-4FX3IVPT.js";
87
+ } from "./chunk-OWTG2W3A.js";
88
88
  import {
89
89
  getCustomCommandDirectories,
90
90
  hasCustomCommands,
91
91
  loadCustomCommands,
92
92
  reloadCustomCommands
93
- } from "./chunk-W7GRKO7Q.js";
93
+ } from "./chunk-SRZZFAS7.js";
94
94
  import {
95
95
  loadToolPermissionContextFromDisk,
96
96
  persistToolPermissionUpdateToDisk
97
- } from "./chunk-AFFSCMYS.js";
97
+ } from "./chunk-EH34V7CY.js";
98
98
  import {
99
99
  getSettingsFileCandidates,
100
100
  loadSettingsWithLegacyFallback
101
- } from "./chunk-HCBELH4J.js";
101
+ } from "./chunk-VBXVYQYY.js";
102
102
  import {
103
103
  applyToolPermissionContextUpdate,
104
104
  createDefaultToolPermissionContext
@@ -111,7 +111,7 @@ import {
111
111
  resetReminderSession,
112
112
  setTodos,
113
113
  systemReminderService
114
- } from "./chunk-7M2YN6TU.js";
114
+ } from "./chunk-IE2CG2TV.js";
115
115
  import {
116
116
  getSessionState
117
117
  } from "./chunk-E6YNABER.js";
@@ -120,7 +120,7 @@ import {
120
120
  getActiveAgents,
121
121
  getAgentByType,
122
122
  getAllAgents
123
- } from "./chunk-73WGVYLQ.js";
123
+ } from "./chunk-OZNRLY3E.js";
124
124
  import {
125
125
  getSessionPlugins
126
126
  } from "./chunk-S3J2TLV6.js";
@@ -153,22 +153,22 @@ import {
153
153
  processUserInput,
154
154
  reorderMessages,
155
155
  stripSystemMessages
156
- } from "./chunk-RZWOUA25.js";
156
+ } from "./chunk-2KWKUXLT.js";
157
157
  import {
158
158
  ModelManager,
159
159
  getModelManager,
160
160
  isDefaultSlowAndCapableModel
161
- } from "./chunk-IZVMU4S2.js";
161
+ } from "./chunk-Z33T5YN5.js";
162
162
  import {
163
163
  getCodeStyle,
164
164
  getContext,
165
165
  getGitState,
166
166
  getIsGit,
167
167
  getProjectDocs
168
- } from "./chunk-5PDP7R6N.js";
168
+ } from "./chunk-OIFQB3S4.js";
169
169
  import {
170
170
  getTheme
171
- } from "./chunk-7U7L4NMD.js";
171
+ } from "./chunk-SDGKPKDK.js";
172
172
  import {
173
173
  DEFAULT_GLOBAL_CONFIG,
174
174
  enableConfigs,
@@ -181,7 +181,7 @@ import {
181
181
  saveGlobalConfig,
182
182
  setAllPointersToModel,
183
183
  setModelPointer
184
- } from "./chunk-LC4TVOCZ.js";
184
+ } from "./chunk-AIMIPK4B.js";
185
185
  import {
186
186
  AbortError
187
187
  } from "./chunk-UYXEDKOZ.js";
@@ -190,7 +190,7 @@ import {
190
190
  getCurrentRequest,
191
191
  logUserFriendly,
192
192
  markPhase
193
- } from "./chunk-STSX7GIX.js";
193
+ } from "./chunk-QYFKRZQC.js";
194
194
  import {
195
195
  ASCII_LOGO,
196
196
  BunShell,
@@ -226,10 +226,10 @@ import {
226
226
  renderBashNotification,
227
227
  setActivePlanConversationKey,
228
228
  setCwd
229
- } from "./chunk-YXYYDIMI.js";
229
+ } from "./chunk-MN77D2F7.js";
230
230
  import {
231
231
  MACRO
232
- } from "./chunk-F2SJXUDI.js";
232
+ } from "./chunk-FH5CHM6L.js";
233
233
  import {
234
234
  formatTotalCost,
235
235
  getTotalAPIDuration,
@@ -417,7 +417,7 @@ var getCommandSubcommandPrefix = memoize(
417
417
  var getCommandPrefix = memoize(
418
418
  async (command4, abortSignal) => {
419
419
  const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
420
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-ZUQC4WYM.js");
420
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-XVXWYOHK.js");
421
421
  const response = await queryQuick2({
422
422
  systemPrompt,
423
423
  userPrompt,
@@ -4456,7 +4456,7 @@ function formatParseError(error) {
4456
4456
  return error instanceof Error ? error.message : String(error);
4457
4457
  }
4458
4458
  async function defaultGateQuery(args) {
4459
- const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-ZUQC4WYM.js");
4459
+ const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-XVXWYOHK.js");
4460
4460
  const messages = [
4461
4461
  {
4462
4462
  type: "user",
@@ -5279,7 +5279,7 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
5279
5279
 
5280
5280
  // src/ui/components/permissions/web-fetch-permission-request/WebFetchPermissionRequest.tsx
5281
5281
  import { Box as Box78, Text as Text82, useInput as useInput31 } from "ink";
5282
- import React107, { useMemo as useMemo25 } from "react";
5282
+ import React107, { useMemo as useMemo26 } from "react";
5283
5283
  import chalk15 from "chalk";
5284
5284
 
5285
5285
  // src/ui/components/custom-select/select.tsx
@@ -10896,7 +10896,7 @@ async function createAndStoreApiKey(accessToken) {
10896
10896
  }
10897
10897
  saveGlobalConfig(config2);
10898
10898
  try {
10899
- const { resetAnthropicClient } = await import("./llm-ZUQC4WYM.js");
10899
+ const { resetAnthropicClient } = await import("./llm-XVXWYOHK.js");
10900
10900
  resetAnthropicClient();
10901
10901
  } catch {
10902
10902
  }
@@ -12954,6 +12954,38 @@ function ModelSelectionScreen({
12954
12954
  }
12955
12955
 
12956
12956
  // src/ui/components/model-selector/ModelSelector.tsx
12957
+ var WindowedOptions = React34.memo(function WindowedOptions2({
12958
+ options,
12959
+ focusedIndex,
12960
+ maxVisible,
12961
+ theme
12962
+ }) {
12963
+ if (options.length === 0) {
12964
+ return /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, "No options available.");
12965
+ }
12966
+ const visibleCount = Math.max(1, Math.min(maxVisible, options.length));
12967
+ const half = Math.floor(visibleCount / 2);
12968
+ const start = Math.max(
12969
+ 0,
12970
+ Math.min(focusedIndex - half, Math.max(0, options.length - visibleCount))
12971
+ );
12972
+ const end = Math.min(options.length, start + visibleCount);
12973
+ const showUp = start > 0;
12974
+ const showDown = end < options.length;
12975
+ return /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: 0 }, showUp && /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, figures3.arrowUp, " More"), options.slice(start, end).map((opt, idx) => {
12976
+ const absoluteIndex = start + idx;
12977
+ const isFocused = absoluteIndex === focusedIndex;
12978
+ return /* @__PURE__ */ React34.createElement(Box27, { key: opt.value, flexDirection: "row" }, /* @__PURE__ */ React34.createElement(Text30, { color: isFocused ? theme.kode : theme.secondaryText }, isFocused ? figures3.pointer : " "), /* @__PURE__ */ React34.createElement(
12979
+ Text30,
12980
+ {
12981
+ color: isFocused ? theme.text : theme.secondaryText,
12982
+ bold: isFocused
12983
+ },
12984
+ " ",
12985
+ opt.label
12986
+ ));
12987
+ }), showDown && /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, figures3.arrowDown, " More"));
12988
+ });
12957
12989
  function ModelSelector({
12958
12990
  onDone: onDoneProp,
12959
12991
  abortController,
@@ -13160,33 +13192,6 @@ function ModelSelector({
13160
13192
  const available = Math.max(1, rows - reservedLines);
13161
13193
  return Math.max(1, Math.min(requestedCount, optionLength, available));
13162
13194
  }
13163
- function renderWindowedOptions(options, focusedIndex, maxVisible) {
13164
- if (options.length === 0) {
13165
- return /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, "No options available.");
13166
- }
13167
- const visibleCount = Math.max(1, Math.min(maxVisible, options.length));
13168
- const half = Math.floor(visibleCount / 2);
13169
- const start = Math.max(
13170
- 0,
13171
- Math.min(focusedIndex - half, Math.max(0, options.length - visibleCount))
13172
- );
13173
- const end = Math.min(options.length, start + visibleCount);
13174
- const showUp = start > 0;
13175
- const showDown = end < options.length;
13176
- return /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: 0 }, showUp && /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, figures3.arrowUp, " More"), options.slice(start, end).map((opt, idx) => {
13177
- const absoluteIndex = start + idx;
13178
- const isFocused = absoluteIndex === focusedIndex;
13179
- return /* @__PURE__ */ React34.createElement(Box27, { key: opt.value, flexDirection: "row" }, /* @__PURE__ */ React34.createElement(Text30, { color: isFocused ? theme.kode : theme.secondaryText }, isFocused ? figures3.pointer : " "), /* @__PURE__ */ React34.createElement(
13180
- Text30,
13181
- {
13182
- color: isFocused ? theme.text : theme.secondaryText,
13183
- bold: isFocused
13184
- },
13185
- " ",
13186
- opt.label
13187
- ));
13188
- }), showDown && /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, figures3.arrowDown, " More"));
13189
- }
13190
13195
  async function fetchOllamaModels() {
13191
13196
  try {
13192
13197
  const response = await fetch(`${ollamaBaseUrl}/models`);
@@ -13301,7 +13306,9 @@ function ModelSelector({
13301
13306
  } else {
13302
13307
  setModelLoadError(`Error loading Ollama models: ${errorMessage}`);
13303
13308
  }
13304
- console.error("Error fetching Ollama models:", error);
13309
+ debug.warn("OLLAMA_FETCH_ERROR", {
13310
+ error: error instanceof Error ? error.message : String(error)
13311
+ });
13305
13312
  return [];
13306
13313
  }
13307
13314
  }
@@ -13482,7 +13489,10 @@ Please check your API key and try again, or press Tab to manually enter model na
13482
13489
  navigateTo("model");
13483
13490
  return fetchedModels;
13484
13491
  } catch (error) {
13485
- console.error("Error fetching models:", error);
13492
+ debug.warn("MODEL_FETCH_ERROR", {
13493
+ provider: selectedProvider,
13494
+ error: error instanceof Error ? error.message : String(error)
13495
+ });
13486
13496
  throw error;
13487
13497
  } finally {
13488
13498
  setIsLoadingModels(false);
@@ -13504,7 +13514,10 @@ Please check your API key and try again, or press Tab to manually enter model na
13504
13514
  navigateTo("modelInput");
13505
13515
  }
13506
13516
  } catch (error) {
13507
- console.error("API key validation failed:", error);
13517
+ debug.warn("API_KEY_VALIDATION_FAILED", {
13518
+ provider: selectedProvider,
13519
+ error: error instanceof Error ? error.message : String(error)
13520
+ });
13508
13521
  } finally {
13509
13522
  setIsLoadingModels(false);
13510
13523
  }
@@ -14142,7 +14155,10 @@ Please check your API key and try again, or press Tab to manually enter model na
14142
14155
  return;
14143
14156
  }
14144
14157
  fetchModelsWithRetry().catch((error) => {
14145
- console.error("Final error after retries:", error);
14158
+ debug.warn("MODEL_FETCH_FINAL_ERROR", {
14159
+ provider: selectedProvider,
14160
+ error: error instanceof Error ? error.message : String(error)
14161
+ });
14146
14162
  });
14147
14163
  return;
14148
14164
  }
@@ -14168,7 +14184,9 @@ Please check your API key and try again, or press Tab to manually enter model na
14168
14184
  }
14169
14185
  if (currentScreen === "confirmation" && key.return) {
14170
14186
  handleConfirmation().catch((error) => {
14171
- console.error("Error in handleConfirmation:", error);
14187
+ debug.warn("CONFIRMATION_ERROR", {
14188
+ error: error instanceof Error ? error.message : String(error)
14189
+ });
14172
14190
  setValidationError(
14173
14191
  error instanceof Error ? error.message : "Unexpected error occurred"
14174
14192
  );
@@ -14287,6 +14305,7 @@ Please check your API key and try again, or press Tab to manually enter model na
14287
14305
  value: apiKey,
14288
14306
  onChange: handleApiKeyChange,
14289
14307
  onSubmit: handleApiKeySubmit,
14308
+ onPaste: handleApiKeyChange,
14290
14309
  mask: "*",
14291
14310
  columns: 80,
14292
14311
  cursorOffset,
@@ -14653,14 +14672,18 @@ Please check your API key and try again, or press Tab to manually enter model na
14653
14672
  paddingY: containerPaddingY
14654
14673
  },
14655
14674
  /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Partner Providers", " ", exitState.pending ? `(press ${exitState.keyName} again to exit)` : ""),
14656
- /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select a partner AI provider for this model profile:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Choose an official partner provider." : "Choose from official partner providers to access their models and services.")), renderWindowedOptions(
14657
- partnerProviderOptions,
14658
- partnerProviderFocusIndex,
14659
- getSafeVisibleOptionCount(
14660
- 6,
14661
- partnerProviderOptions.length,
14662
- partnerReservedLines
14663
- )
14675
+ /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select a partner AI provider for this model profile:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Choose an official partner provider." : "Choose from official partner providers to access their models and services.")), /* @__PURE__ */ React34.createElement(
14676
+ WindowedOptions,
14677
+ {
14678
+ options: partnerProviderOptions,
14679
+ focusedIndex: partnerProviderFocusIndex,
14680
+ maxVisible: getSafeVisibleOptionCount(
14681
+ 6,
14682
+ partnerProviderOptions.length,
14683
+ partnerReservedLines
14684
+ ),
14685
+ theme
14686
+ }
14664
14687
  ), /* @__PURE__ */ React34.createElement(Box27, { marginTop: footerMarginTop }, /* @__PURE__ */ React34.createElement(Text30, { dimColor: true }, "Press ", /* @__PURE__ */ React34.createElement(Text30, { color: theme.suggestion }, "Esc"), " to go back to main menu")))
14665
14688
  ));
14666
14689
  }
@@ -14677,14 +14700,18 @@ Please check your API key and try again, or press Tab to manually enter model na
14677
14700
  paddingY: containerPaddingY
14678
14701
  },
14679
14702
  /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Partner Coding Plans", " ", exitState.pending ? `(press ${exitState.keyName} again to exit)` : ""),
14680
- /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select a partner coding plan for specialized programming assistance:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Specialized coding models from partners." : /* @__PURE__ */ React34.createElement(React34.Fragment, null, "These are specialized models optimized for coding and development tasks.", /* @__PURE__ */ React34.createElement(Newline2, null), "They require specific coding plan subscriptions from the respective providers."))), renderWindowedOptions(
14681
- codingPlanOptions,
14682
- codingPlanFocusIndex,
14683
- getSafeVisibleOptionCount(
14684
- 5,
14685
- codingPlanOptions.length,
14686
- codingReservedLines
14687
- )
14703
+ /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select a partner coding plan for specialized programming assistance:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Specialized coding models from partners." : /* @__PURE__ */ React34.createElement(React34.Fragment, null, "These are specialized models optimized for coding and development tasks.", /* @__PURE__ */ React34.createElement(Newline2, null), "They require specific coding plan subscriptions from the respective providers."))), /* @__PURE__ */ React34.createElement(
14704
+ WindowedOptions,
14705
+ {
14706
+ options: codingPlanOptions,
14707
+ focusedIndex: codingPlanFocusIndex,
14708
+ maxVisible: getSafeVisibleOptionCount(
14709
+ 5,
14710
+ codingPlanOptions.length,
14711
+ codingReservedLines
14712
+ ),
14713
+ theme
14714
+ }
14688
14715
  ), /* @__PURE__ */ React34.createElement(Box27, { marginTop: footerMarginTop }, /* @__PURE__ */ React34.createElement(Text30, { dimColor: true }, "Press ", /* @__PURE__ */ React34.createElement(Text30, { color: theme.suggestion }, "Esc"), " to go back to main menu")))
14689
14716
  ));
14690
14717
  }
@@ -14695,14 +14722,18 @@ Please check your API key and try again, or press Tab to manually enter model na
14695
14722
  exitState,
14696
14723
  paddingY: containerPaddingY,
14697
14724
  gap: containerGap,
14698
- children: /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select your preferred AI provider for this model profile:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Choose the provider to use for this profile." : /* @__PURE__ */ React34.createElement(React34.Fragment, null, "Choose the provider you want to use for this model profile.", /* @__PURE__ */ React34.createElement(Newline2, null), "This will determine which models are available to you."))), renderWindowedOptions(
14699
- mainMenuOptions,
14700
- providerFocusIndex,
14701
- getSafeVisibleOptionCount(
14702
- 5,
14703
- mainMenuOptions.length,
14704
- providerReservedLines
14705
- )
14725
+ children: /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", gap: containerGap }, /* @__PURE__ */ React34.createElement(Text30, { bold: true }, "Select your preferred AI provider for this model profile:"), /* @__PURE__ */ React34.createElement(Box27, { flexDirection: "column", width: 70 }, /* @__PURE__ */ React34.createElement(Text30, { color: theme.secondaryText }, compactLayout ? "Choose the provider to use for this profile." : /* @__PURE__ */ React34.createElement(React34.Fragment, null, "Choose the provider you want to use for this model profile.", /* @__PURE__ */ React34.createElement(Newline2, null), "This will determine which models are available to you."))), /* @__PURE__ */ React34.createElement(
14726
+ WindowedOptions,
14727
+ {
14728
+ options: mainMenuOptions,
14729
+ focusedIndex: providerFocusIndex,
14730
+ maxVisible: getSafeVisibleOptionCount(
14731
+ 5,
14732
+ mainMenuOptions.length,
14733
+ providerReservedLines
14734
+ ),
14735
+ theme
14736
+ }
14706
14737
  ), /* @__PURE__ */ React34.createElement(Box27, { marginTop: tightLayout ? 0 : 1 }, /* @__PURE__ */ React34.createElement(Text30, { dimColor: true }, "You can change this later by running", " ", /* @__PURE__ */ React34.createElement(Text30, { color: theme.suggestion }, "/model"), " again")))
14707
14738
  }
14708
14739
  );
@@ -15203,7 +15234,7 @@ async function refreshPluginRuntimeFromInstalls() {
15203
15234
  const existingRoots = getSessionPlugins().map((p) => p.rootDir);
15204
15235
  const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
15205
15236
  if (dirs.length === 0) return [];
15206
- const { configureSessionPlugins } = await import("./pluginRuntime-6ETCZ2LL.js");
15237
+ const { configureSessionPlugins } = await import("./pluginRuntime-FPTKK6NY.js");
15207
15238
  const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
15208
15239
  return errors;
15209
15240
  }
@@ -15403,7 +15434,7 @@ ${formatValidationResult(result)}`;
15403
15434
  var plugin_default = plugin;
15404
15435
 
15405
15436
  // src/commands/output-style.tsx
15406
- import React39, { useMemo as useMemo5, useRef as useRef6 } from "react";
15437
+ import React39, { useMemo as useMemo6, useRef as useRef6 } from "react";
15407
15438
  import { Box as Box31, Text as Text35, useInput as useInput13 } from "ink";
15408
15439
  import chalk4 from "chalk";
15409
15440
  var HELP_ARGS = /* @__PURE__ */ new Set(["help", "-h", "--help"]);
@@ -15416,8 +15447,8 @@ function OutputStyleMenu({
15416
15447
  }) {
15417
15448
  const theme = getTheme();
15418
15449
  const doneRef = useRef6(false);
15419
- const styles = useMemo5(() => getAvailableOutputStyles(), []);
15420
- const styleNames = useMemo5(() => {
15450
+ const styles = useMemo6(() => getAvailableOutputStyles(), []);
15451
+ const styleNames = useMemo6(() => {
15421
15452
  const names = Object.keys(styles);
15422
15453
  return names.sort((a, b) => {
15423
15454
  if (a === DEFAULT_OUTPUT_STYLE && b !== DEFAULT_OUTPUT_STYLE) return -1;
@@ -15872,7 +15903,7 @@ async function call(onDone, context) {
15872
15903
  ModelConfig,
15873
15904
  {
15874
15905
  onClose: () => {
15875
- import("./model-FV3JDJKH.js").then(({ reloadModelManager: reloadModelManager2 }) => {
15906
+ import("./model-KPYCXWBK.js").then(({ reloadModelManager: reloadModelManager2 }) => {
15876
15907
  reloadModelManager2();
15877
15908
  triggerModelConfigChange();
15878
15909
  onDone();
@@ -16385,7 +16416,7 @@ function CostThresholdDialog({ onDone }) {
16385
16416
 
16386
16417
  // src/ui/screens/REPL.tsx
16387
16418
  import * as React98 from "react";
16388
- import { useEffect as useEffect25, useMemo as useMemo23, useRef as useRef13, useState as useState26, useCallback as useCallback16 } from "react";
16419
+ import { useEffect as useEffect25, useMemo as useMemo24, useRef as useRef13, useState as useState26, useCallback as useCallback16 } from "react";
16389
16420
 
16390
16421
  // src/ui/components/Message.tsx
16391
16422
  import { Box as Box50 } from "ink";
@@ -16417,7 +16448,7 @@ function UserToolErrorMessage({
16417
16448
  import * as React52 from "react";
16418
16449
 
16419
16450
  // src/ui/components/messages/user-tool-result-message/utils.tsx
16420
- import { useMemo as useMemo8 } from "react";
16451
+ import { useMemo as useMemo9 } from "react";
16421
16452
  function getToolUseFromMessages(toolUseID, messages) {
16422
16453
  let toolUse = null;
16423
16454
  for (const message of messages) {
@@ -16433,7 +16464,7 @@ function getToolUseFromMessages(toolUseID, messages) {
16433
16464
  return toolUse;
16434
16465
  }
16435
16466
  function useGetToolFromMessages(toolUseID, tools, messages) {
16436
- return useMemo8(() => {
16467
+ return useMemo9(() => {
16437
16468
  const toolUse = getToolUseFromMessages(toolUseID, messages);
16438
16469
  if (!toolUse) {
16439
16470
  throw new ReferenceError(
@@ -16986,7 +17017,7 @@ function ToolUseLoader({
16986
17017
  }
16987
17018
 
16988
17019
  // src/ui/components/messages/TaskToolMessage.tsx
16989
- import React56, { useEffect as useEffect14, useState as useState17, useMemo as useMemo9 } from "react";
17020
+ import React56, { useEffect as useEffect14, useState as useState17, useMemo as useMemo10 } from "react";
16990
17021
  import { Text as Text45 } from "ink";
16991
17022
  var agentConfigCache = /* @__PURE__ */ new Map();
16992
17023
  function TaskToolMessage({ agentType, children, bold = true }) {
@@ -17014,7 +17045,7 @@ function TaskToolMessage({ agentType, children, bold = true }) {
17014
17045
  mounted = false;
17015
17046
  };
17016
17047
  }, [agentType]);
17017
- const color = useMemo9(() => {
17048
+ const color = useMemo10(() => {
17018
17049
  return agentConfig?.color || theme.text;
17019
17050
  }, [agentConfig?.color, theme.text]);
17020
17051
  return /* @__PURE__ */ React56.createElement(Text45, { color, bold }, children);
@@ -17712,7 +17743,7 @@ function MessageResponse({ children }) {
17712
17743
  // src/ui/components/MessageSelector.tsx
17713
17744
  import { Box as Box52, Text as Text57, useInput as useInput18 } from "ink";
17714
17745
  import * as React71 from "react";
17715
- import { useMemo as useMemo10, useState as useState18, useEffect as useEffect15 } from "react";
17746
+ import { useMemo as useMemo11, useState as useState18, useEffect as useEffect15 } from "react";
17716
17747
  import figures6 from "figures";
17717
17748
  import { randomUUID as randomUUID3 } from "crypto";
17718
17749
  var MAX_VISIBLE_MESSAGES = 7;
@@ -17724,7 +17755,7 @@ function MessageSelector({
17724
17755
  tools,
17725
17756
  unresolvedToolUseIDs
17726
17757
  }) {
17727
- const currentUUID = useMemo10(randomUUID3, []);
17758
+ const currentUUID = useMemo11(randomUUID3, []);
17728
17759
  useEffect15(() => {
17729
17760
  }, []);
17730
17761
  function handleSelect(message) {
@@ -17734,7 +17765,7 @@ function MessageSelector({
17734
17765
  function handleEscape() {
17735
17766
  onEscape();
17736
17767
  }
17737
- const allItems = useMemo10(
17768
+ const allItems = useMemo11(
17738
17769
  () => [
17739
17770
  ...messages.filter(
17740
17771
  (_) => !(_.type === "user" && Array.isArray(_.message.content) && _.message.content[0]?.type === "tool_result")
@@ -17783,7 +17814,7 @@ function MessageSelector({
17783
17814
  allItems.length - MAX_VISIBLE_MESSAGES
17784
17815
  )
17785
17816
  );
17786
- const normalizedMessages = useMemo10(
17817
+ const normalizedMessages = useMemo11(
17787
17818
  () => normalizeMessages(messages).filter(isNotEmptyMessage),
17788
17819
  [messages]
17789
17820
  );
@@ -17830,7 +17861,7 @@ import * as React89 from "react";
17830
17861
  import chalk6 from "chalk";
17831
17862
  import { Box as Box55, Text as Text60, useInput as useInput19 } from "ink";
17832
17863
  import { basename as basename2, dirname as dirname6, extname as extname7 } from "path";
17833
- import React74, { useCallback as useCallback8, useMemo as useMemo12 } from "react";
17864
+ import React74, { useCallback as useCallback8, useMemo as useMemo13 } from "react";
17834
17865
 
17835
17866
  // src/ui/hooks/usePermissionRequestLogging.ts
17836
17867
  import { useEffect as useEffect16 } from "react";
@@ -17906,7 +17937,7 @@ function PermissionRequestTitle({
17906
17937
  // src/ui/components/permissions/file-edit-permission-request/FileEditToolDiff.tsx
17907
17938
  import * as React73 from "react";
17908
17939
  import { existsSync as existsSync10, readFileSync as readFileSync7 } from "fs";
17909
- import { useMemo as useMemo11 } from "react";
17940
+ import { useMemo as useMemo12 } from "react";
17910
17941
  import { Box as Box54, Text as Text59 } from "ink";
17911
17942
  import { relative as relative11 } from "path";
17912
17943
  function FileEditToolDiff({
@@ -17917,11 +17948,11 @@ function FileEditToolDiff({
17917
17948
  useBorder = true,
17918
17949
  width
17919
17950
  }) {
17920
- const file = useMemo11(
17951
+ const file = useMemo12(
17921
17952
  () => existsSync10(file_path) ? readFileSync7(file_path, "utf8") : "",
17922
17953
  [file_path]
17923
17954
  );
17924
- const patch = useMemo11(
17955
+ const patch = useMemo12(
17925
17956
  () => getPatch({
17926
17957
  filePath: file_path,
17927
17958
  fileContents: file,
@@ -18024,13 +18055,13 @@ function FileEditPermissionRequest({
18024
18055
  const { columns } = useTerminalSize();
18025
18056
  const { applyToolPermissionUpdate, toolPermissionContext } = usePermissionContext();
18026
18057
  const { file_path, new_string, old_string } = toolUseConfirm.input;
18027
- const modeCycleShortcut = useMemo12(() => getPermissionModeCycleShortcut(), []);
18058
+ const modeCycleShortcut = useMemo13(() => getPermissionModeCycleShortcut(), []);
18028
18059
  const hasSessionSuggestion = (toolUseConfirm.suggestions?.length ?? 0) > 0;
18029
18060
  const isInWorkingDir = isPathInWorkingDirectories(
18030
18061
  dirname6(file_path),
18031
18062
  toolPermissionContext
18032
18063
  );
18033
- const unaryEvent = useMemo12(
18064
+ const unaryEvent = useMemo13(
18034
18065
  () => ({
18035
18066
  completion_type: "str_replace_single",
18036
18067
  language_name: extractLanguageName(file_path)
@@ -18162,7 +18193,7 @@ async function extractLanguageName(file_path) {
18162
18193
 
18163
18194
  // src/ui/components/permissions/bash-permission-request/BashPermissionRequest.tsx
18164
18195
  import { Box as Box56, Text as Text61 } from "ink";
18165
- import React75, { useMemo as useMemo13 } from "react";
18196
+ import React75, { useMemo as useMemo14 } from "react";
18166
18197
 
18167
18198
  // src/ui/components/permissions/hooks.ts
18168
18199
  import { useEffect as useEffect17 } from "react";
@@ -18262,7 +18293,7 @@ function BashPermissionRequest({
18262
18293
  }) {
18263
18294
  const theme = getTheme();
18264
18295
  const { command: command4, run_in_background, description: description2 } = BashTool.inputSchema.parse(toolUseConfirm.input);
18265
- const unaryEvent = useMemo13(
18296
+ const unaryEvent = useMemo14(
18266
18297
  () => ({ completion_type: "tool_use_single", language_name: "none" }),
18267
18298
  []
18268
18299
  );
@@ -18359,7 +18390,7 @@ function BashPermissionRequest({
18359
18390
 
18360
18391
  // src/ui/components/permissions/FallbackPermissionRequest.tsx
18361
18392
  import { Box as Box57, Text as Text62 } from "ink";
18362
- import React76, { useMemo as useMemo14 } from "react";
18393
+ import React76, { useMemo as useMemo15 } from "react";
18363
18394
  import chalk8 from "chalk";
18364
18395
  function FallbackPermissionRequest({
18365
18396
  toolUseConfirm,
@@ -18369,7 +18400,7 @@ function FallbackPermissionRequest({
18369
18400
  const theme = getTheme();
18370
18401
  const originalUserFacingName = toolUseConfirm.tool.userFacingName();
18371
18402
  const userFacingName2 = originalUserFacingName.endsWith(" (MCP)") ? originalUserFacingName.slice(0, -6) : originalUserFacingName;
18372
- const unaryEvent = useMemo14(
18403
+ const unaryEvent = useMemo15(
18373
18404
  () => ({
18374
18405
  completion_type: "tool_use_single",
18375
18406
  language_name: "none"
@@ -18512,7 +18543,7 @@ function useNotifyAfterTimeout(message, timeout = DEFAULT_INTERACTION_THRESHOLD_
18512
18543
 
18513
18544
  // src/ui/components/permissions/file-write-permission-request/FileWritePermissionRequest.tsx
18514
18545
  import { Box as Box59, Text as Text64, useInput as useInput20 } from "ink";
18515
- import React78, { useCallback as useCallback9, useMemo as useMemo16 } from "react";
18546
+ import React78, { useCallback as useCallback9, useMemo as useMemo17 } from "react";
18516
18547
  import { basename as basename3, dirname as dirname7, extname as extname9 } from "path";
18517
18548
  import { existsSync as existsSync12 } from "fs";
18518
18549
  import chalk9 from "chalk";
@@ -18520,7 +18551,7 @@ import chalk9 from "chalk";
18520
18551
  // src/ui/components/permissions/file-write-permission-request/FileWriteToolDiff.tsx
18521
18552
  import * as React77 from "react";
18522
18553
  import { existsSync as existsSync11, readFileSync as readFileSync8 } from "fs";
18523
- import { useMemo as useMemo15 } from "react";
18554
+ import { useMemo as useMemo16 } from "react";
18524
18555
  import { Box as Box58, Text as Text63 } from "ink";
18525
18556
  import { extname as extname8, relative as relative12 } from "path";
18526
18557
  function FileWriteToolDiff({
@@ -18529,15 +18560,15 @@ function FileWriteToolDiff({
18529
18560
  verbose,
18530
18561
  width
18531
18562
  }) {
18532
- const fileExists = useMemo15(() => existsSync11(file_path), [file_path]);
18533
- const oldContent = useMemo15(() => {
18563
+ const fileExists = useMemo16(() => existsSync11(file_path), [file_path]);
18564
+ const oldContent = useMemo16(() => {
18534
18565
  if (!fileExists) {
18535
18566
  return "";
18536
18567
  }
18537
18568
  const enc = detectFileEncoding(file_path);
18538
18569
  return readFileSync8(file_path, enc);
18539
18570
  }, [file_path, fileExists]);
18540
- const hunks = useMemo15(() => {
18571
+ const hunks = useMemo16(() => {
18541
18572
  if (!fileExists) {
18542
18573
  return null;
18543
18574
  }
@@ -18586,13 +18617,13 @@ function FileWritePermissionRequest({
18586
18617
  }) {
18587
18618
  const { applyToolPermissionUpdate, toolPermissionContext } = usePermissionContext();
18588
18619
  const { file_path, content } = toolUseConfirm.input;
18589
- const modeCycleShortcut = useMemo16(() => getPermissionModeCycleShortcut(), []);
18620
+ const modeCycleShortcut = useMemo17(() => getPermissionModeCycleShortcut(), []);
18590
18621
  const hasSessionSuggestion = (toolUseConfirm.suggestions?.length ?? 0) > 0;
18591
18622
  const isInWorkingDir = isPathInWorkingDirectories(
18592
18623
  dirname7(file_path),
18593
18624
  toolPermissionContext
18594
18625
  );
18595
- const sessionLabel = useMemo16(() => {
18626
+ const sessionLabel = useMemo17(() => {
18596
18627
  const dirPath = dirname7(file_path);
18597
18628
  const dirName = basename3(dirPath) || "this directory";
18598
18629
  const shortcutHint = chalk9.bold.hex(getTheme().warning)(
@@ -18600,8 +18631,8 @@ function FileWritePermissionRequest({
18600
18631
  );
18601
18632
  return isInWorkingDir ? `Yes, allow all edits during this session ${shortcutHint}` : `Yes, allow all edits in ${chalk9.bold(`${dirName}/`)} during this session ${shortcutHint}`;
18602
18633
  }, [file_path, isInWorkingDir, modeCycleShortcut.displayText]);
18603
- const fileExists = useMemo16(() => existsSync12(file_path), [file_path]);
18604
- const unaryEvent = useMemo16(
18634
+ const fileExists = useMemo17(() => existsSync12(file_path), [file_path]);
18635
+ const unaryEvent = useMemo17(
18605
18636
  () => ({
18606
18637
  completion_type: "write_file_single",
18607
18638
  language_name: extractLanguageName2(file_path)
@@ -18743,7 +18774,7 @@ async function extractLanguageName2(file_path) {
18743
18774
 
18744
18775
  // src/ui/components/permissions/filesystem-permission-request/FilesystemPermissionRequest.tsx
18745
18776
  import { Box as Box60, Text as Text65, useInput as useInput21 } from "ink";
18746
- import React79, { useCallback as useCallback10, useMemo as useMemo17 } from "react";
18777
+ import React79, { useCallback as useCallback10, useMemo as useMemo18 } from "react";
18747
18778
  import chalk10 from "chalk";
18748
18779
  import { basename as basename4, dirname as dirname8 } from "path";
18749
18780
  import { statSync as statSync10 } from "fs";
@@ -18840,14 +18871,14 @@ function FilesystemPermissionRequestImpl({
18840
18871
  verbose
18841
18872
  }) {
18842
18873
  const { applyToolPermissionUpdate, toolPermissionContext } = usePermissionContext();
18843
- const modeCycleShortcut = useMemo17(() => getPermissionModeCycleShortcut(), []);
18874
+ const modeCycleShortcut = useMemo18(() => getPermissionModeCycleShortcut(), []);
18844
18875
  const userFacingName2 = toolUseConfirm.tool.userFacingName();
18845
18876
  const hasSessionSuggestion = (toolUseConfirm.suggestions?.length ?? 0) > 0;
18846
18877
  const userFacingReadOrWrite = toolUseConfirm.tool.isReadOnly(
18847
18878
  toolUseConfirm.input
18848
18879
  ) ? "Read" : "Edit";
18849
18880
  const title = `${userFacingReadOrWrite} ${isMultiFile(toolUseConfirm) ? "files" : "file"}`;
18850
- const unaryEvent = useMemo17(
18881
+ const unaryEvent = useMemo18(
18851
18882
  () => ({
18852
18883
  completion_type: "tool_use_single",
18853
18884
  language_name: "none"
@@ -18855,11 +18886,11 @@ function FilesystemPermissionRequestImpl({
18855
18886
  []
18856
18887
  );
18857
18888
  usePermissionRequestLogging(toolUseConfirm, unaryEvent);
18858
- const permissionDirPath = useMemo17(
18889
+ const permissionDirPath = useMemo18(
18859
18890
  () => pathToPermissionDirectory2(path5),
18860
18891
  [path5]
18861
18892
  );
18862
- const isInWorkingDir = useMemo17(
18893
+ const isInWorkingDir = useMemo18(
18863
18894
  () => isPathInWorkingDirectories(permissionDirPath, toolPermissionContext),
18864
18895
  [permissionDirPath, toolPermissionContext]
18865
18896
  );
@@ -19206,7 +19237,7 @@ function findCommand(commandName, commands) {
19206
19237
 
19207
19238
  // src/ui/components/permissions/slash-command-permission-request/SlashCommandPermissionRequest.tsx
19208
19239
  import { Box as Box61, Text as Text66 } from "ink";
19209
- import React81, { useMemo as useMemo18 } from "react";
19240
+ import React81, { useMemo as useMemo19 } from "react";
19210
19241
  import chalk11 from "chalk";
19211
19242
  function parsePrefix(command4) {
19212
19243
  const trimmed = command4.trim();
@@ -19223,7 +19254,7 @@ function SlashCommandPermissionRequest({
19223
19254
  verbose
19224
19255
  }) {
19225
19256
  const theme = getTheme();
19226
- const unaryEvent = useMemo18(
19257
+ const unaryEvent = useMemo19(
19227
19258
  () => ({ completion_type: "tool_use_single", language_name: "none" }),
19228
19259
  []
19229
19260
  );
@@ -19351,7 +19382,7 @@ function SlashCommandPermissionRequest({
19351
19382
 
19352
19383
  // src/ui/components/permissions/skill-permission-request/SkillPermissionRequest.tsx
19353
19384
  import { Box as Box62, Text as Text67 } from "ink";
19354
- import React82, { useMemo as useMemo19 } from "react";
19385
+ import React82, { useMemo as useMemo20 } from "react";
19355
19386
  import chalk12 from "chalk";
19356
19387
  function SkillPermissionRequest({
19357
19388
  toolUseConfirm,
@@ -19359,7 +19390,7 @@ function SkillPermissionRequest({
19359
19390
  verbose
19360
19391
  }) {
19361
19392
  const theme = getTheme();
19362
- const unaryEvent = useMemo19(
19393
+ const unaryEvent = useMemo20(
19363
19394
  () => ({ completion_type: "tool_use_single", language_name: "none" }),
19364
19395
  []
19365
19396
  );
@@ -19843,7 +19874,7 @@ function EnterPlanModePermissionRequest({
19843
19874
 
19844
19875
  // src/ui/components/permissions/plan-mode-permission-request/ExitPlanModePermissionRequest.tsx
19845
19876
  import { Box as Box66, Text as Text71, useInput as useInput23 } from "ink";
19846
- import React86, { useEffect as useEffect19, useMemo as useMemo20, useState as useState19 } from "react";
19877
+ import React86, { useEffect as useEffect19, useMemo as useMemo21, useState as useState19 } from "react";
19847
19878
 
19848
19879
  // src/utils/system/externalEditor.ts
19849
19880
  import { spawn, spawnSync } from "child_process";
@@ -20063,7 +20094,7 @@ function ExitPlanModePermissionRequest({
20063
20094
  const theme = getTheme();
20064
20095
  const { setMode } = usePermissionContext();
20065
20096
  const conversationKey = getPlanConversationKey(toolUseConfirm.toolUseContext);
20066
- const planFilePath = useMemo20(
20097
+ const planFilePath = useMemo21(
20067
20098
  () => getPlanFilePath(void 0, conversationKey),
20068
20099
  [conversationKey]
20069
20100
  );
@@ -20141,7 +20172,7 @@ function ExitPlanModePermissionRequest({
20141
20172
  });
20142
20173
  const bypassAvailable = toolUseConfirm.toolUseContext.options?.safeMode !== true;
20143
20174
  const launchSwarmAvailable = false;
20144
- const options = useMemo20(
20175
+ const options = useMemo21(
20145
20176
  () => getExitPlanModeOptions({
20146
20177
  bypassAvailable,
20147
20178
  launchSwarmAvailable,
@@ -20344,7 +20375,7 @@ var AskUserQuestionTool = {
20344
20375
  };
20345
20376
 
20346
20377
  // src/ui/components/permissions/ask-user-question-permission-request/AskUserQuestionPermissionRequest.tsx
20347
- import React88, { useCallback as useCallback11, useMemo as useMemo21, useState as useState20 } from "react";
20378
+ import React88, { useCallback as useCallback11, useMemo as useMemo22, useState as useState20 } from "react";
20348
20379
  import { Box as Box68, Text as Text73, useInput as useInput24 } from "ink";
20349
20380
  import figures7 from "figures";
20350
20381
  import stringWidth from "string-width";
@@ -20452,7 +20483,7 @@ function AskUserQuestionPermissionRequest({
20452
20483
  }) {
20453
20484
  const theme = getTheme();
20454
20485
  const { columns } = useTerminalSize();
20455
- const parsed = useMemo21(() => {
20486
+ const parsed = useMemo22(() => {
20456
20487
  const result = AskUserQuestionTool.inputSchema.safeParse(
20457
20488
  toolUseConfirm.input
20458
20489
  );
@@ -20478,7 +20509,7 @@ function AskUserQuestionPermissionRequest({
20478
20509
  const isSubmitTab = currentQuestionIndex === questions.length;
20479
20510
  const hideSubmitTab = questions.length === 1 && !questions[0]?.multiSelect;
20480
20511
  const maxTabIndex = hideSubmitTab ? Math.max(0, questions.length - 1) : questions.length;
20481
- const tabHeaders = useMemo21(
20512
+ const tabHeaders = useMemo22(
20482
20513
  () => getTabHeaders({
20483
20514
  questions,
20484
20515
  currentQuestionIndex,
@@ -22854,7 +22885,7 @@ function __shouldHandleUnifiedCompletionTabKeyForTests(key) {
22854
22885
  }
22855
22886
 
22856
22887
  // src/ui/components/PromptInput.tsx
22857
- import { memo, useCallback as useCallback13, useEffect as useEffect22, useMemo as useMemo22, useState as useState24 } from "react";
22888
+ import { memo, useCallback as useCallback13, useEffect as useEffect22, useMemo as useMemo23, useState as useState24 } from "react";
22858
22889
 
22859
22890
  // src/utils/model/tokens.ts
22860
22891
  function countTokens(messages) {
@@ -23136,7 +23167,7 @@ function useStatusLine() {
23136
23167
  // src/ui/components/PromptInput.tsx
23137
23168
  async function interpretHashCommand(input) {
23138
23169
  try {
23139
- const { queryQuick: queryQuick2 } = await import("./llm-ZUQC4WYM.js");
23170
+ const { queryQuick: queryQuick2 } = await import("./llm-XVXWYOHK.js");
23140
23171
  const systemPrompt = [
23141
23172
  "You're helping the user structure notes that will be added to their KODING.md file.",
23142
23173
  "Format the user's input into a well-structured note that will be useful for later reference.",
@@ -23211,14 +23242,14 @@ function PromptInput({
23211
23242
  const pastedTextCounter = React93.useRef(1);
23212
23243
  const pastedImageCounter = React93.useRef(1);
23213
23244
  const { cycleMode, currentMode, toolPermissionContext } = usePermissionContext();
23214
- const modeCycleShortcut = useMemo22(() => getPermissionModeCycleShortcut(), []);
23245
+ const modeCycleShortcut = useMemo23(() => getPermissionModeCycleShortcut(), []);
23215
23246
  const showQuickModelSwitchShortcut = modeCycleShortcut.displayText !== "alt+m";
23216
23247
  const handleRewindConversation = useDoublePress(
23217
23248
  setRewindMessagePending,
23218
23249
  () => onShowMessageSelector()
23219
23250
  );
23220
23251
  const { columns, rows } = useTerminalSize();
23221
- const commandWidth = useMemo22(
23252
+ const commandWidth = useMemo23(
23222
23253
  () => Math.max(...commands.map((cmd) => cmd.userFacingName().length)) + 5,
23223
23254
  [commands]
23224
23255
  );
@@ -23238,7 +23269,7 @@ function PromptInput({
23238
23269
  });
23239
23270
  const theme = getTheme();
23240
23271
  const statusLine = useStatusLine();
23241
- const renderedSuggestions = useMemo22(() => {
23272
+ const renderedSuggestions = useMemo23(() => {
23242
23273
  if (suggestions.length === 0) return null;
23243
23274
  return suggestions.map((suggestion, index) => {
23244
23275
  const isSelected = index === selectedIndex;
@@ -23449,7 +23480,7 @@ function PromptInput({
23449
23480
  if (messages2.length) {
23450
23481
  if (mode === "bash") {
23451
23482
  onQuery(messages2, newAbortController).then(async () => {
23452
- const { getCwd: getCwd2 } = await import("./state-P5G6CO5V.js");
23483
+ const { getCwd: getCwd2 } = await import("./state-KNRWP3FO.js");
23453
23484
  setCurrentPwd(getCwd2());
23454
23485
  });
23455
23486
  } else {
@@ -23588,10 +23619,10 @@ function PromptInput({
23588
23619
  ]
23589
23620
  );
23590
23621
  const textInputColumns = columns - 6;
23591
- const tokenUsage = useMemo22(() => countTokens(messages), [messages]);
23622
+ const tokenUsage = useMemo23(() => countTokens(messages), [messages]);
23592
23623
  const modelManager = getModelManager();
23593
23624
  const currentModelId = modelManager.getModel("main")?.id || null;
23594
- const modelInfo = useMemo22(() => {
23625
+ const modelInfo = useMemo23(() => {
23595
23626
  const freshModelManager = getModelManager();
23596
23627
  const currentModel = freshModelManager.getModel("main");
23597
23628
  if (!currentModel) {
@@ -25756,19 +25787,19 @@ function REPL({
25756
25787
  useEffect25(() => {
25757
25788
  onInit();
25758
25789
  }, []);
25759
- const normalizedMessages = useMemo23(
25790
+ const normalizedMessages = useMemo24(
25760
25791
  () => normalizeMessages(messages).filter(isNotEmptyMessage),
25761
25792
  [messages]
25762
25793
  );
25763
- const unresolvedToolUseIDs = useMemo23(
25794
+ const unresolvedToolUseIDs = useMemo24(
25764
25795
  () => getUnresolvedToolUseIDs(normalizedMessages),
25765
25796
  [normalizedMessages]
25766
25797
  );
25767
- const inProgressToolUseIDs = useMemo23(
25798
+ const inProgressToolUseIDs = useMemo24(
25768
25799
  () => getInProgressToolUseIDs(normalizedMessages),
25769
25800
  [normalizedMessages]
25770
25801
  );
25771
- const erroredToolUseIDs = useMemo23(
25802
+ const erroredToolUseIDs = useMemo24(
25772
25803
  () => new Set(
25773
25804
  getErroredToolUseMessages(normalizedMessages).map(
25774
25805
  (_) => _.message.content[0].id
@@ -25776,11 +25807,11 @@ function REPL({
25776
25807
  ),
25777
25808
  [normalizedMessages]
25778
25809
  );
25779
- const orderedMessages = useMemo23(
25810
+ const orderedMessages = useMemo24(
25780
25811
  () => reorderMessages(normalizedMessages),
25781
25812
  [normalizedMessages]
25782
25813
  );
25783
- const replStaticPrefixLength = useMemo23(
25814
+ const replStaticPrefixLength = useMemo24(
25784
25815
  () => getReplStaticPrefixLength(
25785
25816
  orderedMessages,
25786
25817
  normalizedMessages,
@@ -25788,7 +25819,7 @@ function REPL({
25788
25819
  ),
25789
25820
  [orderedMessages, normalizedMessages, unresolvedToolUseIDs]
25790
25821
  );
25791
- const messagesJSX = useMemo23(() => {
25822
+ const messagesJSX = useMemo24(() => {
25792
25823
  return orderedMessages.map((_, index) => {
25793
25824
  const toolUseID = getToolUseID(_);
25794
25825
  const message = _.type === "progress" ? _.content.message.content[0]?.type === "text" && _.content.message.content[0].text === INTERRUPT_MESSAGE ? /* @__PURE__ */ React98.createElement(
@@ -25880,7 +25911,7 @@ function REPL({
25880
25911
  isDefaultModel,
25881
25912
  replStaticPrefixLength
25882
25913
  ]);
25883
- const staticItems = useMemo23(
25914
+ const staticItems = useMemo24(
25884
25915
  () => [
25885
25916
  {
25886
25917
  jsx: /* @__PURE__ */ React98.createElement(Box74, { flexDirection: "column", key: `logo${forkNumber}` }, /* @__PURE__ */ React98.createElement(
@@ -25905,7 +25936,7 @@ function REPL({
25905
25936
  updateCommands
25906
25937
  ]
25907
25938
  );
25908
- const transientItems = useMemo23(
25939
+ const transientItems = useMemo24(
25909
25940
  () => messagesJSX.slice(replStaticPrefixLength),
25910
25941
  [messagesJSX, replStaticPrefixLength]
25911
25942
  );
@@ -26171,7 +26202,7 @@ var resume_default = {
26171
26202
  import React103 from "react";
26172
26203
 
26173
26204
  // src/commands/agents/ui.tsx
26174
- import React102, { useCallback as useCallback17, useEffect as useEffect26, useMemo as useMemo24, useRef as useRef14, useState as useState27 } from "react";
26205
+ import React102, { useCallback as useCallback17, useEffect as useEffect26, useMemo as useMemo25, useRef as useRef14, useState as useState27 } from "react";
26175
26206
  import { Box as Box76, Text as Text80, useInput as useInput30 } from "ink";
26176
26207
  import figures8 from "figures";
26177
26208
  import chalk14 from "chalk";
@@ -26227,7 +26258,7 @@ import { homedir as homedir7 } from "os";
26227
26258
  // src/commands/agents/generation.ts
26228
26259
  import { randomUUID as randomUUID5 } from "crypto";
26229
26260
  async function generateAgentWithClaude(prompt) {
26230
- const { queryModel } = await import("./llm-ZUQC4WYM.js");
26261
+ const { queryModel } = await import("./llm-XVXWYOHK.js");
26231
26262
  const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
26232
26263
 
26233
26264
  Return your response as a JSON object with exactly these fields:
@@ -26636,7 +26667,7 @@ function computeOverrides(args) {
26636
26667
  }
26637
26668
  function AgentsListView(props) {
26638
26669
  const theme = getTheme();
26639
- const selectableAgents = useMemo24(() => {
26670
+ const selectableAgents = useMemo25(() => {
26640
26671
  const nonBuiltIn = props.agents.filter((a) => a.source !== "built-in");
26641
26672
  if (props.source === "all") {
26642
26673
  return [
@@ -26814,7 +26845,7 @@ function Wizard(props) {
26814
26845
  }, []);
26815
26846
  const cancel = useCallback17(() => props.onCancel(), [props.onCancel]);
26816
26847
  const done = useCallback17(() => props.onDone(data), [props, data]);
26817
- const ctx = useMemo24(
26848
+ const ctx = useMemo25(
26818
26849
  () => ({
26819
26850
  stepIndex,
26820
26851
  totalSteps: props.steps.length,
@@ -27093,7 +27124,7 @@ function StepDescription({ ctx }) {
27093
27124
  );
27094
27125
  }
27095
27126
  function ToolPicker(props) {
27096
- const normalizedTools = useMemo24(() => {
27127
+ const normalizedTools = useMemo25(() => {
27097
27128
  const unique = /* @__PURE__ */ new Map();
27098
27129
  for (const tool of props.tools) {
27099
27130
  if (!tool?.name) continue;
@@ -27101,11 +27132,11 @@ function ToolPicker(props) {
27101
27132
  }
27102
27133
  return Array.from(unique.values()).sort((a, b) => a.name.localeCompare(b.name));
27103
27134
  }, [props.tools]);
27104
- const allToolNames = useMemo24(
27135
+ const allToolNames = useMemo25(
27105
27136
  () => normalizedTools.map((t) => t.name),
27106
27137
  [normalizedTools]
27107
27138
  );
27108
- const initialSelectedNames = useMemo24(() => {
27139
+ const initialSelectedNames = useMemo25(() => {
27109
27140
  if (!props.initialTools) return allToolNames;
27110
27141
  if (props.initialTools.includes("*")) return allToolNames;
27111
27142
  const available = new Set(allToolNames);
@@ -27114,7 +27145,7 @@ function ToolPicker(props) {
27114
27145
  const [selected, setSelected] = useState27(initialSelectedNames);
27115
27146
  const [cursorIndex, setCursorIndex] = useState27(0);
27116
27147
  const [showAdvanced, setShowAdvanced] = useState27(false);
27117
- const selectedSet = useMemo24(() => new Set(selected), [selected]);
27148
+ const selectedSet = useMemo25(() => new Set(selected), [selected]);
27118
27149
  const isAllSelected = selected.length === allToolNames.length && allToolNames.length > 0;
27119
27150
  const toggleOne = (name2) => {
27120
27151
  setSelected(
@@ -27134,7 +27165,7 @@ function ToolPicker(props) {
27134
27165
  const next = selected.length === allToolNames.length && allToolNames.every((n) => selected.includes(n)) ? void 0 : selected;
27135
27166
  props.onComplete(next);
27136
27167
  };
27137
- const categorized = useMemo24(() => {
27168
+ const categorized = useMemo25(() => {
27138
27169
  const readOnly = /* @__PURE__ */ new Set(["Read", "Glob", "Grep", "LS"]);
27139
27170
  const edit = /* @__PURE__ */ new Set(["Edit", "MultiEdit", "Write", "NotebookEdit"]);
27140
27171
  const execution = /* @__PURE__ */ new Set(["Bash", "BashOutput", "KillBash"]);
@@ -27149,7 +27180,7 @@ function ToolPicker(props) {
27149
27180
  }
27150
27181
  return buckets;
27151
27182
  }, [normalizedTools]);
27152
- const mcpServers = useMemo24(() => {
27183
+ const mcpServers = useMemo25(() => {
27153
27184
  const byServer = /* @__PURE__ */ new Map();
27154
27185
  for (const name2 of categorized.mcp) {
27155
27186
  const parsed = parseMcpToolName(name2);
@@ -27160,7 +27191,7 @@ function ToolPicker(props) {
27160
27191
  }
27161
27192
  return Array.from(byServer.entries()).map(([serverName, toolNames]) => ({ serverName, toolNames })).sort((a, b) => a.serverName.localeCompare(b.serverName));
27162
27193
  }, [categorized.mcp]);
27163
- const items = useMemo24(() => {
27194
+ const items = useMemo25(() => {
27164
27195
  const out = [];
27165
27196
  out.push({ id: "continue", label: "[ Continue ]", action: complete });
27166
27197
  out.push({
@@ -27419,7 +27450,7 @@ function StepConfirm(props) {
27419
27450
  );
27420
27451
  }
27421
27452
  function CreateAgentWizard(props) {
27422
- const steps = useMemo24(() => {
27453
+ const steps = useMemo25(() => {
27423
27454
  return [
27424
27455
  (ctx) => /* @__PURE__ */ React102.createElement(StepChooseLocation, { ctx }),
27425
27456
  (ctx) => /* @__PURE__ */ React102.createElement(StepChooseMethod, { ctx }),
@@ -27536,7 +27567,7 @@ function EditAgent(props) {
27536
27567
  const [mode, setMode] = useState27("menu");
27537
27568
  const [selectedIndex, setSelectedIndex] = useState27(0);
27538
27569
  const [error, setError] = useState27(null);
27539
- const menuItems = useMemo24(
27570
+ const menuItems = useMemo25(
27540
27571
  () => [
27541
27572
  { label: "Open in editor", action: "open" },
27542
27573
  { label: "Edit tools", action: "edit-tools" },
@@ -27696,11 +27727,11 @@ function AgentsUI({ onExit }) {
27696
27727
  mounted = false;
27697
27728
  };
27698
27729
  }, [refresh]);
27699
- const agentsWithOverride = useMemo24(
27730
+ const agentsWithOverride = useMemo25(
27700
27731
  () => computeOverrides({ allAgents, activeAgents }),
27701
27732
  [allAgents, activeAgents]
27702
27733
  );
27703
- const listAgentsForSource = useMemo24(() => {
27734
+ const listAgentsForSource = useMemo25(() => {
27704
27735
  const bySource = {
27705
27736
  "built-in": agentsWithOverride.filter((a) => a.source === "built-in"),
27706
27737
  userSettings: agentsWithOverride.filter((a) => a.source === "userSettings"),
@@ -29247,7 +29278,7 @@ function WebFetchPermissionRequest({
29247
29278
  verbose
29248
29279
  }) {
29249
29280
  const theme = getTheme();
29250
- const unaryEvent = useMemo25(
29281
+ const unaryEvent = useMemo26(
29251
29282
  () => ({ completion_type: "tool_use_single", language_name: "none" }),
29252
29283
  []
29253
29284
  );