pybao-cli 1.5.45 → 1.5.47
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-45IVQWUI.js +53 -0
- package/dist/{acp-Y3YRP7PX.js → acp-KELESOXO.js} +30 -30
- package/dist/{agentsValidate-LYQDYON6.js → agentsValidate-J7PHU22S.js} +7 -7
- package/dist/{ask-BH7SPGEV.js → ask-ZICPHRGR.js} +30 -30
- package/dist/{autoUpdater-WQ7NSMS6.js → autoUpdater-6KGZQTW5.js} +3 -3
- package/dist/{chunk-F6A7OSLF.js → chunk-2AU4PKSQ.js} +3 -3
- package/dist/{chunk-2CFC3PYO.js → chunk-4VVWAA6O.js} +1 -1
- package/dist/{chunk-FGYA5FY5.js → chunk-57BVHCH3.js} +2 -2
- package/dist/{chunk-BGT7XDPE.js → chunk-5OBGGU2O.js} +3 -3
- package/dist/{chunk-T2V55G3O.js → chunk-5OJHTSFR.js} +3 -1
- package/dist/chunk-5OJHTSFR.js.map +7 -0
- package/dist/{chunk-6TJCSOV3.js → chunk-6JVCLWCU.js} +3 -3
- package/dist/{chunk-3V35SGQ7.js → chunk-7UF7PBUR.js} +1 -1
- package/dist/{chunk-BIRC5MFX.js → chunk-7WPBMV6W.js} +1 -1
- package/dist/{chunk-QYZADXNT.js → chunk-A5O2MBVW.js} +2 -2
- package/dist/{chunk-HFEWWAXY.js → chunk-CN443EB5.js} +1 -1
- package/dist/{chunk-ILSNA4QO.js → chunk-GHNPBDR6.js} +1 -1
- package/dist/{chunk-HPEY66LP.js → chunk-IAIXAB4N.js} +3 -3
- package/dist/{chunk-7XHORF4S.js → chunk-ITD4GQ6O.js} +1 -1
- package/dist/{chunk-SD2KLYSK.js → chunk-J3TM7T3W.js} +360 -44
- package/dist/chunk-J3TM7T3W.js.map +7 -0
- package/dist/{chunk-FZDJSTSK.js → chunk-K3AQYDRJ.js} +3 -3
- package/dist/{chunk-ZJJR2GKA.js → chunk-MWL7Q5HG.js} +1 -1
- package/dist/{chunk-7BDU4UKY.js → chunk-N2W52I56.js} +1 -1
- package/dist/{chunk-G57Q2LMI.js → chunk-OPEQBEHZ.js} +4 -4
- package/dist/{chunk-FDU3LJPV.js → chunk-OTMVCWZ2.js} +3 -3
- package/dist/{chunk-K4GZU7WR.js → chunk-Q2FTNJHH.js} +3 -3
- package/dist/{chunk-PZ3WTDXV.js → chunk-Q4WANADY.js} +2 -2
- package/dist/{chunk-SRWWGIOO.js → chunk-RRLBQ3XD.js} +2 -2
- package/dist/{chunk-FS2I7CEG.js → chunk-SD3VNTAR.js} +4 -4
- package/dist/{chunk-B4DLSHE7.js → chunk-T6S6TXIY.js} +3 -3
- package/dist/{chunk-FSHVF7L6.js → chunk-TLMCXAET.js} +1 -1
- package/dist/{chunk-LO7D5L6Q.js → chunk-US6EALFL.js} +2 -2
- package/dist/{chunk-RHUSN5MT.js → chunk-UUTMXSER.js} +1 -1
- package/dist/{chunk-VHDLVHEI.js → chunk-V6W537PO.js} +1 -1
- package/dist/{chunk-A3E3KOP5.js → chunk-VDLMXEHU.js} +638 -129
- package/dist/chunk-VDLMXEHU.js.map +7 -0
- package/dist/{chunk-LFTLSBFK.js → chunk-XIAHHC4E.js} +2 -2
- package/dist/{chunk-HPLKXHZG.js → chunk-ZLNJ6XFU.js} +4 -4
- package/dist/{cli-SPB5RXN4.js → cli-P7N4INGY.js} +90 -90
- package/dist/commands-BTSWDZVO.js +57 -0
- package/dist/{config-BMWR2IR4.js → config-XVX25KIN.js} +4 -4
- package/dist/{context-SNWJ6H3N.js → context-OBZ5CNGA.js} +6 -6
- package/dist/{conversationPersistence-L6KNQU6J.js → conversationPersistence-CB3RZIY7.js} +3 -3
- package/dist/{conversationTracker-LE56DVAC.js → conversationTracker-HDEFZTDC.js} +4 -4
- package/dist/{customCommands-4X76E7O3.js → customCommands-ELEQAM5Y.js} +4 -4
- package/dist/{env-FP3P46RT.js → env-FMH4AH2H.js} +2 -2
- package/dist/{file-KV52REUC.js → file-6TB2IASX.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-OTA3UYTD.js → llm-QPAHJ643.js} +31 -31
- package/dist/{llmLazy-6C5RDNID.js → llmLazy-RYJWZZ7Y.js} +1 -1
- package/dist/{loader-OQK52QDI.js → loader-EPUS22XU.js} +4 -4
- package/dist/{lsp-EIMYRWRU.js → lsp-WIEWEHYU.js} +7 -6
- package/dist/{lspAnchor-5TJ5JKEJ.js → lspAnchor-YI3SOGER.js} +8 -8
- package/dist/{mcp-ESHTAOQ2.js → mcp-Q6UOFMLT.js} +7 -7
- package/dist/{mentionProcessor-SVY2HFAN.js → mentionProcessor-3IV63BZT.js} +5 -5
- package/dist/{messages-WTIERLAV.js → messages-XU4LSUWY.js} +1 -1
- package/dist/{model-XIQ6J7WO.js → model-JFUZ777G.js} +5 -5
- package/dist/{openai-MHDKXTKR.js → openai-PQN2VFKQ.js} +5 -5
- package/dist/{outputStyles-AOELRVFL.js → outputStyles-PJNN6AH4.js} +4 -4
- package/dist/{pluginRuntime-3CCOPRUZ.js → pluginRuntime-TLFHDTDH.js} +6 -6
- package/dist/{pluginValidation-L3NUKGCQ.js → pluginValidation-TZUKRIFW.js} +6 -6
- package/dist/prompts-Y4JPHIGG.js +59 -0
- package/dist/{pybAgentSessionLoad-DS67RJAJ.js → pybAgentSessionLoad-EFAWFGRE.js} +4 -4
- package/dist/{pybAgentSessionResume-UGQCQVNW.js → pybAgentSessionResume-YQSKGG3W.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-YFYCFTMO.js → pybAgentStreamJsonSession-BYHCDZXV.js} +1 -1
- package/dist/{pybHooks-XUN2UYB2.js → pybHooks-ZH3DUHNO.js} +4 -4
- package/dist/query-SA5YQRDP.js +57 -0
- package/dist/{registry-XAPOPN44.js → registry-A2AB7N66.js} +5 -5
- package/dist/{ripgrep-DQDBRTBS.js → ripgrep-CYA5VVPU.js} +3 -3
- package/dist/{skillMarketplace-SUMGVSYS.js → skillMarketplace-6CDVELA7.js} +3 -3
- package/dist/{state-QUWQKTQZ.js → state-MDP57623.js} +2 -2
- package/dist/{theme-GZSN2BNR.js → theme-MYY4MVK7.js} +5 -5
- package/dist/{toolPermissionSettings-G5JQX7I2.js → toolPermissionSettings-ALND7SVQ.js} +6 -6
- package/dist/tools-6M5WFR3S.js +57 -0
- package/dist/{userInput-PKPNFQMN.js → userInput-FBVWRPOG.js} +32 -32
- package/package.json +3 -1
- package/dist/REPL-FPYYTXYI.js +0 -53
- package/dist/chunk-A3E3KOP5.js.map +0 -7
- package/dist/chunk-SD2KLYSK.js.map +0 -7
- package/dist/chunk-T2V55G3O.js.map +0 -7
- package/dist/commands-SWWMSOJY.js +0 -57
- package/dist/prompts-LCARBCSA.js +0 -59
- package/dist/query-63DINS6E.js +0 -57
- package/dist/tools-PPRXMRLD.js +0 -57
- /package/dist/{REPL-FPYYTXYI.js.map → REPL-45IVQWUI.js.map} +0 -0
- /package/dist/{acp-Y3YRP7PX.js.map → acp-KELESOXO.js.map} +0 -0
- /package/dist/{agentsValidate-LYQDYON6.js.map → agentsValidate-J7PHU22S.js.map} +0 -0
- /package/dist/{ask-BH7SPGEV.js.map → ask-ZICPHRGR.js.map} +0 -0
- /package/dist/{autoUpdater-WQ7NSMS6.js.map → autoUpdater-6KGZQTW5.js.map} +0 -0
- /package/dist/{chunk-F6A7OSLF.js.map → chunk-2AU4PKSQ.js.map} +0 -0
- /package/dist/{chunk-2CFC3PYO.js.map → chunk-4VVWAA6O.js.map} +0 -0
- /package/dist/{chunk-FGYA5FY5.js.map → chunk-57BVHCH3.js.map} +0 -0
- /package/dist/{chunk-BGT7XDPE.js.map → chunk-5OBGGU2O.js.map} +0 -0
- /package/dist/{chunk-6TJCSOV3.js.map → chunk-6JVCLWCU.js.map} +0 -0
- /package/dist/{chunk-3V35SGQ7.js.map → chunk-7UF7PBUR.js.map} +0 -0
- /package/dist/{chunk-BIRC5MFX.js.map → chunk-7WPBMV6W.js.map} +0 -0
- /package/dist/{chunk-QYZADXNT.js.map → chunk-A5O2MBVW.js.map} +0 -0
- /package/dist/{chunk-HFEWWAXY.js.map → chunk-CN443EB5.js.map} +0 -0
- /package/dist/{chunk-ILSNA4QO.js.map → chunk-GHNPBDR6.js.map} +0 -0
- /package/dist/{chunk-HPEY66LP.js.map → chunk-IAIXAB4N.js.map} +0 -0
- /package/dist/{chunk-7XHORF4S.js.map → chunk-ITD4GQ6O.js.map} +0 -0
- /package/dist/{chunk-FZDJSTSK.js.map → chunk-K3AQYDRJ.js.map} +0 -0
- /package/dist/{chunk-ZJJR2GKA.js.map → chunk-MWL7Q5HG.js.map} +0 -0
- /package/dist/{chunk-7BDU4UKY.js.map → chunk-N2W52I56.js.map} +0 -0
- /package/dist/{chunk-G57Q2LMI.js.map → chunk-OPEQBEHZ.js.map} +0 -0
- /package/dist/{chunk-FDU3LJPV.js.map → chunk-OTMVCWZ2.js.map} +0 -0
- /package/dist/{chunk-K4GZU7WR.js.map → chunk-Q2FTNJHH.js.map} +0 -0
- /package/dist/{chunk-PZ3WTDXV.js.map → chunk-Q4WANADY.js.map} +0 -0
- /package/dist/{chunk-SRWWGIOO.js.map → chunk-RRLBQ3XD.js.map} +0 -0
- /package/dist/{chunk-FS2I7CEG.js.map → chunk-SD3VNTAR.js.map} +0 -0
- /package/dist/{chunk-B4DLSHE7.js.map → chunk-T6S6TXIY.js.map} +0 -0
- /package/dist/{chunk-FSHVF7L6.js.map → chunk-TLMCXAET.js.map} +0 -0
- /package/dist/{chunk-LO7D5L6Q.js.map → chunk-US6EALFL.js.map} +0 -0
- /package/dist/{chunk-RHUSN5MT.js.map → chunk-UUTMXSER.js.map} +0 -0
- /package/dist/{chunk-VHDLVHEI.js.map → chunk-V6W537PO.js.map} +0 -0
- /package/dist/{chunk-LFTLSBFK.js.map → chunk-XIAHHC4E.js.map} +0 -0
- /package/dist/{chunk-HPLKXHZG.js.map → chunk-ZLNJ6XFU.js.map} +0 -0
- /package/dist/{cli-SPB5RXN4.js.map → cli-P7N4INGY.js.map} +0 -0
- /package/dist/{commands-SWWMSOJY.js.map → commands-BTSWDZVO.js.map} +0 -0
- /package/dist/{config-BMWR2IR4.js.map → config-XVX25KIN.js.map} +0 -0
- /package/dist/{context-SNWJ6H3N.js.map → context-OBZ5CNGA.js.map} +0 -0
- /package/dist/{conversationPersistence-L6KNQU6J.js.map → conversationPersistence-CB3RZIY7.js.map} +0 -0
- /package/dist/{conversationTracker-LE56DVAC.js.map → conversationTracker-HDEFZTDC.js.map} +0 -0
- /package/dist/{customCommands-4X76E7O3.js.map → customCommands-ELEQAM5Y.js.map} +0 -0
- /package/dist/{env-FP3P46RT.js.map → env-FMH4AH2H.js.map} +0 -0
- /package/dist/{file-KV52REUC.js.map → file-6TB2IASX.js.map} +0 -0
- /package/dist/{llm-OTA3UYTD.js.map → llm-QPAHJ643.js.map} +0 -0
- /package/dist/{llmLazy-6C5RDNID.js.map → llmLazy-RYJWZZ7Y.js.map} +0 -0
- /package/dist/{loader-OQK52QDI.js.map → loader-EPUS22XU.js.map} +0 -0
- /package/dist/{lsp-EIMYRWRU.js.map → lsp-WIEWEHYU.js.map} +0 -0
- /package/dist/{lspAnchor-5TJ5JKEJ.js.map → lspAnchor-YI3SOGER.js.map} +0 -0
- /package/dist/{mcp-ESHTAOQ2.js.map → mcp-Q6UOFMLT.js.map} +0 -0
- /package/dist/{mentionProcessor-SVY2HFAN.js.map → mentionProcessor-3IV63BZT.js.map} +0 -0
- /package/dist/{messages-WTIERLAV.js.map → messages-XU4LSUWY.js.map} +0 -0
- /package/dist/{model-XIQ6J7WO.js.map → model-JFUZ777G.js.map} +0 -0
- /package/dist/{openai-MHDKXTKR.js.map → openai-PQN2VFKQ.js.map} +0 -0
- /package/dist/{outputStyles-AOELRVFL.js.map → outputStyles-PJNN6AH4.js.map} +0 -0
- /package/dist/{pluginRuntime-3CCOPRUZ.js.map → pluginRuntime-TLFHDTDH.js.map} +0 -0
- /package/dist/{pluginValidation-L3NUKGCQ.js.map → pluginValidation-TZUKRIFW.js.map} +0 -0
- /package/dist/{prompts-LCARBCSA.js.map → prompts-Y4JPHIGG.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-DS67RJAJ.js.map → pybAgentSessionLoad-EFAWFGRE.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-UGQCQVNW.js.map → pybAgentSessionResume-YQSKGG3W.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-YFYCFTMO.js.map → pybAgentStreamJsonSession-BYHCDZXV.js.map} +0 -0
- /package/dist/{pybHooks-XUN2UYB2.js.map → pybHooks-ZH3DUHNO.js.map} +0 -0
- /package/dist/{query-63DINS6E.js.map → query-SA5YQRDP.js.map} +0 -0
- /package/dist/{registry-XAPOPN44.js.map → registry-A2AB7N66.js.map} +0 -0
- /package/dist/{ripgrep-DQDBRTBS.js.map → ripgrep-CYA5VVPU.js.map} +0 -0
- /package/dist/{skillMarketplace-SUMGVSYS.js.map → skillMarketplace-6CDVELA7.js.map} +0 -0
- /package/dist/{state-QUWQKTQZ.js.map → state-MDP57623.js.map} +0 -0
- /package/dist/{theme-GZSN2BNR.js.map → theme-MYY4MVK7.js.map} +0 -0
- /package/dist/{toolPermissionSettings-G5JQX7I2.js.map → toolPermissionSettings-ALND7SVQ.js.map} +0 -0
- /package/dist/{tools-PPRXMRLD.js.map → tools-6M5WFR3S.js.map} +0 -0
- /package/dist/{userInput-PKPNFQMN.js.map → userInput-FBVWRPOG.js.map} +0 -0
|
@@ -2,17 +2,17 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
loadPybAgentSessionMessages
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-TLMCXAET.js";
|
|
6
6
|
import {
|
|
7
7
|
appendSessionCustomTitleRecord,
|
|
8
8
|
appendSessionJsonlFromMessage,
|
|
9
9
|
appendSessionTagRecord,
|
|
10
10
|
listPybAgentSessions
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-T6S6TXIY.js";
|
|
12
12
|
import {
|
|
13
13
|
formatValidationResult,
|
|
14
14
|
validatePluginOrMarketplacePath
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-IAIXAB4N.js";
|
|
16
16
|
import {
|
|
17
17
|
ConversationTracker,
|
|
18
18
|
appendFinishState,
|
|
@@ -20,10 +20,10 @@ import {
|
|
|
20
20
|
getConversationTrackerForContext,
|
|
21
21
|
isFinishComplete,
|
|
22
22
|
mapFinishReason
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-ITD4GQ6O.js";
|
|
24
24
|
import {
|
|
25
25
|
FileSystemConversationPersistence
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-V6W537PO.js";
|
|
27
27
|
import {
|
|
28
28
|
beginReplSessionScope
|
|
29
29
|
} from "./chunk-F4AXICO7.js";
|
|
@@ -38,7 +38,7 @@ import {
|
|
|
38
38
|
runStopHooks,
|
|
39
39
|
runUserPromptSubmitHooks,
|
|
40
40
|
updateHookTranscriptForMessages
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-6JVCLWCU.js";
|
|
42
42
|
import {
|
|
43
43
|
DEFAULT_OUTPUT_STYLE,
|
|
44
44
|
getAvailableOutputStyles,
|
|
@@ -47,11 +47,11 @@ import {
|
|
|
47
47
|
getOutputStyleSystemPromptAdditions,
|
|
48
48
|
resolveOutputStyleName,
|
|
49
49
|
setCurrentOutputStyle
|
|
50
|
-
} from "./chunk-
|
|
50
|
+
} from "./chunk-57BVHCH3.js";
|
|
51
51
|
import {
|
|
52
52
|
fetchCustomModels,
|
|
53
53
|
getModelFeatures
|
|
54
|
-
} from "./chunk-
|
|
54
|
+
} from "./chunk-Q4WANADY.js";
|
|
55
55
|
import {
|
|
56
56
|
getCurrentSessionId,
|
|
57
57
|
getSessionState
|
|
@@ -60,7 +60,7 @@ import {
|
|
|
60
60
|
queryLLM,
|
|
61
61
|
queryQuick,
|
|
62
62
|
verifyApiKey
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-ZLNJ6XFU.js";
|
|
64
64
|
import {
|
|
65
65
|
DEFAULT_TIMEOUT_MS,
|
|
66
66
|
FallbackToolUseRejectedMessage,
|
|
@@ -75,7 +75,7 @@ import {
|
|
|
75
75
|
listMCPServers,
|
|
76
76
|
loadMergedSettings,
|
|
77
77
|
normalizeSandboxRuntimeConfigFromSettings
|
|
78
|
-
} from "./chunk-
|
|
78
|
+
} from "./chunk-SD3VNTAR.js";
|
|
79
79
|
import {
|
|
80
80
|
addMarketplace,
|
|
81
81
|
disableSkillPlugin,
|
|
@@ -88,11 +88,11 @@ import {
|
|
|
88
88
|
refreshMarketplaceAsync,
|
|
89
89
|
removeMarketplace,
|
|
90
90
|
uninstallSkillPlugin
|
|
91
|
-
} from "./chunk-
|
|
91
|
+
} from "./chunk-GHNPBDR6.js";
|
|
92
92
|
import {
|
|
93
93
|
loadToolPermissionContextFromDisk,
|
|
94
94
|
persistToolPermissionUpdateToDisk
|
|
95
|
-
} from "./chunk-
|
|
95
|
+
} from "./chunk-Q2FTNJHH.js";
|
|
96
96
|
import {
|
|
97
97
|
applyToolPermissionContextUpdate,
|
|
98
98
|
applyToolPermissionContextUpdates,
|
|
@@ -103,14 +103,14 @@ import {
|
|
|
103
103
|
generateSystemReminders,
|
|
104
104
|
resetReminderSession,
|
|
105
105
|
systemReminderService
|
|
106
|
-
} from "./chunk-
|
|
106
|
+
} from "./chunk-RRLBQ3XD.js";
|
|
107
107
|
import {
|
|
108
108
|
clearAgentCache,
|
|
109
109
|
getActiveAgents,
|
|
110
110
|
getAgentByType,
|
|
111
111
|
getAllAgents,
|
|
112
112
|
getAvailableAgentTypes
|
|
113
|
-
} from "./chunk-
|
|
113
|
+
} from "./chunk-A5O2MBVW.js";
|
|
114
114
|
import {
|
|
115
115
|
API_ERROR_MESSAGE_PREFIX,
|
|
116
116
|
CANCEL_MESSAGE,
|
|
@@ -145,7 +145,7 @@ import {
|
|
|
145
145
|
reorderMessages,
|
|
146
146
|
resetAutoCompactTelemetry,
|
|
147
147
|
stripSystemMessages
|
|
148
|
-
} from "./chunk-
|
|
148
|
+
} from "./chunk-UUTMXSER.js";
|
|
149
149
|
import {
|
|
150
150
|
getRequestStatus,
|
|
151
151
|
setRequestStatus,
|
|
@@ -177,17 +177,13 @@ import {
|
|
|
177
177
|
normalizeFilePath,
|
|
178
178
|
readTextContent,
|
|
179
179
|
writeTextContent
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-US6EALFL.js";
|
|
181
181
|
import {
|
|
182
182
|
parseBlockEdits
|
|
183
183
|
} from "./chunk-QWIBSCDN.js";
|
|
184
184
|
import {
|
|
185
185
|
toLspToolFallbackEvent
|
|
186
186
|
} from "./chunk-2RXKUCFS.js";
|
|
187
|
-
import {
|
|
188
|
-
emitTelemetryEvent,
|
|
189
|
-
registerTelemetryListener
|
|
190
|
-
} from "./chunk-TFHFYID3.js";
|
|
191
187
|
import {
|
|
192
188
|
LspAPI,
|
|
193
189
|
LspFacade,
|
|
@@ -195,18 +191,22 @@ import {
|
|
|
195
191
|
formatDiagnosticsPretty,
|
|
196
192
|
initParser,
|
|
197
193
|
loadLanguage
|
|
198
|
-
} from "./chunk-
|
|
194
|
+
} from "./chunk-VDLMXEHU.js";
|
|
195
|
+
import {
|
|
196
|
+
emitTelemetryEvent,
|
|
197
|
+
registerTelemetryListener
|
|
198
|
+
} from "./chunk-TFHFYID3.js";
|
|
199
199
|
import {
|
|
200
200
|
getSettingsFileCandidates,
|
|
201
201
|
loadSettingsWithLegacyFallback,
|
|
202
202
|
readSettingsFile
|
|
203
|
-
} from "./chunk-
|
|
203
|
+
} from "./chunk-7WPBMV6W.js";
|
|
204
204
|
import {
|
|
205
205
|
getCustomCommandDirectories,
|
|
206
206
|
hasCustomCommands,
|
|
207
207
|
loadCustomCommands,
|
|
208
208
|
reloadCustomCommands
|
|
209
|
-
} from "./chunk-
|
|
209
|
+
} from "./chunk-XIAHHC4E.js";
|
|
210
210
|
import {
|
|
211
211
|
getSessionPlugins
|
|
212
212
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -215,7 +215,7 @@ import {
|
|
|
215
215
|
buildModelProfileKey,
|
|
216
216
|
getModelManager,
|
|
217
217
|
isDefaultSlowAndCapableModel
|
|
218
|
-
} from "./chunk-
|
|
218
|
+
} from "./chunk-K3AQYDRJ.js";
|
|
219
219
|
import {
|
|
220
220
|
getCodeStyle,
|
|
221
221
|
getContext,
|
|
@@ -223,16 +223,16 @@ import {
|
|
|
223
223
|
getIsGit,
|
|
224
224
|
getProjectDocs,
|
|
225
225
|
getProjectStructureStatisticsBlock
|
|
226
|
-
} from "./chunk-
|
|
226
|
+
} from "./chunk-OPEQBEHZ.js";
|
|
227
227
|
import {
|
|
228
228
|
getRipgrepPath,
|
|
229
229
|
getRipgrepPolicyMode,
|
|
230
230
|
resolveRipgrepPolicy,
|
|
231
231
|
ripGrep
|
|
232
|
-
} from "./chunk-
|
|
232
|
+
} from "./chunk-7UF7PBUR.js";
|
|
233
233
|
import {
|
|
234
234
|
getTheme
|
|
235
|
-
} from "./chunk-
|
|
235
|
+
} from "./chunk-N2W52I56.js";
|
|
236
236
|
import {
|
|
237
237
|
DEFAULT_GLOBAL_CONFIG,
|
|
238
238
|
enableConfigs,
|
|
@@ -245,7 +245,7 @@ import {
|
|
|
245
245
|
saveGlobalConfig,
|
|
246
246
|
setAllPointersToModel,
|
|
247
247
|
setModelPointer
|
|
248
|
-
} from "./chunk-
|
|
248
|
+
} from "./chunk-2AU4PKSQ.js";
|
|
249
249
|
import {
|
|
250
250
|
AbortError
|
|
251
251
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -254,7 +254,7 @@ import {
|
|
|
254
254
|
getCurrentRequest,
|
|
255
255
|
logUserFriendly,
|
|
256
256
|
markPhase
|
|
257
|
-
} from "./chunk-
|
|
257
|
+
} from "./chunk-MWL7Q5HG.js";
|
|
258
258
|
import {
|
|
259
259
|
ASCII_LOGO,
|
|
260
260
|
BunShell,
|
|
@@ -298,10 +298,10 @@ import {
|
|
|
298
298
|
setCwd,
|
|
299
299
|
shouldApplyToolOutputTruncation,
|
|
300
300
|
truncateToolOutput
|
|
301
|
-
} from "./chunk-
|
|
301
|
+
} from "./chunk-CN443EB5.js";
|
|
302
302
|
import {
|
|
303
303
|
MACRO
|
|
304
|
-
} from "./chunk-
|
|
304
|
+
} from "./chunk-5OJHTSFR.js";
|
|
305
305
|
import {
|
|
306
306
|
__export
|
|
307
307
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -482,7 +482,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
482
482
|
var getCommandPrefix = memoize(
|
|
483
483
|
async (command4, abortSignal) => {
|
|
484
484
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
485
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
485
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-QPAHJ643.js");
|
|
486
486
|
const response = await queryQuick2({
|
|
487
487
|
systemPrompt,
|
|
488
488
|
userPrompt,
|
|
@@ -4284,7 +4284,7 @@ function formatParseError(error) {
|
|
|
4284
4284
|
return error instanceof Error ? error.message : String(error);
|
|
4285
4285
|
}
|
|
4286
4286
|
async function defaultGateQuery(args) {
|
|
4287
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4287
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-QPAHJ643.js");
|
|
4288
4288
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4289
4289
|
const messages = [
|
|
4290
4290
|
{
|
|
@@ -6475,12 +6475,49 @@ Usage:
|
|
|
6475
6475
|
7. **Conditional Edit**: Use \`if_not_contains\` to skip the edit if the file already contains a specific string.
|
|
6476
6476
|
8. **Thinking**: You can include "thinking" text between blocks; the tool will ignore it.
|
|
6477
6477
|
|
|
6478
|
+
## LSP-Integrated Behavior
|
|
6479
|
+
- **Semantic Anchor Assist**: Before fuzzy replacement, Edit tries LSP anchor matching to narrow replacement to the most relevant symbol range.
|
|
6480
|
+
- **When It Helps**: Especially useful when the same snippet appears multiple times and plain text matching may hit the wrong block.
|
|
6481
|
+
- **Fallback**: If LSP anchor is unavailable, Edit falls back to normal SEARCH/REPLACE matching.
|
|
6482
|
+
- **Post-Edit Verification**: Set \`verify: true\` to run LSP diagnostics after applying edits.
|
|
6483
|
+
- **Verification Guardrail**: If syntax/type diagnostics contain errors after edit, Edit reverts changes and returns a verification failure.
|
|
6484
|
+
- **When LSP Is Unavailable**: You may receive verification unavailable; retry with \`verify: false\` only when you have high confidence in edit safety.
|
|
6485
|
+
|
|
6478
6486
|
Notes:
|
|
6479
6487
|
- The edit will FAIL if the SEARCH block matches multiple locations(ambiguous). Provide more context.
|
|
6480
6488
|
- To delete code, leave the REPLACE section empty.
|
|
6481
6489
|
- To create a new file, use an empty SEARCH block with the desired content in REPLACE.
|
|
6482
6490
|
- ALWAYS prefer editing existing files. NEVER write new files unless explicitly required.
|
|
6483
6491
|
- For Jupyter Notebooks (.ipynb), use the NotebookEditTool instead.
|
|
6492
|
+
|
|
6493
|
+
## Typical Usage Examples
|
|
6494
|
+
### Example 1: Ambiguous Duplicate Snippet with LSP Anchor
|
|
6495
|
+
<example>
|
|
6496
|
+
user: Update the constructor guard in UserService, not the test helper copy
|
|
6497
|
+
assistant: [uses Read on UserService file to confirm target block]
|
|
6498
|
+
[uses Edit with SEARCH/REPLACE block and verify=true]
|
|
6499
|
+
[relies on LSP anchor assist to prefer semantic symbol region when duplicate text exists]
|
|
6500
|
+
<reasoning>
|
|
6501
|
+
The assistant enabled semantic-safe editing because:
|
|
6502
|
+
1. Duplicate snippets can cause ambiguous fuzzy matches
|
|
6503
|
+
2. LSP anchor narrows replacement to the intended symbol scope
|
|
6504
|
+
3. verify=true adds post-edit diagnostics guardrail and auto-revert on syntax errors
|
|
6505
|
+
</reasoning>
|
|
6506
|
+
</example>
|
|
6507
|
+
|
|
6508
|
+
### Example 2: Verification-Unavailable Recovery
|
|
6509
|
+
<example>
|
|
6510
|
+
user: Apply this quick rename in a generated file
|
|
6511
|
+
assistant: [uses Read to confirm exact path and block]
|
|
6512
|
+
[uses Edit with verify=true]
|
|
6513
|
+
[if response says verification unavailable, retries with verify=false and tighter SEARCH context]
|
|
6514
|
+
<reasoning>
|
|
6515
|
+
The assistant keeps verification first, then degrades safely because:
|
|
6516
|
+
1. LSP verification is preferred for correctness
|
|
6517
|
+
2. Generated or unsupported files may not have active LSP diagnostics
|
|
6518
|
+
3. Retrying with verify=false is acceptable only after narrowing context
|
|
6519
|
+
</reasoning>
|
|
6520
|
+
</example>
|
|
6484
6521
|
`.trim();
|
|
6485
6522
|
|
|
6486
6523
|
// src/utils/terminal/paste.ts
|
|
@@ -6544,6 +6581,139 @@ function getPatch({
|
|
|
6544
6581
|
}));
|
|
6545
6582
|
}
|
|
6546
6583
|
|
|
6584
|
+
// src/tools/utils/lspFallbackHandler.ts
|
|
6585
|
+
function inferQuality(source) {
|
|
6586
|
+
if (source === "lsp" || source === "hybrid") return "full";
|
|
6587
|
+
if (source === "tree-sitter") return "partial";
|
|
6588
|
+
return "minimal";
|
|
6589
|
+
}
|
|
6590
|
+
function inferConfidence(source) {
|
|
6591
|
+
if (source === "lsp" || source === "hybrid" || source === "tree-sitter") return "high";
|
|
6592
|
+
if (source === "token-scan") return "low";
|
|
6593
|
+
return "low";
|
|
6594
|
+
}
|
|
6595
|
+
function inferSourceFromFormatted(formatted) {
|
|
6596
|
+
const text = String(formatted ?? "").toLowerCase();
|
|
6597
|
+
if (text.includes("no lsp server available") || text.includes("unable to initialize lsp")) {
|
|
6598
|
+
return "none";
|
|
6599
|
+
}
|
|
6600
|
+
if (text.includes("token scan")) return "token-scan";
|
|
6601
|
+
if (text.includes("tree-sitter")) return "tree-sitter";
|
|
6602
|
+
return "lsp";
|
|
6603
|
+
}
|
|
6604
|
+
function inferReason(input) {
|
|
6605
|
+
if (input.fallbackReason) return input.fallbackReason;
|
|
6606
|
+
const text = String(input.formatted ?? "").toLowerCase();
|
|
6607
|
+
if (text.includes("no lsp server available") || text.includes("unable to initialize lsp")) {
|
|
6608
|
+
return "lsp-unavailable";
|
|
6609
|
+
}
|
|
6610
|
+
return "unknown";
|
|
6611
|
+
}
|
|
6612
|
+
function normalizeLspFallbackEvidence(input) {
|
|
6613
|
+
const source = input.source ?? inferSourceFromFormatted(input.formatted);
|
|
6614
|
+
const quality = input.quality ?? inferQuality(source);
|
|
6615
|
+
const confidence = input.confidence ?? inferConfidence(source);
|
|
6616
|
+
return {
|
|
6617
|
+
source,
|
|
6618
|
+
quality,
|
|
6619
|
+
confidence,
|
|
6620
|
+
reason: inferReason(input),
|
|
6621
|
+
suggestion: input.fallbackSuggestion
|
|
6622
|
+
};
|
|
6623
|
+
}
|
|
6624
|
+
function buildMessage(action, severity, evidence) {
|
|
6625
|
+
return `lspFallbackHandler action=${action} severity=${severity} source=${evidence.source} quality=${evidence.quality} confidence=${evidence.confidence} reason=${evidence.reason}`;
|
|
6626
|
+
}
|
|
6627
|
+
function decideLspFallbackAction(input) {
|
|
6628
|
+
const { risk, evidence, verifyMode = false, allowForce = false } = input;
|
|
6629
|
+
if (risk === "high") {
|
|
6630
|
+
if (evidence.source === "none") {
|
|
6631
|
+
return {
|
|
6632
|
+
action: "block",
|
|
6633
|
+
severity: "strong",
|
|
6634
|
+
message: buildMessage("block", "strong", evidence),
|
|
6635
|
+
evidence
|
|
6636
|
+
};
|
|
6637
|
+
}
|
|
6638
|
+
if (verifyMode && evidence.quality === "minimal") {
|
|
6639
|
+
return {
|
|
6640
|
+
action: "block",
|
|
6641
|
+
severity: "strong",
|
|
6642
|
+
message: buildMessage("block", "strong", evidence),
|
|
6643
|
+
evidence
|
|
6644
|
+
};
|
|
6645
|
+
}
|
|
6646
|
+
if (evidence.source === "token-scan" && evidence.quality === "minimal") {
|
|
6647
|
+
if (!allowForce) {
|
|
6648
|
+
return {
|
|
6649
|
+
action: "block",
|
|
6650
|
+
severity: "strong",
|
|
6651
|
+
message: buildMessage("block", "strong", evidence),
|
|
6652
|
+
evidence
|
|
6653
|
+
};
|
|
6654
|
+
}
|
|
6655
|
+
return {
|
|
6656
|
+
action: "warn",
|
|
6657
|
+
severity: "strong",
|
|
6658
|
+
message: buildMessage("warn", "strong", evidence),
|
|
6659
|
+
evidence
|
|
6660
|
+
};
|
|
6661
|
+
}
|
|
6662
|
+
if (evidence.source === "tree-sitter" && evidence.quality === "partial") {
|
|
6663
|
+
return {
|
|
6664
|
+
action: "warn",
|
|
6665
|
+
severity: "normal",
|
|
6666
|
+
message: buildMessage("warn", "normal", evidence),
|
|
6667
|
+
evidence
|
|
6668
|
+
};
|
|
6669
|
+
}
|
|
6670
|
+
return {
|
|
6671
|
+
action: "pass",
|
|
6672
|
+
severity: "note",
|
|
6673
|
+
message: buildMessage("pass", "note", evidence),
|
|
6674
|
+
evidence
|
|
6675
|
+
};
|
|
6676
|
+
}
|
|
6677
|
+
if (risk === "medium") {
|
|
6678
|
+
if (evidence.source === "none" || evidence.quality === "minimal") {
|
|
6679
|
+
return {
|
|
6680
|
+
action: "warn",
|
|
6681
|
+
severity: "strong",
|
|
6682
|
+
message: buildMessage("warn", "strong", evidence),
|
|
6683
|
+
evidence
|
|
6684
|
+
};
|
|
6685
|
+
}
|
|
6686
|
+
if (evidence.source === "tree-sitter" || evidence.source === "token-scan") {
|
|
6687
|
+
return {
|
|
6688
|
+
action: "warn",
|
|
6689
|
+
severity: "normal",
|
|
6690
|
+
message: buildMessage("warn", "normal", evidence),
|
|
6691
|
+
evidence
|
|
6692
|
+
};
|
|
6693
|
+
}
|
|
6694
|
+
return {
|
|
6695
|
+
action: "pass",
|
|
6696
|
+
severity: "note",
|
|
6697
|
+
message: buildMessage("pass", "note", evidence),
|
|
6698
|
+
evidence
|
|
6699
|
+
};
|
|
6700
|
+
}
|
|
6701
|
+
if (evidence.source === "none" || evidence.quality === "minimal") {
|
|
6702
|
+
return {
|
|
6703
|
+
action: "warn",
|
|
6704
|
+
severity: "note",
|
|
6705
|
+
message: buildMessage("warn", "note", evidence),
|
|
6706
|
+
evidence
|
|
6707
|
+
};
|
|
6708
|
+
}
|
|
6709
|
+
return {
|
|
6710
|
+
action: "pass",
|
|
6711
|
+
severity: "note",
|
|
6712
|
+
message: buildMessage("pass", "note", evidence),
|
|
6713
|
+
evidence
|
|
6714
|
+
};
|
|
6715
|
+
}
|
|
6716
|
+
|
|
6547
6717
|
// src/tools/filesystem/FileEditTool/FileEditTool.tsx
|
|
6548
6718
|
var inputSchema3 = z3.strictObject({
|
|
6549
6719
|
file_path: z3.string().describe("The absolute path to the file to modify"),
|
|
@@ -6677,7 +6847,7 @@ var FileEditTool = {
|
|
|
6677
6847
|
const originalFileContent = currentFileContent;
|
|
6678
6848
|
let totalPatch = [];
|
|
6679
6849
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6680
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6850
|
+
const { findLspAnchor } = await import("./lspAnchor-YI3SOGER.js");
|
|
6681
6851
|
for (const op of editOperations) {
|
|
6682
6852
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6683
6853
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -6727,7 +6897,24 @@ ${op.search}`);
|
|
|
6727
6897
|
timeoutMs: 5e3,
|
|
6728
6898
|
rootPath: getSessionRoot()
|
|
6729
6899
|
});
|
|
6900
|
+
const fallbackDecision = decideLspFallbackAction({
|
|
6901
|
+
risk: "high",
|
|
6902
|
+
verifyMode: true,
|
|
6903
|
+
evidence: normalizeLspFallbackEvidence(lspResult)
|
|
6904
|
+
});
|
|
6905
|
+
if (fallbackDecision.action === "block") {
|
|
6906
|
+
writeTextContent(fullFilePath, originalFileContent, enc, endings);
|
|
6907
|
+
if (fallbackDecision.evidence.source === "none") {
|
|
6908
|
+
throw new Error(
|
|
6909
|
+
`Verification Unavailable: Unable to initialize LSP for ${file_path}. source=${fallbackDecision.evidence.source} quality=${fallbackDecision.evidence.quality}. Retry with verify=false or rerun when LSP is available.`
|
|
6910
|
+
);
|
|
6911
|
+
}
|
|
6912
|
+
throw new Error(
|
|
6913
|
+
`Verification Blocked: source=${fallbackDecision.evidence.source} quality=${fallbackDecision.evidence.quality} confidence=${fallbackDecision.evidence.confidence}. Retry with verify=false or rerun with higher-quality LSP evidence.`
|
|
6914
|
+
);
|
|
6915
|
+
}
|
|
6730
6916
|
if (lspResult.formatted.startsWith("No LSP server available for file type:")) {
|
|
6917
|
+
writeTextContent(fullFilePath, originalFileContent, enc, endings);
|
|
6731
6918
|
throw new Error(
|
|
6732
6919
|
`Verification Unavailable: Unable to initialize LSP for ${file_path}. Retry with verify=false or rerun when LSP is available.`
|
|
6733
6920
|
);
|
|
@@ -8519,6 +8706,12 @@ var DESCRIPTION4 = `Fast file pattern matching tool that works with any codebase
|
|
|
8519
8706
|
- Search ignores .gitignore rules and includes hidden files by default.
|
|
8520
8707
|
- **Empty Results**: When no files are found, try broader patterns (e.g., src/**/*) or verify path exists.
|
|
8521
8708
|
- **Error Handling**: Returns error if \`path\` does not exist or is not a valid directory.
|
|
8709
|
+
- **LSP Semantic Mode**: \`semantic: true\` enables workspace symbol fallback when file globbing returns empty.
|
|
8710
|
+
- **Semantic search is opt-in**: Only set \`semantic: true\` when you intentionally want LSP-assisted fallback.
|
|
8711
|
+
- Semantic output may include:
|
|
8712
|
+
- \`semanticNotice\`: human-readable semantic fallback note
|
|
8713
|
+
- \`semanticReason\`: structured reason code (e.g., \`SYMBOLS_ADDED\`, \`NO_SYMBOL_MATCH\`, \`LSP_UNAVAILABLE\`)
|
|
8714
|
+
- \`semanticSuggestion\`: suggested next action aligned to reason code
|
|
8522
8715
|
- **Truncated Results**: When results are truncated (limited to 100 files), narrow down using:
|
|
8523
8716
|
1. Add a more specific path: \`src/core/**/*.ts\` instead of \`**/*.ts\`
|
|
8524
8717
|
2. Use file extension filter: \`src/**/*.test.ts\` instead of \`src/**/*.ts\`
|
|
@@ -8564,6 +8757,20 @@ var DESCRIPTION4 = `Fast file pattern matching tool that works with any codebase
|
|
|
8564
8757
|
[uses Glob tool with pattern="src/**/*.ts" to focus on source code]
|
|
8565
8758
|
[uses Glob tool with pattern="src/core/**/*.ts" to narrow further if needed]
|
|
8566
8759
|
</example>
|
|
8760
|
+
|
|
8761
|
+
### Example 6: Semantic Fallback for Unknown File Path
|
|
8762
|
+
<example>
|
|
8763
|
+
user: Find where AuthService is implemented, I do not know the file name
|
|
8764
|
+
assistant: [uses Glob tool with pattern="**/*AuthService*" semantic=false first]
|
|
8765
|
+
[if no files found, retries with semantic=true]
|
|
8766
|
+
[reads semanticReason and semanticSuggestion to decide next step]
|
|
8767
|
+
<reasoning>
|
|
8768
|
+
The assistant switches to semantic mode because:
|
|
8769
|
+
1. Filename-based glob failed and user intent is symbol-oriented
|
|
8770
|
+
2. semantic=true allows LSP workspace symbols to recover likely file paths
|
|
8771
|
+
3. semanticReason + semanticSuggestion provide explicit fallback diagnostics
|
|
8772
|
+
</reasoning>
|
|
8773
|
+
</example>
|
|
8567
8774
|
`.trim();
|
|
8568
8775
|
|
|
8569
8776
|
// src/tools/filesystem/GlobTool/GlobTool.tsx
|
|
@@ -8831,6 +9038,12 @@ var DESCRIPTION5 = `A powerful fast content search tool that works with any code
|
|
|
8831
9038
|
**Result Handling**:
|
|
8832
9039
|
- Results are truncated at 20,000 characters if too large
|
|
8833
9040
|
- Use Task tool for open-ended searches requiring multiple rounds
|
|
9041
|
+
- **Semantic Fallback** (\`semantic: true\`): when text grep has no hit (or \`symbol_type\` is provided), Grep can query LSP workspace symbols.
|
|
9042
|
+
- Semantic-enhanced outputs may include:
|
|
9043
|
+
- \`semanticNotice\`: fallback summary
|
|
9044
|
+
- \`semanticReason\`: structured reason code (e.g., \`SYMBOLS_ADDED\`, \`NO_SYMBOL_MATCH\`, \`LSP_UNAVAILABLE\`)
|
|
9045
|
+
- \`semanticSuggestion\`: suggested next action by reason code
|
|
9046
|
+
- Keep deterministic workflow: text search first, semantic fallback second.
|
|
8834
9047
|
|
|
8835
9048
|
**Typical Usage Examples**:
|
|
8836
9049
|
|
|
@@ -8869,6 +9082,20 @@ var DESCRIPTION5 = `A powerful fast content search tool that works with any code
|
|
|
8869
9082
|
assistant: [uses Grep tool with pattern="database.*host|db_host|DB_HOST" -i: true]
|
|
8870
9083
|
[uses Read tool to examine configuration files]
|
|
8871
9084
|
</example>
|
|
9085
|
+
|
|
9086
|
+
Example 6: Semantic Fallback with Structured Reason
|
|
9087
|
+
<example>
|
|
9088
|
+
user: Find usages of PaymentSrvce (name might be misspelled)
|
|
9089
|
+
assistant: [uses Grep tool with pattern="PaymentSrvce" output_mode="files_with_matches"]
|
|
9090
|
+
[if no hit, retries with semantic=true]
|
|
9091
|
+
[uses semanticReason and semanticSuggestion to decide whether to broaden query or switch to LspTool]
|
|
9092
|
+
<reasoning>
|
|
9093
|
+
The assistant uses semantic fallback because:
|
|
9094
|
+
1. Text grep may miss typo-tolerant symbol matches
|
|
9095
|
+
2. LSP workspace symbols can recover intended semantic targets
|
|
9096
|
+
3. Structured reason fields make fallback outcomes explicit and actionable
|
|
9097
|
+
</reasoning>
|
|
9098
|
+
</example>
|
|
8872
9099
|
`.trim();
|
|
8873
9100
|
|
|
8874
9101
|
// src/tools/search/GrepTool/GrepTool.tsx
|
|
@@ -12565,7 +12792,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
12565
12792
|
}
|
|
12566
12793
|
saveGlobalConfig(config2);
|
|
12567
12794
|
try {
|
|
12568
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
12795
|
+
const { resetAnthropicClient } = await import("./llm-QPAHJ643.js");
|
|
12569
12796
|
resetAnthropicClient();
|
|
12570
12797
|
} catch {
|
|
12571
12798
|
}
|
|
@@ -16989,7 +17216,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
16989
17216
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
16990
17217
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
16991
17218
|
if (dirs.length === 0) return [];
|
|
16992
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
17219
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-TLFHDTDH.js");
|
|
16993
17220
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
16994
17221
|
return errors;
|
|
16995
17222
|
}
|
|
@@ -17664,7 +17891,7 @@ async function call(onDone, context) {
|
|
|
17664
17891
|
ModelConfig,
|
|
17665
17892
|
{
|
|
17666
17893
|
onClose: () => {
|
|
17667
|
-
import("./model-
|
|
17894
|
+
import("./model-JFUZ777G.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
17668
17895
|
reloadModelManager2();
|
|
17669
17896
|
triggerModelConfigChange();
|
|
17670
17897
|
onDone();
|
|
@@ -27621,7 +27848,41 @@ var PROMPT7 = `- Retrieves output from a running or completed task (background s
|
|
|
27621
27848
|
- Use block=true (default) to wait for task completion
|
|
27622
27849
|
- Use block=false for non-blocking check of current status
|
|
27623
27850
|
- Task IDs can be found using the /tasks command
|
|
27624
|
-
- Works with all task types: background shells, async agents, and remote sessions
|
|
27851
|
+
- Works with all task types: background shells, async agents, and remote sessions
|
|
27852
|
+
|
|
27853
|
+
## LSP-Integrated Analysis
|
|
27854
|
+
- Optional \`analyze: true\` can append diagnostics-oriented analysis for task outputs.
|
|
27855
|
+
- LSP analysis execution is gated by environment flag \`PYB_TASKOUTPUT_LSP_ANALYSIS\` (1/true/on/yes).
|
|
27856
|
+
- If enabled, TaskOutput attempts semantic diagnostics enrichment for files mentioned in output.
|
|
27857
|
+
- If LSP analysis fails, TaskOutput emits structured fallback telemetry (\`LSP_TOOL_FALLBACK\`) and continues returning task output.
|
|
27858
|
+
- Treat analysis as augmentation: source-of-truth remains the original task output.
|
|
27859
|
+
|
|
27860
|
+
## Typical Usage Examples
|
|
27861
|
+
### Example 1: Build Failure Triage with LSP Analysis
|
|
27862
|
+
<example>
|
|
27863
|
+
user: Check task 123 and tell me why build failed
|
|
27864
|
+
assistant: [uses TaskOutput with task_id="123" block=true analyze=true]
|
|
27865
|
+
[inspects task output first, then uses appended LSP diagnostics hints for root-cause localization]
|
|
27866
|
+
<reasoning>
|
|
27867
|
+
The assistant uses analyze=true because:
|
|
27868
|
+
1. User asks for failure diagnosis, not only raw logs
|
|
27869
|
+
2. LSP diagnostics can map errors to concrete file/line issues
|
|
27870
|
+
3. Raw task output is still preserved as authoritative evidence
|
|
27871
|
+
</reasoning>
|
|
27872
|
+
</example>
|
|
27873
|
+
|
|
27874
|
+
### Example 2: Non-Blocking Polling During Long Task
|
|
27875
|
+
<example>
|
|
27876
|
+
user: Keep checking task 456 without waiting for completion
|
|
27877
|
+
assistant: [uses TaskOutput with task_id="456" block=false analyze=false]
|
|
27878
|
+
[repeats polling as needed; enables analyze=true only when failure appears]
|
|
27879
|
+
<reasoning>
|
|
27880
|
+
The assistant defers analysis because:
|
|
27881
|
+
1. Task is still running, so output is incomplete
|
|
27882
|
+
2. Non-blocking polling reduces wait latency
|
|
27883
|
+
3. Diagnostics enrichment is most useful after stable failure output appears
|
|
27884
|
+
</reasoning>
|
|
27885
|
+
</example>`;
|
|
27625
27886
|
|
|
27626
27887
|
// src/tools/system/TaskOutputTool/TaskOutputTool.tsx
|
|
27627
27888
|
var TOOL_PROGRESS_OPEN_TAG2 = ["<tool", "-progress>"].join("");
|
|
@@ -27707,7 +27968,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
|
|
|
27707
27968
|
if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
|
|
27708
27969
|
try {
|
|
27709
27970
|
const { isAbsolute: isAbsolute11, resolve: resolve16 } = await import("path");
|
|
27710
|
-
const { getSessionRoot: getSessionRoot2 } = await import("./state-
|
|
27971
|
+
const { getSessionRoot: getSessionRoot2 } = await import("./state-MDP57623.js");
|
|
27711
27972
|
const lines = output.split("\n");
|
|
27712
27973
|
const uniqueFiles = /* @__PURE__ */ new Set();
|
|
27713
27974
|
const lspSuggestions = [];
|
|
@@ -27990,6 +28251,10 @@ Usage:
|
|
|
27990
28251
|
- Supports recursive deletion for directories (be careful!).
|
|
27991
28252
|
- Safe and cross-platform (works on Windows/Linux/Mac).
|
|
27992
28253
|
- Do NOT use BashTool/RunCommand with 'rm', 'del', or 'rmdir'.
|
|
28254
|
+
- Default behavior includes an LSP reference safety check before deletion.
|
|
28255
|
+
- If references are detected, deletion is blocked unless \`force: true\` is explicitly set.
|
|
28256
|
+
- If LSP safety check fails internally, deletion is blocked unless \`force: true\` is explicitly set.
|
|
28257
|
+
- Use \`force: true\` only when you have validated impact (for example via LspTool findReferences or reviewed call sites with Read).
|
|
27993
28258
|
|
|
27994
28259
|
Examples:
|
|
27995
28260
|
|
|
@@ -28008,6 +28273,18 @@ Delete({
|
|
|
28008
28273
|
})
|
|
28009
28274
|
</example_force>
|
|
28010
28275
|
|
|
28276
|
+
<example_lsp_guard>
|
|
28277
|
+
// Deletion blocked by LSP reference guard, then explicitly overridden
|
|
28278
|
+
Delete({
|
|
28279
|
+
file_paths: ["/absolute/path/to/legacy-api.ts"]
|
|
28280
|
+
})
|
|
28281
|
+
// if blocked with "Safety Check Failed", validate impact first, then:
|
|
28282
|
+
Delete({
|
|
28283
|
+
file_paths: ["/absolute/path/to/legacy-api.ts"],
|
|
28284
|
+
force: true
|
|
28285
|
+
})
|
|
28286
|
+
</example_lsp_guard>
|
|
28287
|
+
|
|
28011
28288
|
<example_directory>
|
|
28012
28289
|
// Deleting a directory recursively
|
|
28013
28290
|
Delete({
|
|
@@ -28092,7 +28369,7 @@ var DeleteTool = {
|
|
|
28092
28369
|
}
|
|
28093
28370
|
if (!force) {
|
|
28094
28371
|
try {
|
|
28095
|
-
const { LspFacade: LspFacade2 } = await import("./lsp-
|
|
28372
|
+
const { LspFacade: LspFacade2 } = await import("./lsp-WIEWEHYU.js");
|
|
28096
28373
|
const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
|
|
28097
28374
|
if (referenceDetail) {
|
|
28098
28375
|
failedItems.push(
|
|
@@ -28102,8 +28379,20 @@ var DeleteTool = {
|
|
|
28102
28379
|
}
|
|
28103
28380
|
} catch (e) {
|
|
28104
28381
|
if (!force) {
|
|
28382
|
+
const decision = decideLspFallbackAction({
|
|
28383
|
+
risk: "high",
|
|
28384
|
+
allowForce: Boolean(force),
|
|
28385
|
+
evidence: normalizeLspFallbackEvidence({
|
|
28386
|
+
source: "none",
|
|
28387
|
+
quality: "minimal",
|
|
28388
|
+
confidence: "low",
|
|
28389
|
+
fallbackReason: "lsp-runtime-error",
|
|
28390
|
+
fallbackSuggestion: "Use 'force: true' to override when safety checks are unavailable.",
|
|
28391
|
+
formatted: String(e?.message ?? e)
|
|
28392
|
+
})
|
|
28393
|
+
});
|
|
28105
28394
|
failedItems.push(
|
|
28106
|
-
`${rawPath} (Safety Check Failed: Internal LSP Error. Use 'force: true' to override.)`
|
|
28395
|
+
`${rawPath} (Safety Check Failed: Internal LSP Error. source=${decision.evidence.source} quality=${decision.evidence.quality}. Use 'force: true' to override.)`
|
|
28107
28396
|
);
|
|
28108
28397
|
continue;
|
|
28109
28398
|
}
|
|
@@ -28453,6 +28742,33 @@ If the specified position is not on a valid symbol, the tool automatically searc
|
|
|
28453
28742
|
- **workspaceSymbol**: Must provide scoped filePath (module or directory), avoid unbounded full-repo queries
|
|
28454
28743
|
- **documentSymbol**: Uses LspFacade policy (LSP-first for accuracy, Tree-Sitter fallback for speed)
|
|
28455
28744
|
|
|
28745
|
+
## Typical Usage Examples
|
|
28746
|
+
### Example 1: Find Symbol Then Read Precise Block
|
|
28747
|
+
<example>
|
|
28748
|
+
user: Locate JWT validation implementation quickly
|
|
28749
|
+
assistant: [uses LSP workspaceSymbol with query="jwt validate" and scoped filePath]
|
|
28750
|
+
[uses Read on the discovered file and then LSP documentSymbol/definition as needed]
|
|
28751
|
+
<reasoning>
|
|
28752
|
+
The assistant starts semantically because:
|
|
28753
|
+
1. User asks for implementation location, not broad text grep
|
|
28754
|
+
2. workspaceSymbol narrows candidate files efficiently
|
|
28755
|
+
3. Read is then used for exact code extraction once target is known
|
|
28756
|
+
</reasoning>
|
|
28757
|
+
</example>
|
|
28758
|
+
|
|
28759
|
+
### Example 2: Diagnostics-First Debugging
|
|
28760
|
+
<example>
|
|
28761
|
+
user: Build failed in api package, tell me real code errors
|
|
28762
|
+
assistant: [uses LSP diagnostics with waitForDiagnostics=true on scoped filePath]
|
|
28763
|
+
[uses goToDefinition/findReferences for follow-up impact tracing]
|
|
28764
|
+
<reasoning>
|
|
28765
|
+
The assistant prioritizes diagnostics because:
|
|
28766
|
+
1. Diagnostics provide direct semantic errors from language tooling
|
|
28767
|
+
2. Scoped path avoids unbounded workspace queries
|
|
28768
|
+
3. Follow-up LSP ops can trace root-cause dependencies
|
|
28769
|
+
</reasoning>
|
|
28770
|
+
</example>
|
|
28771
|
+
|
|
28456
28772
|
Note: LSP servers are automatically managed and installed for most languages. For system-level languages (like C++, Java), ensure the corresponding tools (clangd, jdtls) are in your PATH.`;
|
|
28457
28773
|
var DESCRIPTION10 = PROMPT11;
|
|
28458
28774
|
|
|
@@ -38494,7 +38810,7 @@ function useStatusLine() {
|
|
|
38494
38810
|
// src/ui/components/PromptInput.tsx
|
|
38495
38811
|
async function interpretHashCommand(input) {
|
|
38496
38812
|
try {
|
|
38497
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
38813
|
+
const { queryQuick: queryQuick2 } = await import("./llm-QPAHJ643.js");
|
|
38498
38814
|
const systemPrompt = [
|
|
38499
38815
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
38500
38816
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -38807,7 +39123,7 @@ function PromptInput({
|
|
|
38807
39123
|
if (messages2.length) {
|
|
38808
39124
|
if (mode === "bash") {
|
|
38809
39125
|
onQuery(messages2, newAbortController).then(async () => {
|
|
38810
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
39126
|
+
const { getCwd: getCwd2 } = await import("./state-MDP57623.js");
|
|
38811
39127
|
setCurrentPwd(getCwd2());
|
|
38812
39128
|
});
|
|
38813
39129
|
} else {
|
|
@@ -40437,7 +40753,7 @@ import { homedir as homedir8 } from "os";
|
|
|
40437
40753
|
// src/commands/agents/generation.ts
|
|
40438
40754
|
import { randomUUID as randomUUID9 } from "crypto";
|
|
40439
40755
|
async function generateAgentWithClaude(prompt) {
|
|
40440
|
-
const { queryModel } = await import("./llm-
|
|
40756
|
+
const { queryModel } = await import("./llm-QPAHJ643.js");
|
|
40441
40757
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
40442
40758
|
|
|
40443
40759
|
Return your response as a JSON object with exactly these fields:
|