pybao-cli 1.3.92 → 1.3.94
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.
- package/dist/REPL-4BSQD6RV.js +47 -0
- package/dist/{acp-WA34EP4Q.js → acp-YO2PAWMA.js} +29 -29
- package/dist/{agentsValidate-77QXXTFH.js → agentsValidate-7TTIU4KT.js} +7 -7
- package/dist/{ask-25QZ7VL6.js → ask-5AMDD5YY.js} +28 -28
- package/dist/{autoUpdater-D3DOZCYZ.js → autoUpdater-HRKB5GLO.js} +3 -3
- package/dist/{chunk-F5MBTGHO.js → chunk-3EWYCNNT.js} +1 -1
- package/dist/{chunk-ZZVEO3HS.js → chunk-44LR7MWS.js} +2 -2
- package/dist/{chunk-YMVHPSJ4.js → chunk-4XVE3R25.js} +3 -3
- package/dist/{chunk-4KXOAXLT.js → chunk-5ABIX6FW.js} +2 -2
- package/dist/{chunk-5D4LA7MX.js → chunk-5BGDWXLH.js} +1 -1
- package/dist/{chunk-CNQZQWGS.js → chunk-5KRDMLJL.js} +2 -2
- package/dist/{chunk-VUVKQMC5.js → chunk-6H74XS5Q.js} +1 -1
- package/dist/{chunk-6PYLF3ET.js → chunk-ABLSL3AG.js} +4 -4
- package/dist/{chunk-QFZQ4YIM.js → chunk-CBTQYVYS.js} +2 -2
- package/dist/{chunk-7JQ2O2O7.js → chunk-DLJADBQV.js} +3 -3
- package/dist/{chunk-DUYRUANR.js → chunk-ERKC3UO6.js} +1 -1
- package/dist/{chunk-4VZVUC7S.js → chunk-EUMJ67M4.js} +3 -3
- package/dist/{chunk-BHHLJAAX.js → chunk-F3T5A5NU.js} +2 -2
- package/dist/{chunk-X4SFGT4J.js → chunk-FILUPMEY.js} +1 -1
- package/dist/{chunk-BF3QQA6B.js → chunk-FMK7MTHV.js} +6 -7
- package/dist/{chunk-BF3QQA6B.js.map → chunk-FMK7MTHV.js.map} +2 -2
- package/dist/{chunk-3EAW7NQW.js → chunk-HBTCER5K.js} +225 -93
- package/dist/chunk-HBTCER5K.js.map +7 -0
- package/dist/{chunk-Z66NVOKH.js → chunk-IITK54RR.js} +1 -1
- package/dist/{chunk-YIZ5ZIMX.js → chunk-JXFYURRO.js} +1 -1
- package/dist/{chunk-YIZ5ZIMX.js.map → chunk-JXFYURRO.js.map} +1 -1
- package/dist/{chunk-NQOZPIZ3.js → chunk-LO35EMX6.js} +7 -3
- package/dist/{chunk-NQOZPIZ3.js.map → chunk-LO35EMX6.js.map} +2 -2
- package/dist/{chunk-KDL4PYX2.js → chunk-NIPMKTRR.js} +1 -1
- package/dist/{chunk-MNN3BFEZ.js → chunk-PZ3OA5BR.js} +2 -2
- package/dist/{chunk-NVUSSOII.js → chunk-QULJAEPY.js} +30 -220
- package/dist/chunk-QULJAEPY.js.map +7 -0
- package/dist/{chunk-B5HI7CIZ.js → chunk-RQ36RHKE.js} +3 -3
- package/dist/{chunk-QYFEJFLG.js → chunk-UBBFZ6OX.js} +3 -3
- package/dist/{chunk-LS3G24MQ.js → chunk-WDZX6SSG.js} +2 -2
- package/dist/{chunk-BZJJX5ON.js → chunk-XNLDOVUX.js} +1 -1
- package/dist/{chunk-DHVVPKIB.js → chunk-YDROMLPD.js} +3 -3
- package/dist/{chunk-HJTLI6VS.js → chunk-YOF7G7XX.js} +6 -3
- package/dist/chunk-YOF7G7XX.js.map +7 -0
- package/dist/{chunk-POL6ZPVE.js → chunk-ZCLKXEG7.js} +3 -3
- package/dist/{chunk-CX3J3ZM2.js → chunk-ZPC5H6IJ.js} +1 -1
- package/dist/{cli-F4BJ2LO2.js → cli-N7RCYDCS.js} +87 -87
- package/dist/commands-WOG57ONZ.js +51 -0
- package/dist/{config-7T6GQHYO.js → config-EEZDX6VI.js} +4 -4
- package/dist/{context-FCGOJXLG.js → context-Z25FQHJI.js} +7 -5
- package/dist/{customCommands-ZQCOLNAA.js → customCommands-TWRUIICC.js} +4 -4
- package/dist/{env-YEMSVJMU.js → env-7QZESNLR.js} +2 -2
- package/dist/{file-PBBVWSIC.js → file-PQUXWGXR.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-N2EGKP4A.js → llm-MQWL2SSO.js} +29 -29
- package/dist/{llmLazy-M5HJDVWS.js → llmLazy-DXNSPHUD.js} +1 -1
- package/dist/{loader-3LUHCW5P.js → loader-Y5RNCE6H.js} +4 -4
- package/dist/{lsp-EIXOHBY2.js → lsp-3SEMIS23.js} +6 -6
- package/dist/{lspAnchor-QTXVGYX4.js → lspAnchor-ROYOONP6.js} +6 -6
- package/dist/{mcp-65I2B7GH.js → mcp-PPHLOLOV.js} +7 -7
- package/dist/{mentionProcessor-MK4NRC65.js → mentionProcessor-6KB4Q3TJ.js} +5 -5
- package/dist/{messages-IHFHMYSA.js → messages-MHTRDHLR.js} +1 -1
- package/dist/{model-OJUT7KMM.js → model-BY6Q3JR2.js} +5 -5
- package/dist/{openai-SZYDID6E.js → openai-56DGKVIZ.js} +5 -5
- package/dist/{outputStyles-LASFU3IN.js → outputStyles-RSJECVSC.js} +4 -4
- package/dist/{pluginRuntime-EE7QC4ZO.js → pluginRuntime-MVYLH6Q3.js} +6 -6
- package/dist/{pluginValidation-RJH2VNIM.js → pluginValidation-X4CTCTPV.js} +6 -6
- package/dist/prompts-2A4JRRYL.js +53 -0
- package/dist/{pybAgentSessionLoad-ZHRRX5SH.js → pybAgentSessionLoad-JOK7VUDA.js} +4 -4
- package/dist/{pybAgentSessionResume-4BTZDUYL.js → pybAgentSessionResume-VELQGXDW.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-R653JAD5.js → pybAgentStreamJsonSession-2VHKL7TH.js} +1 -1
- package/dist/{pybHooks-PZO5PZ4Z.js → pybHooks-54FGEFEZ.js} +4 -4
- package/dist/query-72MRKEWG.js +61 -0
- package/dist/{registry-IQEOGXFH.js → registry-VWFL2E45.js} +5 -5
- package/dist/{ripgrep-S37P6LBE.js → ripgrep-TYXUNA37.js} +3 -3
- package/dist/{skillMarketplace-KUSRKZUY.js → skillMarketplace-GMDZPBPT.js} +3 -3
- package/dist/{state-BPJBUEMP.js → state-DZAFEODP.js} +2 -2
- package/dist/{theme-PHX4BKDY.js → theme-LB2G2R3D.js} +5 -5
- package/dist/{toolPermissionSettings-HJFZDYFO.js → toolPermissionSettings-XR4I6DAX.js} +6 -6
- package/dist/tools-JTIN6KWF.js +52 -0
- package/dist/{userInput-CJWBEKXW.js → userInput-TLJ56H7H.js} +30 -30
- package/package.json +1 -1
- package/dist/REPL-FHAVYTOR.js +0 -47
- package/dist/chunk-3EAW7NQW.js.map +0 -7
- package/dist/chunk-HJTLI6VS.js.map +0 -7
- package/dist/chunk-NVUSSOII.js.map +0 -7
- package/dist/commands-HSOIWNZO.js +0 -51
- package/dist/prompts-KXE7CM3Y.js +0 -53
- package/dist/query-D4TTBO3G.js +0 -59
- package/dist/tools-ERFLE7MQ.js +0 -52
- /package/dist/{REPL-FHAVYTOR.js.map → REPL-4BSQD6RV.js.map} +0 -0
- /package/dist/{acp-WA34EP4Q.js.map → acp-YO2PAWMA.js.map} +0 -0
- /package/dist/{agentsValidate-77QXXTFH.js.map → agentsValidate-7TTIU4KT.js.map} +0 -0
- /package/dist/{ask-25QZ7VL6.js.map → ask-5AMDD5YY.js.map} +0 -0
- /package/dist/{autoUpdater-D3DOZCYZ.js.map → autoUpdater-HRKB5GLO.js.map} +0 -0
- /package/dist/{chunk-F5MBTGHO.js.map → chunk-3EWYCNNT.js.map} +0 -0
- /package/dist/{chunk-ZZVEO3HS.js.map → chunk-44LR7MWS.js.map} +0 -0
- /package/dist/{chunk-YMVHPSJ4.js.map → chunk-4XVE3R25.js.map} +0 -0
- /package/dist/{chunk-4KXOAXLT.js.map → chunk-5ABIX6FW.js.map} +0 -0
- /package/dist/{chunk-5D4LA7MX.js.map → chunk-5BGDWXLH.js.map} +0 -0
- /package/dist/{chunk-CNQZQWGS.js.map → chunk-5KRDMLJL.js.map} +0 -0
- /package/dist/{chunk-VUVKQMC5.js.map → chunk-6H74XS5Q.js.map} +0 -0
- /package/dist/{chunk-6PYLF3ET.js.map → chunk-ABLSL3AG.js.map} +0 -0
- /package/dist/{chunk-QFZQ4YIM.js.map → chunk-CBTQYVYS.js.map} +0 -0
- /package/dist/{chunk-7JQ2O2O7.js.map → chunk-DLJADBQV.js.map} +0 -0
- /package/dist/{chunk-DUYRUANR.js.map → chunk-ERKC3UO6.js.map} +0 -0
- /package/dist/{chunk-4VZVUC7S.js.map → chunk-EUMJ67M4.js.map} +0 -0
- /package/dist/{chunk-BHHLJAAX.js.map → chunk-F3T5A5NU.js.map} +0 -0
- /package/dist/{chunk-X4SFGT4J.js.map → chunk-FILUPMEY.js.map} +0 -0
- /package/dist/{chunk-Z66NVOKH.js.map → chunk-IITK54RR.js.map} +0 -0
- /package/dist/{chunk-KDL4PYX2.js.map → chunk-NIPMKTRR.js.map} +0 -0
- /package/dist/{chunk-MNN3BFEZ.js.map → chunk-PZ3OA5BR.js.map} +0 -0
- /package/dist/{chunk-B5HI7CIZ.js.map → chunk-RQ36RHKE.js.map} +0 -0
- /package/dist/{chunk-QYFEJFLG.js.map → chunk-UBBFZ6OX.js.map} +0 -0
- /package/dist/{chunk-LS3G24MQ.js.map → chunk-WDZX6SSG.js.map} +0 -0
- /package/dist/{chunk-BZJJX5ON.js.map → chunk-XNLDOVUX.js.map} +0 -0
- /package/dist/{chunk-DHVVPKIB.js.map → chunk-YDROMLPD.js.map} +0 -0
- /package/dist/{chunk-POL6ZPVE.js.map → chunk-ZCLKXEG7.js.map} +0 -0
- /package/dist/{chunk-CX3J3ZM2.js.map → chunk-ZPC5H6IJ.js.map} +0 -0
- /package/dist/{cli-F4BJ2LO2.js.map → cli-N7RCYDCS.js.map} +0 -0
- /package/dist/{commands-HSOIWNZO.js.map → commands-WOG57ONZ.js.map} +0 -0
- /package/dist/{config-7T6GQHYO.js.map → config-EEZDX6VI.js.map} +0 -0
- /package/dist/{context-FCGOJXLG.js.map → context-Z25FQHJI.js.map} +0 -0
- /package/dist/{customCommands-ZQCOLNAA.js.map → customCommands-TWRUIICC.js.map} +0 -0
- /package/dist/{env-YEMSVJMU.js.map → env-7QZESNLR.js.map} +0 -0
- /package/dist/{file-PBBVWSIC.js.map → file-PQUXWGXR.js.map} +0 -0
- /package/dist/{llm-N2EGKP4A.js.map → llm-MQWL2SSO.js.map} +0 -0
- /package/dist/{llmLazy-M5HJDVWS.js.map → llmLazy-DXNSPHUD.js.map} +0 -0
- /package/dist/{loader-3LUHCW5P.js.map → loader-Y5RNCE6H.js.map} +0 -0
- /package/dist/{lsp-EIXOHBY2.js.map → lsp-3SEMIS23.js.map} +0 -0
- /package/dist/{lspAnchor-QTXVGYX4.js.map → lspAnchor-ROYOONP6.js.map} +0 -0
- /package/dist/{mcp-65I2B7GH.js.map → mcp-PPHLOLOV.js.map} +0 -0
- /package/dist/{mentionProcessor-MK4NRC65.js.map → mentionProcessor-6KB4Q3TJ.js.map} +0 -0
- /package/dist/{messages-IHFHMYSA.js.map → messages-MHTRDHLR.js.map} +0 -0
- /package/dist/{model-OJUT7KMM.js.map → model-BY6Q3JR2.js.map} +0 -0
- /package/dist/{openai-SZYDID6E.js.map → openai-56DGKVIZ.js.map} +0 -0
- /package/dist/{outputStyles-LASFU3IN.js.map → outputStyles-RSJECVSC.js.map} +0 -0
- /package/dist/{pluginRuntime-EE7QC4ZO.js.map → pluginRuntime-MVYLH6Q3.js.map} +0 -0
- /package/dist/{pluginValidation-RJH2VNIM.js.map → pluginValidation-X4CTCTPV.js.map} +0 -0
- /package/dist/{prompts-KXE7CM3Y.js.map → prompts-2A4JRRYL.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-ZHRRX5SH.js.map → pybAgentSessionLoad-JOK7VUDA.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-4BTZDUYL.js.map → pybAgentSessionResume-VELQGXDW.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-R653JAD5.js.map → pybAgentStreamJsonSession-2VHKL7TH.js.map} +0 -0
- /package/dist/{pybHooks-PZO5PZ4Z.js.map → pybHooks-54FGEFEZ.js.map} +0 -0
- /package/dist/{query-D4TTBO3G.js.map → query-72MRKEWG.js.map} +0 -0
- /package/dist/{registry-IQEOGXFH.js.map → registry-VWFL2E45.js.map} +0 -0
- /package/dist/{ripgrep-S37P6LBE.js.map → ripgrep-TYXUNA37.js.map} +0 -0
- /package/dist/{skillMarketplace-KUSRKZUY.js.map → skillMarketplace-GMDZPBPT.js.map} +0 -0
- /package/dist/{state-BPJBUEMP.js.map → state-DZAFEODP.js.map} +0 -0
- /package/dist/{theme-PHX4BKDY.js.map → theme-LB2G2R3D.js.map} +0 -0
- /package/dist/{toolPermissionSettings-HJFZDYFO.js.map → toolPermissionSettings-XR4I6DAX.js.map} +0 -0
- /package/dist/{tools-ERFLE7MQ.js.map → tools-JTIN6KWF.js.map} +0 -0
- /package/dist/{userInput-CJWBEKXW.js.map → userInput-TLJ56H7H.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-
|
|
6
|
+
} from "./chunk-RQ36RHKE.js";
|
|
7
7
|
import {
|
|
8
8
|
loadPybAgentSessionMessages
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-5BGDWXLH.js";
|
|
10
10
|
import {
|
|
11
11
|
listPybAgentSessions
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-ERKC3UO6.js";
|
|
13
13
|
import {
|
|
14
14
|
appendSessionCustomTitleRecord,
|
|
15
15
|
appendSessionJsonlFromMessage,
|
|
16
16
|
appendSessionTagRecord
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-CBTQYVYS.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-
|
|
29
|
+
} from "./chunk-ZCLKXEG7.js";
|
|
30
30
|
import {
|
|
31
31
|
DEFAULT_OUTPUT_STYLE,
|
|
32
32
|
getAvailableOutputStyles,
|
|
@@ -35,16 +35,16 @@ import {
|
|
|
35
35
|
getOutputStyleSystemPromptAdditions,
|
|
36
36
|
resolveOutputStyleName,
|
|
37
37
|
setCurrentOutputStyle
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-5KRDMLJL.js";
|
|
39
39
|
import {
|
|
40
40
|
fetchCustomModels,
|
|
41
41
|
getModelFeatures
|
|
42
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-PZ3OA5BR.js";
|
|
43
43
|
import {
|
|
44
44
|
queryLLM,
|
|
45
45
|
queryQuick,
|
|
46
46
|
verifyApiKey
|
|
47
|
-
} from "./chunk-
|
|
47
|
+
} from "./chunk-ABLSL3AG.js";
|
|
48
48
|
import {
|
|
49
49
|
DEFAULT_TIMEOUT_MS,
|
|
50
50
|
FallbackToolUseRejectedMessage,
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
listMCPServers,
|
|
59
59
|
loadMergedSettings,
|
|
60
60
|
normalizeSandboxRuntimeConfigFromSettings
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-FMK7MTHV.js";
|
|
62
62
|
import {
|
|
63
63
|
addMarketplace,
|
|
64
64
|
disableSkillPlugin,
|
|
@@ -71,11 +71,11 @@ import {
|
|
|
71
71
|
refreshMarketplaceAsync,
|
|
72
72
|
removeMarketplace,
|
|
73
73
|
uninstallSkillPlugin
|
|
74
|
-
} from "./chunk-
|
|
74
|
+
} from "./chunk-6H74XS5Q.js";
|
|
75
75
|
import {
|
|
76
76
|
loadToolPermissionContextFromDisk,
|
|
77
77
|
persistToolPermissionUpdateToDisk
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-EUMJ67M4.js";
|
|
79
79
|
import {
|
|
80
80
|
applyToolPermissionContextUpdate,
|
|
81
81
|
createDefaultToolPermissionContext
|
|
@@ -88,7 +88,7 @@ import {
|
|
|
88
88
|
resetReminderSession,
|
|
89
89
|
setTodos,
|
|
90
90
|
systemReminderService
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-WDZX6SSG.js";
|
|
92
92
|
import {
|
|
93
93
|
getSessionState
|
|
94
94
|
} from "./chunk-ERMQRV55.js";
|
|
@@ -97,7 +97,7 @@ import {
|
|
|
97
97
|
getActiveAgents,
|
|
98
98
|
getAgentByType,
|
|
99
99
|
getAllAgents
|
|
100
|
-
} from "./chunk-
|
|
100
|
+
} from "./chunk-44LR7MWS.js";
|
|
101
101
|
import {
|
|
102
102
|
API_ERROR_MESSAGE_PREFIX,
|
|
103
103
|
CANCEL_MESSAGE,
|
|
@@ -127,7 +127,7 @@ import {
|
|
|
127
127
|
processUserInput,
|
|
128
128
|
reorderMessages,
|
|
129
129
|
stripSystemMessages
|
|
130
|
-
} from "./chunk-
|
|
130
|
+
} from "./chunk-ZPC5H6IJ.js";
|
|
131
131
|
import {
|
|
132
132
|
getRequestStatus,
|
|
133
133
|
setRequestStatus,
|
|
@@ -150,10 +150,10 @@ import {
|
|
|
150
150
|
normalizeFilePath,
|
|
151
151
|
readTextContent,
|
|
152
152
|
writeTextContent
|
|
153
|
-
} from "./chunk-
|
|
153
|
+
} from "./chunk-5ABIX6FW.js";
|
|
154
154
|
import {
|
|
155
155
|
ripGrep
|
|
156
|
-
} from "./chunk-
|
|
156
|
+
} from "./chunk-3EWYCNNT.js";
|
|
157
157
|
import {
|
|
158
158
|
parseBlockEdits
|
|
159
159
|
} from "./chunk-QWIBSCDN.js";
|
|
@@ -163,17 +163,17 @@ import {
|
|
|
163
163
|
ParserRegistry,
|
|
164
164
|
initParser,
|
|
165
165
|
loadLanguage
|
|
166
|
-
} from "./chunk-
|
|
166
|
+
} from "./chunk-YDROMLPD.js";
|
|
167
167
|
import {
|
|
168
168
|
getSettingsFileCandidates,
|
|
169
169
|
loadSettingsWithLegacyFallback
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-IITK54RR.js";
|
|
171
171
|
import {
|
|
172
172
|
getCustomCommandDirectories,
|
|
173
173
|
hasCustomCommands,
|
|
174
174
|
loadCustomCommands,
|
|
175
175
|
reloadCustomCommands
|
|
176
|
-
} from "./chunk-
|
|
176
|
+
} from "./chunk-F3T5A5NU.js";
|
|
177
177
|
import {
|
|
178
178
|
getSessionPlugins
|
|
179
179
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -181,17 +181,18 @@ import {
|
|
|
181
181
|
ModelManager,
|
|
182
182
|
getModelManager,
|
|
183
183
|
isDefaultSlowAndCapableModel
|
|
184
|
-
} from "./chunk-
|
|
184
|
+
} from "./chunk-4XVE3R25.js";
|
|
185
185
|
import {
|
|
186
|
+
clearContextCache,
|
|
186
187
|
getCodeStyle,
|
|
187
188
|
getContext,
|
|
188
189
|
getGitState,
|
|
189
190
|
getIsGit,
|
|
190
191
|
getProjectDocs
|
|
191
|
-
} from "./chunk-
|
|
192
|
+
} from "./chunk-LO35EMX6.js";
|
|
192
193
|
import {
|
|
193
194
|
getTheme
|
|
194
|
-
} from "./chunk-
|
|
195
|
+
} from "./chunk-XNLDOVUX.js";
|
|
195
196
|
import {
|
|
196
197
|
DEFAULT_GLOBAL_CONFIG,
|
|
197
198
|
enableConfigs,
|
|
@@ -204,7 +205,7 @@ import {
|
|
|
204
205
|
saveGlobalConfig,
|
|
205
206
|
setAllPointersToModel,
|
|
206
207
|
setModelPointer
|
|
207
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-YOF7G7XX.js";
|
|
208
209
|
import {
|
|
209
210
|
AbortError
|
|
210
211
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -213,7 +214,7 @@ import {
|
|
|
213
214
|
getCurrentRequest,
|
|
214
215
|
logUserFriendly,
|
|
215
216
|
markPhase
|
|
216
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-FILUPMEY.js";
|
|
217
218
|
import {
|
|
218
219
|
ASCII_LOGO,
|
|
219
220
|
BunShell,
|
|
@@ -252,10 +253,10 @@ import {
|
|
|
252
253
|
setCwd,
|
|
253
254
|
shouldApplyToolOutputTruncation,
|
|
254
255
|
truncateToolOutput
|
|
255
|
-
} from "./chunk-
|
|
256
|
+
} from "./chunk-NIPMKTRR.js";
|
|
256
257
|
import {
|
|
257
258
|
MACRO
|
|
258
|
-
} from "./chunk-
|
|
259
|
+
} from "./chunk-JXFYURRO.js";
|
|
259
260
|
import {
|
|
260
261
|
formatTotalCost,
|
|
261
262
|
getTotalAPIDuration,
|
|
@@ -443,7 +444,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
443
444
|
var getCommandPrefix = memoize(
|
|
444
445
|
async (command4, abortSignal) => {
|
|
445
446
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
446
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
447
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-MQWL2SSO.js");
|
|
447
448
|
const response = await queryQuick2({
|
|
448
449
|
systemPrompt,
|
|
449
450
|
userPrompt,
|
|
@@ -4245,7 +4246,7 @@ function formatParseError(error) {
|
|
|
4245
4246
|
return error instanceof Error ? error.message : String(error);
|
|
4246
4247
|
}
|
|
4247
4248
|
async function defaultGateQuery(args) {
|
|
4248
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4249
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-MQWL2SSO.js");
|
|
4249
4250
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4250
4251
|
const messages = [
|
|
4251
4252
|
{
|
|
@@ -4625,6 +4626,7 @@ function getCommandSource(context) {
|
|
|
4625
4626
|
import { Box as Box5, Text as Text5 } from "ink";
|
|
4626
4627
|
import React5 from "react";
|
|
4627
4628
|
import { z } from "zod";
|
|
4629
|
+
import { parse as parse4 } from "node-html-parser";
|
|
4628
4630
|
|
|
4629
4631
|
// src/ui/components/Cost.tsx
|
|
4630
4632
|
import * as React4 from "react";
|
|
@@ -4640,18 +4642,20 @@ function Cost({ costUSD, durationMs, debug: debug2 }) {
|
|
|
4640
4642
|
// src/tools/network/WebFetchTool/prompt.ts
|
|
4641
4643
|
var TOOL_NAME_FOR_PROMPT = "WebFetch";
|
|
4642
4644
|
var PROMPT = `
|
|
4643
|
-
- Fetches content from a specified URL
|
|
4644
|
-
- Takes a URL and
|
|
4645
|
-
- Fetches the URL content, converts HTML to
|
|
4646
|
-
- Processes the content with the prompt using a small, fast model
|
|
4647
|
-
- Returns the model's response
|
|
4648
|
-
- Use this tool when you need to retrieve
|
|
4645
|
+
- Fetches content from a specified URL
|
|
4646
|
+
- Takes a URL and optional prompt/format as input
|
|
4647
|
+
- Fetches the URL content, converts HTML to the requested format
|
|
4648
|
+
- Processes the content with the prompt using a small, fast model when provided
|
|
4649
|
+
- Returns either the model's response or the formatted content
|
|
4650
|
+
- Use this tool when you need to retrieve or analyze web content
|
|
4649
4651
|
|
|
4650
4652
|
Usage notes:
|
|
4651
4653
|
- IMPORTANT: If an MCP-provided web fetch tool is available, prefer using that tool instead of this one, as it may have fewer restrictions.
|
|
4652
4654
|
- The URL must be a fully-formed valid URL
|
|
4653
4655
|
- HTTP URLs will be automatically upgraded to HTTPS
|
|
4654
4656
|
- The prompt should describe what information you want to extract from the page
|
|
4657
|
+
- Format options: "markdown" (default), "text", or "html"
|
|
4658
|
+
- Timeout is optional and defaults to 30 seconds
|
|
4655
4659
|
- This tool is read-only and does not modify any files
|
|
4656
4660
|
- Results may be summarized if the content is very large
|
|
4657
4661
|
- Includes a self-cleaning 15-minute cache for faster responses when repeatedly accessing the same URL
|
|
@@ -4689,8 +4693,8 @@ turndownService.addRule("cleanLinks", {
|
|
|
4689
4693
|
});
|
|
4690
4694
|
function convertHtmlToMarkdown(html) {
|
|
4691
4695
|
try {
|
|
4692
|
-
const
|
|
4693
|
-
const markdown = turndownService.turndown(
|
|
4696
|
+
const cleanHtml2 = html.replace(/<script[^>]*>[\s\S]*?<\/script>/gi, "").replace(/<style[^>]*>[\s\S]*?<\/style>/gi, "").replace(/<!--[\s\S]*?-->/g, "").replace(/\s+/g, " ").trim();
|
|
4697
|
+
const markdown = turndownService.turndown(cleanHtml2);
|
|
4694
4698
|
return markdown.replace(/\n{3,}/g, "\n\n").replace(/^\s+|\s+$/gm, "").trim();
|
|
4695
4699
|
} catch (error) {
|
|
4696
4700
|
throw new Error(
|
|
@@ -4745,7 +4749,9 @@ var urlCache = new URLCache();
|
|
|
4745
4749
|
// src/tools/network/WebFetchTool/WebFetchTool.tsx
|
|
4746
4750
|
var inputSchema = z.strictObject({
|
|
4747
4751
|
url: z.string().url().describe("The URL to fetch content from"),
|
|
4748
|
-
prompt: z.string().describe("
|
|
4752
|
+
prompt: z.string().optional().describe("Optional prompt to run on the fetched content"),
|
|
4753
|
+
format: z.enum(["markdown", "html", "text"]).optional().describe("Output format (default: markdown)"),
|
|
4754
|
+
timeout: z.number().optional().describe("Timeout in seconds (default: 30)")
|
|
4749
4755
|
});
|
|
4750
4756
|
var FETCH_TIMEOUT_MS = 3e4;
|
|
4751
4757
|
var MAX_URL_LENGTH = 2e3;
|
|
@@ -4837,6 +4843,27 @@ function truncateFetchedContent(content) {
|
|
|
4837
4843
|
if (content.length <= MAX_CONTENT_CHARS) return content;
|
|
4838
4844
|
return `${content.substring(0, MAX_CONTENT_CHARS)}...[content truncated]`;
|
|
4839
4845
|
}
|
|
4846
|
+
function cleanHtml(html) {
|
|
4847
|
+
const root = parse4(html);
|
|
4848
|
+
const elementsToRemove = root.querySelectorAll(
|
|
4849
|
+
"script, style, nav, footer, iframe, noscript, object, embed"
|
|
4850
|
+
);
|
|
4851
|
+
elementsToRemove.forEach((el) => el.remove());
|
|
4852
|
+
return root.toString();
|
|
4853
|
+
}
|
|
4854
|
+
function convertHtmlToText(html) {
|
|
4855
|
+
const cleaned = cleanHtml(html);
|
|
4856
|
+
const root = parse4(cleaned);
|
|
4857
|
+
return root.textContent.trim();
|
|
4858
|
+
}
|
|
4859
|
+
function applyFormat(rawContent, contentType, format3) {
|
|
4860
|
+
if (!contentType.toLowerCase().includes("text/html")) {
|
|
4861
|
+
return rawContent;
|
|
4862
|
+
}
|
|
4863
|
+
if (format3 === "html") return cleanHtml(rawContent);
|
|
4864
|
+
if (format3 === "text") return convertHtmlToText(rawContent);
|
|
4865
|
+
return convertHtmlToMarkdown(rawContent);
|
|
4866
|
+
}
|
|
4840
4867
|
function isMarkdownHost(url2, contentType) {
|
|
4841
4868
|
const lowerContentType = contentType.toLowerCase();
|
|
4842
4869
|
if (lowerContentType.includes("text/markdown")) return true;
|
|
@@ -4947,9 +4974,15 @@ var WebFetchTool = {
|
|
|
4947
4974
|
}
|
|
4948
4975
|
return { result: true };
|
|
4949
4976
|
},
|
|
4950
|
-
renderToolUseMessage({ url: url2, prompt }, { verbose }) {
|
|
4977
|
+
renderToolUseMessage({ url: url2, prompt, format: format3, timeout }, { verbose }) {
|
|
4951
4978
|
if (verbose) {
|
|
4952
|
-
|
|
4979
|
+
const details = [
|
|
4980
|
+
`url: "${url2}"`,
|
|
4981
|
+
prompt ? `prompt: "${prompt}"` : null,
|
|
4982
|
+
format3 ? `format: "${format3}"` : null,
|
|
4983
|
+
timeout ? `timeout: ${timeout}s` : null
|
|
4984
|
+
].filter(Boolean);
|
|
4985
|
+
return details.join(", ");
|
|
4953
4986
|
}
|
|
4954
4987
|
return url2;
|
|
4955
4988
|
},
|
|
@@ -4960,14 +4993,19 @@ var WebFetchTool = {
|
|
|
4960
4993
|
return /* @__PURE__ */ React5.createElement(Box5, { justifyContent: "space-between", width: "100%" }, /* @__PURE__ */ React5.createElement(Box5, { flexDirection: "row" }, /* @__PURE__ */ React5.createElement(Text5, null, "\xA0\xA0\u23BF \xA0Received "), /* @__PURE__ */ React5.createElement(Text5, { bold: true }, formatBytes(output.bytes), " "), /* @__PURE__ */ React5.createElement(Text5, null, "(", output.code, " ", output.codeText, ")")), /* @__PURE__ */ React5.createElement(Cost, { costUSD: 0, durationMs: output.durationMs, debug: false }));
|
|
4961
4994
|
},
|
|
4962
4995
|
renderResultForAssistant(output) {
|
|
4996
|
+
if (output.mode === "fetch") {
|
|
4997
|
+
return `Content from ${output.url} (Format: ${output.format}):
|
|
4998
|
+
|
|
4999
|
+
${output.result}`;
|
|
5000
|
+
}
|
|
4963
5001
|
return output.result;
|
|
4964
5002
|
},
|
|
4965
|
-
async *call({ url: url2, prompt }, context) {
|
|
5003
|
+
async *call({ url: url2, prompt, format: format3, timeout }, context) {
|
|
4966
5004
|
const normalizedUrl = normalizeUrl(url2);
|
|
4967
5005
|
const start = Date.now();
|
|
4968
5006
|
const timeoutSignal = createTimeoutSignal(
|
|
4969
5007
|
context.abortController.signal,
|
|
4970
|
-
FETCH_TIMEOUT_MS
|
|
5008
|
+
Math.max(1, Number.isFinite(timeout) ? Number(timeout) : 30) * 1e3 || FETCH_TIMEOUT_MS
|
|
4971
5009
|
);
|
|
4972
5010
|
try {
|
|
4973
5011
|
const cached = urlCache.get(normalizedUrl);
|
|
@@ -4989,7 +5027,10 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
4989
5027
|
codeText: codeText2,
|
|
4990
5028
|
result: result2,
|
|
4991
5029
|
durationMs: Date.now() - start,
|
|
4992
|
-
url: normalizedUrl
|
|
5030
|
+
url: normalizedUrl,
|
|
5031
|
+
mode: "analysis",
|
|
5032
|
+
format: "markdown",
|
|
5033
|
+
cached: Boolean(cached)
|
|
4993
5034
|
};
|
|
4994
5035
|
yield {
|
|
4995
5036
|
type: "result",
|
|
@@ -5001,7 +5042,7 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
5001
5042
|
let bytes = cached ? cached.bytes : 0;
|
|
5002
5043
|
let code = cached ? cached.code : 200;
|
|
5003
5044
|
let codeText = cached ? cached.codeText : "OK";
|
|
5004
|
-
let
|
|
5045
|
+
let rawContent = cached ? cached.rawContent : "";
|
|
5005
5046
|
let contentType = cached ? cached.contentType : "";
|
|
5006
5047
|
if (fetched && fetched.type === "response") {
|
|
5007
5048
|
const response = fetched.response;
|
|
@@ -5010,36 +5051,47 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
5010
5051
|
contentType = response.headers.get("content-type") || "";
|
|
5011
5052
|
const { text: raw, bytes: responseBytes } = await readResponseTextLimited(response, MAX_RESPONSE_BYTES);
|
|
5012
5053
|
bytes = responseBytes;
|
|
5013
|
-
|
|
5014
|
-
markdown = truncateFetchedContent(converted);
|
|
5054
|
+
rawContent = raw;
|
|
5015
5055
|
urlCache.set(normalizedUrl, {
|
|
5016
5056
|
bytes,
|
|
5017
5057
|
code,
|
|
5018
5058
|
codeText,
|
|
5019
|
-
|
|
5059
|
+
rawContent,
|
|
5020
5060
|
contentType
|
|
5021
5061
|
});
|
|
5022
5062
|
}
|
|
5023
|
-
const
|
|
5024
|
-
const
|
|
5025
|
-
|
|
5026
|
-
prompt,
|
|
5027
|
-
allowBroaderQuoting
|
|
5063
|
+
const outputFormat = format3 ?? "markdown";
|
|
5064
|
+
const formatted = truncateFetchedContent(
|
|
5065
|
+
applyFormat(rawContent, contentType, outputFormat)
|
|
5028
5066
|
);
|
|
5029
|
-
|
|
5030
|
-
|
|
5031
|
-
|
|
5032
|
-
|
|
5033
|
-
|
|
5034
|
-
|
|
5035
|
-
|
|
5067
|
+
let result = formatted;
|
|
5068
|
+
let mode = "fetch";
|
|
5069
|
+
if (prompt && prompt.trim()) {
|
|
5070
|
+
const allowBroaderQuoting = isMarkdownHost(normalizedUrl, contentType);
|
|
5071
|
+
const userPrompt = buildWebFetchApplyPrompt(
|
|
5072
|
+
formatted,
|
|
5073
|
+
prompt,
|
|
5074
|
+
allowBroaderQuoting
|
|
5075
|
+
);
|
|
5076
|
+
const aiResponse = await queryQuick({
|
|
5077
|
+
systemPrompt: [],
|
|
5078
|
+
userPrompt,
|
|
5079
|
+
enablePromptCaching: false,
|
|
5080
|
+
signal: timeoutSignal.signal
|
|
5081
|
+
});
|
|
5082
|
+
result = aiResponse.message.content[0]?.text || "No response from model";
|
|
5083
|
+
mode = "analysis";
|
|
5084
|
+
}
|
|
5036
5085
|
const output = {
|
|
5037
5086
|
bytes,
|
|
5038
5087
|
code,
|
|
5039
5088
|
codeText,
|
|
5040
5089
|
result,
|
|
5041
5090
|
durationMs: Date.now() - start,
|
|
5042
|
-
url: normalizedUrl
|
|
5091
|
+
url: normalizedUrl,
|
|
5092
|
+
mode,
|
|
5093
|
+
format: outputFormat,
|
|
5094
|
+
cached: Boolean(cached)
|
|
5043
5095
|
};
|
|
5044
5096
|
yield {
|
|
5045
5097
|
type: "result",
|
|
@@ -5054,7 +5106,10 @@ To complete your request, I need to fetch content from the redirected URL. Pleas
|
|
|
5054
5106
|
codeText: "",
|
|
5055
5107
|
result: `Error processing URL ${normalizedUrl}: ${message}`,
|
|
5056
5108
|
durationMs: Date.now() - start,
|
|
5057
|
-
url: normalizedUrl
|
|
5109
|
+
url: normalizedUrl,
|
|
5110
|
+
mode: "analysis",
|
|
5111
|
+
format: "markdown",
|
|
5112
|
+
cached: false
|
|
5058
5113
|
};
|
|
5059
5114
|
yield {
|
|
5060
5115
|
type: "result",
|
|
@@ -6300,7 +6355,7 @@ Usage:
|
|
|
6300
6355
|
\`\`\`
|
|
6301
6356
|
3. **Multiple Edits**: You can provide multiple blocks in a single turn to perform batch edits.
|
|
6302
6357
|
4. **Context**: Include enough surrounding lines in the SEARCH block to ensure uniqueness.
|
|
6303
|
-
5. **Indentation**: Preserve the exact indentation (tabs/spaces) of the original file in your SEARCH block.
|
|
6358
|
+
5. **Indentation**: Preserve the exact indentation (tabs/spaces) of the original file in your SEARCH block. When copying lines from Read output, only copy the text after the line-number prefix. The prefix format is: spaces + line number + tab.
|
|
6304
6359
|
6. **Smart Matching**: The tool uses a fuzzy matching engine and LSP anchoring. It can locate code even if there are minor differences in whitespace or indentation.
|
|
6305
6360
|
7. **Verification (Recommended)**: Set \`verify: true\` to enable atomic verification. The tool will check for syntax errors after editing and automatically ROLLBACK if errors are detected. Use this for complex edits or when ensuring stability.
|
|
6306
6361
|
8. **Thinking**: You can include "thinking" text between blocks; the tool will ignore it.
|
|
@@ -6505,7 +6560,7 @@ var FileEditTool = {
|
|
|
6505
6560
|
const originalFileContent = currentFileContent;
|
|
6506
6561
|
let totalPatch = [];
|
|
6507
6562
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6508
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6563
|
+
const { findLspAnchor } = await import("./lspAnchor-ROYOONP6.js");
|
|
6509
6564
|
for (const op of editOperations) {
|
|
6510
6565
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6511
6566
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -7765,12 +7820,12 @@ ${addLineNumbers({
|
|
|
7765
7820
|
}
|
|
7766
7821
|
};
|
|
7767
7822
|
|
|
7768
|
-
// src/tools/
|
|
7823
|
+
// src/tools/search/GlobTool/GlobTool.tsx
|
|
7769
7824
|
import { Box as Box14, Text as Text15 } from "ink";
|
|
7770
7825
|
import React15 from "react";
|
|
7771
7826
|
import { z as z6 } from "zod";
|
|
7772
7827
|
|
|
7773
|
-
// src/tools/
|
|
7828
|
+
// src/tools/search/GlobTool/prompt.ts
|
|
7774
7829
|
var TOOL_NAME_FOR_PROMPT2 = "Glob";
|
|
7775
7830
|
var DESCRIPTION4 = `- Fast file pattern matching tool that works with any codebase size
|
|
7776
7831
|
- Supports glob patterns like "**/*.js" or "src/**/*.ts"
|
|
@@ -7788,7 +7843,7 @@ var DESCRIPTION4 = `- Fast file pattern matching tool that works with any codeba
|
|
|
7788
7843
|
- You can call multiple tools in a single response. It is always better to speculatively perform multiple searches in parallel if they are potentially useful.
|
|
7789
7844
|
`;
|
|
7790
7845
|
|
|
7791
|
-
// src/tools/
|
|
7846
|
+
// src/tools/search/GlobTool/GlobTool.tsx
|
|
7792
7847
|
import { existsSync as existsSync5, statSync as statSync8 } from "fs";
|
|
7793
7848
|
import { isAbsolute as isAbsolute6, join as join4, relative as relative8, resolve as resolve6 } from "path";
|
|
7794
7849
|
import { fileURLToPath } from "url";
|
|
@@ -8453,7 +8508,7 @@ IMPORTANT - Use the correct year in search queries:
|
|
|
8453
8508
|
`.trim();
|
|
8454
8509
|
|
|
8455
8510
|
// src/tools/network/WebSearchTool/searchProviders.ts
|
|
8456
|
-
import { parse as
|
|
8511
|
+
import { parse as parse5 } from "node-html-parser";
|
|
8457
8512
|
var duckDuckGoSearchProvider = {
|
|
8458
8513
|
isEnabled: () => true,
|
|
8459
8514
|
search: async (query2) => {
|
|
@@ -8471,7 +8526,7 @@ var duckDuckGoSearchProvider = {
|
|
|
8471
8526
|
);
|
|
8472
8527
|
}
|
|
8473
8528
|
const html = await response.text();
|
|
8474
|
-
const root =
|
|
8529
|
+
const root = parse5(html);
|
|
8475
8530
|
const results = [];
|
|
8476
8531
|
const resultNodes = root.querySelectorAll(".result.web-result");
|
|
8477
8532
|
for (const node of resultNodes) {
|
|
@@ -9764,7 +9819,7 @@ async function clearConversation(context) {
|
|
|
9764
9819
|
await clearTerminal();
|
|
9765
9820
|
getMessagesSetter()([]);
|
|
9766
9821
|
context.setForkConvoWithMessagesOnTheNextRender([]);
|
|
9767
|
-
|
|
9822
|
+
clearContextCache();
|
|
9768
9823
|
getCodeStyle.cache.clear?.();
|
|
9769
9824
|
await setCwd(getOriginalCwd());
|
|
9770
9825
|
resetReminderSession();
|
|
@@ -9865,7 +9920,7 @@ var compact = {
|
|
|
9865
9920
|
),
|
|
9866
9921
|
summaryResponse
|
|
9867
9922
|
]);
|
|
9868
|
-
|
|
9923
|
+
clearContextCache();
|
|
9869
9924
|
getCodeStyle.cache.clear?.();
|
|
9870
9925
|
resetFileFreshnessSession();
|
|
9871
9926
|
resetReminderSession();
|
|
@@ -11044,7 +11099,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
11044
11099
|
}
|
|
11045
11100
|
saveGlobalConfig(config2);
|
|
11046
11101
|
try {
|
|
11047
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
11102
|
+
const { resetAnthropicClient } = await import("./llm-MQWL2SSO.js");
|
|
11048
11103
|
resetAnthropicClient();
|
|
11049
11104
|
} catch {
|
|
11050
11105
|
}
|
|
@@ -15280,10 +15335,10 @@ var mcp = {
|
|
|
15280
15335
|
var mcp_default = mcp;
|
|
15281
15336
|
|
|
15282
15337
|
// src/commands/plugin.ts
|
|
15283
|
-
import { parse as
|
|
15338
|
+
import { parse as parse7 } from "shell-quote";
|
|
15284
15339
|
var PLUGIN_SCOPES = ["user", "project", "local"];
|
|
15285
15340
|
function parseTokens(input) {
|
|
15286
|
-
const parts =
|
|
15341
|
+
const parts = parse7(input);
|
|
15287
15342
|
const out = [];
|
|
15288
15343
|
for (const part of parts) {
|
|
15289
15344
|
if (typeof part === "string") out.push(part);
|
|
@@ -15326,7 +15381,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
15326
15381
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
15327
15382
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
15328
15383
|
if (dirs.length === 0) return [];
|
|
15329
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
15384
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-MVYLH6Q3.js");
|
|
15330
15385
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
15331
15386
|
return errors;
|
|
15332
15387
|
}
|
|
@@ -15995,7 +16050,7 @@ async function call(onDone, context) {
|
|
|
15995
16050
|
ModelConfig,
|
|
15996
16051
|
{
|
|
15997
16052
|
onClose: () => {
|
|
15998
|
-
import("./model-
|
|
16053
|
+
import("./model-BY6Q3JR2.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
15999
16054
|
reloadModelManager2();
|
|
16000
16055
|
triggerModelConfigChange();
|
|
16001
16056
|
onDone();
|
|
@@ -23439,7 +23494,7 @@ function useStatusLine() {
|
|
|
23439
23494
|
// src/ui/components/PromptInput.tsx
|
|
23440
23495
|
async function interpretHashCommand(input) {
|
|
23441
23496
|
try {
|
|
23442
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
23497
|
+
const { queryQuick: queryQuick2 } = await import("./llm-MQWL2SSO.js");
|
|
23443
23498
|
const systemPrompt = [
|
|
23444
23499
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
23445
23500
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -23752,7 +23807,7 @@ function PromptInput({
|
|
|
23752
23807
|
if (messages2.length) {
|
|
23753
23808
|
if (mode === "bash") {
|
|
23754
23809
|
onQuery(messages2, newAbortController).then(async () => {
|
|
23755
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
23810
|
+
const { getCwd: getCwd2 } = await import("./state-DZAFEODP.js");
|
|
23756
23811
|
setCurrentPwd(getCwd2());
|
|
23757
23812
|
});
|
|
23758
23813
|
} else {
|
|
@@ -24608,7 +24663,7 @@ ${contentWithLines}
|
|
|
24608
24663
|
}
|
|
24609
24664
|
}
|
|
24610
24665
|
getMessagesSetter()([]);
|
|
24611
|
-
|
|
24666
|
+
clearContextCache();
|
|
24612
24667
|
getCodeStyle.cache.clear?.();
|
|
24613
24668
|
resetFileFreshnessSession();
|
|
24614
24669
|
return compactedMessages;
|
|
@@ -24652,6 +24707,33 @@ function createAutoBatchToolUse(toolUses, batchIndex) {
|
|
|
24652
24707
|
}
|
|
24653
24708
|
};
|
|
24654
24709
|
}
|
|
24710
|
+
function isAutoBatchToolUse(toolUse) {
|
|
24711
|
+
const resolvedName = resolveToolNameAlias(toolUse.name).resolvedName;
|
|
24712
|
+
return isBatchToolName(resolvedName) && typeof toolUse.id === "string" && toolUse.id.startsWith("batch_auto_");
|
|
24713
|
+
}
|
|
24714
|
+
function getAutoBatchAggregationSummary(toolUseMessages, tools, output, enabled) {
|
|
24715
|
+
const inputCount = toolUseMessages.length;
|
|
24716
|
+
const eligibleCount = toolUseMessages.reduce(
|
|
24717
|
+
(count, toolUse) => count + (canAutoBatchToolUse(toolUse, tools) ? 1 : 0),
|
|
24718
|
+
0
|
|
24719
|
+
);
|
|
24720
|
+
const ineligibleCount = inputCount - eligibleCount;
|
|
24721
|
+
const autoBatchToolUses = output.filter(isAutoBatchToolUse);
|
|
24722
|
+
const autoBatchedToolCount = autoBatchToolUses.reduce((sum, toolUse) => {
|
|
24723
|
+
const input = toolUse.input;
|
|
24724
|
+
const toolCalls = Array.isArray(input?.tool_calls) ? input.tool_calls : [];
|
|
24725
|
+
return sum + toolCalls.length;
|
|
24726
|
+
}, 0);
|
|
24727
|
+
return {
|
|
24728
|
+
enabled,
|
|
24729
|
+
inputCount,
|
|
24730
|
+
eligibleCount,
|
|
24731
|
+
ineligibleCount,
|
|
24732
|
+
outputCount: output.length,
|
|
24733
|
+
autoBatchCount: autoBatchToolUses.length,
|
|
24734
|
+
autoBatchedToolCount
|
|
24735
|
+
};
|
|
24736
|
+
}
|
|
24655
24737
|
function canAutoBatchToolUse(toolUse, tools) {
|
|
24656
24738
|
const resolvedName = resolveToolNameAlias(toolUse.name).resolvedName;
|
|
24657
24739
|
if (isBatchToolName(resolvedName) || isMcpToolName(resolvedName) || isMarketplaceToolName(resolvedName) || isSkillToolName(resolvedName)) {
|
|
@@ -24704,6 +24786,66 @@ function autoBatchToolUseBlocks(toolUseMessages, tools) {
|
|
|
24704
24786
|
return output;
|
|
24705
24787
|
}
|
|
24706
24788
|
var __autoBatchToolUseBlocksForTests = autoBatchToolUseBlocks;
|
|
24789
|
+
function shouldAutoBatchAggregation() {
|
|
24790
|
+
const config2 = getCurrentProjectConfig();
|
|
24791
|
+
const enabled = config2.experimental?.auto_batch_aggregation;
|
|
24792
|
+
return enabled !== false;
|
|
24793
|
+
}
|
|
24794
|
+
function applyAutoBatchAggregation(toolUseMessages, tools, options) {
|
|
24795
|
+
const enabled = shouldAutoBatchAggregation();
|
|
24796
|
+
const requestId = getCurrentRequest()?.id;
|
|
24797
|
+
if (!enabled) {
|
|
24798
|
+
const summary = getAutoBatchAggregationSummary(
|
|
24799
|
+
toolUseMessages,
|
|
24800
|
+
tools,
|
|
24801
|
+
toolUseMessages,
|
|
24802
|
+
false
|
|
24803
|
+
);
|
|
24804
|
+
debug.flow(
|
|
24805
|
+
"AUTO_BATCH_AGGREGATION",
|
|
24806
|
+
{
|
|
24807
|
+
...summary,
|
|
24808
|
+
reason: "disabled"
|
|
24809
|
+
},
|
|
24810
|
+
requestId
|
|
24811
|
+
);
|
|
24812
|
+
return toolUseMessages;
|
|
24813
|
+
}
|
|
24814
|
+
try {
|
|
24815
|
+
if (options?.forceThrow) {
|
|
24816
|
+
throw new Error("forced auto batch failure");
|
|
24817
|
+
}
|
|
24818
|
+
const aggregated = autoBatchToolUseBlocks(toolUseMessages, tools);
|
|
24819
|
+
const summary = getAutoBatchAggregationSummary(
|
|
24820
|
+
toolUseMessages,
|
|
24821
|
+
tools,
|
|
24822
|
+
aggregated,
|
|
24823
|
+
true
|
|
24824
|
+
);
|
|
24825
|
+
debug.flow("AUTO_BATCH_AGGREGATION", summary, requestId);
|
|
24826
|
+
return aggregated;
|
|
24827
|
+
} catch (error) {
|
|
24828
|
+
const summary = getAutoBatchAggregationSummary(
|
|
24829
|
+
toolUseMessages,
|
|
24830
|
+
tools,
|
|
24831
|
+
toolUseMessages,
|
|
24832
|
+
true
|
|
24833
|
+
);
|
|
24834
|
+
debug.flow(
|
|
24835
|
+
"AUTO_BATCH_AGGREGATION_FALLBACK",
|
|
24836
|
+
{
|
|
24837
|
+
...summary,
|
|
24838
|
+
error: error instanceof Error ? error.message : String(error)
|
|
24839
|
+
},
|
|
24840
|
+
requestId
|
|
24841
|
+
);
|
|
24842
|
+
if (!options?.forceThrow) {
|
|
24843
|
+
logError(error);
|
|
24844
|
+
}
|
|
24845
|
+
return toolUseMessages;
|
|
24846
|
+
}
|
|
24847
|
+
}
|
|
24848
|
+
var __applyAutoBatchAggregationForTests = applyAutoBatchAggregation;
|
|
24707
24849
|
function rewriteToolUseBlocksInAssistantMessage(assistantMessage, toolUseMessages) {
|
|
24708
24850
|
if (!Array.isArray(assistantMessage.message.content)) return assistantMessage;
|
|
24709
24851
|
let nextToolUseIndex = 0;
|
|
@@ -25130,7 +25272,7 @@ async function* queryCore(messages, systemPrompt, context, canUseTool, toolUseCo
|
|
|
25130
25272
|
const assistantMessage = result.message;
|
|
25131
25273
|
const shouldSkipPermissionCheck = result.shouldSkipPermissionCheck;
|
|
25132
25274
|
const rawToolUseMessages = assistantMessage.message.content.filter(isToolUseLikeBlock);
|
|
25133
|
-
const toolUseMessages =
|
|
25275
|
+
const toolUseMessages = applyAutoBatchAggregation(
|
|
25134
25276
|
rawToolUseMessages,
|
|
25135
25277
|
toolUseContext.options?.tools ?? []
|
|
25136
25278
|
);
|
|
@@ -26659,7 +26801,7 @@ import { homedir as homedir7 } from "os";
|
|
|
26659
26801
|
// src/commands/agents/generation.ts
|
|
26660
26802
|
import { randomUUID as randomUUID5 } from "crypto";
|
|
26661
26803
|
async function generateAgentWithClaude(prompt) {
|
|
26662
|
-
const { queryModel } = await import("./llm-
|
|
26804
|
+
const { queryModel } = await import("./llm-MQWL2SSO.js");
|
|
26663
26805
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
26664
26806
|
|
|
26665
26807
|
Return your response as a JSON object with exactly these fields:
|
|
@@ -30664,20 +30806,9 @@ It is critical that you mark todos as completed as soon as you are done with a t
|
|
|
30664
30806
|
6. **Semantic Search**: When searching for code concepts (e.g. "AuthLogic", "UserHandler") rather than exact filenames, prefer using \`Glob\` with \`semantic: true\`. This leverages LSP to find files by their content definitions.
|
|
30665
30807
|
7. **Reference Guard**: Be aware that deleting files might be blocked if they are referenced elsewhere. If the \`Delete\` blocks you, check the references it reports. Only use \`force: true\` if you are refactoring and intentionally removing those references.
|
|
30666
30808
|
|
|
30667
|
-
# \
|
|
30668
|
-
- \
|
|
30669
|
-
- \
|
|
30670
|
-
- MCP \u5DE5\u5177\u7684\u5E76\u53D1\u5B89\u5168\u6027\u7531 annotations.readOnlyHint \u5224\u5B9A
|
|
30671
|
-
- \u5B58\u5728\u4F9D\u8D56\u5173\u7CFB\u7684\u8C03\u7528\u5FC5\u987B\u4E32\u884C\uFF1B\u4EC5\u72EC\u7ACB\u3001\u65E0\u4F9D\u8D56\u7684\u8C03\u7528\u5E76\u53D1
|
|
30672
|
-
|
|
30673
|
-
# BatchTool \u4F7F\u7528\u7B56\u7565
|
|
30674
|
-
- \u4F55\u65F6\u4F7F\u7528\uFF1A\u591A\u4E2A\u4E92\u4E0D\u4F9D\u8D56\u3001\u53EA\u8BFB\u4E14\u5E76\u53D1\u5B89\u5168\u7684\u5DE5\u5177\u8C03\u7528\uFF0C\u5E0C\u671B\u5E76\u884C\u52A0\u901F\u5E76\u6C47\u603B\u7ED3\u679C
|
|
30675
|
-
- \u4F55\u65F6\u4E0D\u4F7F\u7528\uFF1A\u5B58\u5728\u4F9D\u8D56\u6216\u5171\u4EAB\u72B6\u6001\u3001\u9700\u8981\u987A\u5E8F\u3001\u6216\u5DE5\u5177\u975E\u53EA\u8BFB/\u975E\u5E76\u53D1\u5B89\u5168
|
|
30676
|
-
- \u62C6\u5206\u89C4\u5219\uFF1A\u6709\u4F9D\u8D56\u7684\u8C03\u7528\u62C6\u6210\u987A\u5E8F batch\uFF08\u524D\u4E00\u6279\u5B8C\u6210\u540E\u518D\u53D1\u4E0B\u4E00\u6279\uFF09
|
|
30677
|
-
- \u8303\u56F4\u9650\u5236\uFF1A\u4EC5\u9650\u53EA\u8BFB\u5E76\u53D1\u5B89\u5168\u5DE5\u5177\uFF1BMCP/\u5E02\u573A\u5DE5\u5177\u4E0D\u53EF\u8FDB\u5165 batch
|
|
30678
|
-
- \u9650\u5236\uFF1A\u6700\u591A 10 \u4E2A\uFF0C\u7981\u6B62 batch \u5D4C\u5957
|
|
30679
|
-
- \u4F18\u5148\u7EA7\uFF1A\u5B58\u5728\u591A\u4E2A\u53EF batch \u7684\u8C03\u7528\u65F6\uFF0C\u4F18\u5148\u4F7F\u7528 BatchTool \u5355\u6B21\u6267\u884C\u800C\u4E0D\u662F\u591A\u6761\u5E76\u884C tool \u8C03\u7528
|
|
30680
|
-
- \u53EA\u8BFB\u5E76\u53D1\u4F18\u5148\u4F7F\u7528 BatchTool\uFF0C\u4E0D\u8981\u8F93\u51FA\u591A\u4E2A\u72EC\u7ACB\u7684 Read/Grep
|
|
30809
|
+
# \u8DEF\u5F84\u5206\u7247\u7B56\u7565
|
|
30810
|
+
- \u6839\u2192\u6838\u5FC3\u76EE\u5F55\u2192\u4E8C\u7EA7\u6A21\u5757
|
|
30811
|
+
- \u7ED3\u6784\u626B\u63CF\u6309\u4E0A\u8FF0\u987A\u5E8F\u5206\u7247\u6267\u884C
|
|
30681
30812
|
|
|
30682
30813
|
# LSP \u540E\u7F6E\u4E0E\u8303\u56F4\u9650\u5236
|
|
30683
30814
|
- \u4F18\u5148\u987A\u5E8F\uFF1A\u7ED3\u6784\u6811 -> \u70ED\u70B9\u5B9A\u4F4D -> Read -> LSP
|
|
@@ -30897,6 +31028,7 @@ export {
|
|
|
30897
31028
|
countTokens,
|
|
30898
31029
|
__isToolUseLikeBlockForTests,
|
|
30899
31030
|
__autoBatchToolUseBlocksForTests,
|
|
31031
|
+
__applyAutoBatchAggregationForTests,
|
|
30900
31032
|
__rewriteToolUseBlocksForTests,
|
|
30901
31033
|
__ToolUseQueueForTests,
|
|
30902
31034
|
query,
|