pybao-cli 1.3.76 → 1.3.78
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-E73G5CWW.js +42 -0
- package/dist/{acp-LDGRB36V.js → acp-KYH5HR3C.js} +27 -27
- package/dist/{agentsValidate-3ZT5L4GI.js → agentsValidate-5X6PA7UT.js} +7 -7
- package/dist/{ask-KQZCP45I.js → ask-RUCMKC7X.js} +25 -25
- package/dist/{autoUpdater-MBMXCVBD.js → autoUpdater-OKFWY47U.js} +3 -3
- package/dist/{chunk-4KVOFH2S.js → chunk-2M2ECQ6E.js} +1 -1
- package/dist/{chunk-H5ECL2W2.js → chunk-3IOLSZZF.js} +2 -2
- package/dist/{chunk-ZPGEVS4A.js → chunk-3ST2U5IQ.js} +1 -1
- package/dist/{chunk-7CIDTUWO.js → chunk-5JIGBIR2.js} +2 -2
- package/dist/{chunk-KIYCTSKZ.js → chunk-5QJKELHH.js} +1 -1
- package/dist/{chunk-3X643DPY.js → chunk-6ZCT2WED.js} +1 -1
- package/dist/{chunk-3X643DPY.js.map → chunk-6ZCT2WED.js.map} +1 -1
- package/dist/{chunk-5OS4UGYK.js → chunk-7BK273D7.js} +1 -1
- package/dist/{chunk-VU5HNOM5.js → chunk-7E4V7VX3.js} +60 -34
- package/dist/chunk-7E4V7VX3.js.map +7 -0
- package/dist/{chunk-EYJQMII5.js → chunk-B3H6ZCFG.js} +32 -22
- package/dist/chunk-B3H6ZCFG.js.map +7 -0
- package/dist/{chunk-YKU5MMJL.js → chunk-BOYZAS4R.js} +3 -3
- package/dist/{chunk-XK233DN5.js → chunk-BUAT64GH.js} +2 -2
- package/dist/{chunk-MCXQN7QX.js → chunk-CTZOQUUI.js} +4 -4
- package/dist/{chunk-GPSOYNIA.js → chunk-DPM5KKKR.js} +1 -1
- package/dist/{chunk-KJXBKZD4.js → chunk-E43DMKOM.js} +1 -1
- package/dist/{chunk-BAM5Z6EA.js → chunk-EPRQHLFC.js} +4 -4
- package/dist/{chunk-LEKWRXMF.js → chunk-HX32BMWC.js} +2 -2
- package/dist/{chunk-TASZ4WRS.js → chunk-I2GWO4KE.js} +3 -3
- package/dist/{chunk-L2H76Z4W.js → chunk-IAWIWSOQ.js} +3 -3
- package/dist/{chunk-ESQPYAOR.js → chunk-LAND3SRL.js} +58 -49
- package/dist/chunk-LAND3SRL.js.map +7 -0
- package/dist/{chunk-R2MM2EIA.js → chunk-LGZCGL3K.js} +3 -3
- package/dist/{chunk-63LP4JE6.js → chunk-NQCJOKDL.js} +3 -3
- package/dist/{chunk-ELPWSR2W.js → chunk-OWW53WVT.js} +2 -2
- package/dist/{chunk-NOMIQFQT.js → chunk-QEI6DBOY.js} +1 -1
- package/dist/{chunk-F3JJJLFB.js → chunk-T3XFIIOD.js} +1 -1
- package/dist/{chunk-JWSFVBQB.js → chunk-TZ3IB6EB.js} +2 -2
- package/dist/{chunk-TVCYEIR2.js → chunk-YYD6PI6O.js} +3 -3
- package/dist/{chunk-SBSGYOBY.js → chunk-ZLIC4UKS.js} +3 -3
- package/dist/{chunk-MY5O5CHS.js → chunk-ZP3JLALW.js} +1 -1
- package/dist/{cli-6L5TC5QS.js → cli-FJCUWQAW.js} +78 -78
- package/dist/commands-OLQCABB5.js +46 -0
- package/dist/{config-YG2PMDJU.js → config-LBZUXBBN.js} +4 -4
- package/dist/{context-U3BVAD76.js → context-Q53NFDOZ.js} +5 -5
- package/dist/{customCommands-U2VHRRHF.js → customCommands-DGEGYNT7.js} +4 -4
- package/dist/{env-H5WODPX3.js → env-NZEN4KIR.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{llm-CGDOSTGR.js → llm-MCQKDVRQ.js} +26 -26
- package/dist/{llmLazy-I5FNZYU5.js → llmLazy-RF4NYWDO.js} +1 -1
- package/dist/{loader-CVQIK26G.js → loader-KT4BHQOM.js} +4 -4
- package/dist/{lspAnchor-IJEAL6DF.js → lspAnchor-5HHJKFHU.js} +4 -4
- package/dist/{manager-UK5TEREN.js → manager-6VIGOKN2.js} +4 -4
- package/dist/{mcp-LGKV3XX4.js → mcp-HLH6YLKP.js} +7 -7
- package/dist/{mentionProcessor-MDTHENKV.js → mentionProcessor-WXGBQYT6.js} +5 -5
- package/dist/{messages-CQJMJWGJ.js → messages-RNBFKM2N.js} +1 -1
- package/dist/{model-UBVT2YA3.js → model-NTZF3KAO.js} +5 -5
- package/dist/{openai-C4EX52QG.js → openai-WUBHKKFB.js} +5 -5
- package/dist/{outputStyles-OPCESLH3.js → outputStyles-667NVW7Y.js} +4 -4
- package/dist/{pluginRuntime-4GQ5X6NW.js → pluginRuntime-XKTVVWCX.js} +6 -6
- package/dist/{pluginValidation-ORKYLE35.js → pluginValidation-ZYND3HAU.js} +6 -6
- package/dist/prompts-3TAHBJL3.js +48 -0
- package/dist/{pybAgentSessionLoad-UEX26O72.js → pybAgentSessionLoad-2S6YVNQI.js} +4 -4
- package/dist/{pybAgentSessionResume-HQWFSAOI.js → pybAgentSessionResume-JVCZVFDE.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-NTMBJMX6.js → pybAgentStreamJsonSession-5JVNB2US.js} +1 -1
- package/dist/{pybHooks-3COODNSS.js → pybHooks-LFTPBZG5.js} +4 -4
- package/dist/query-IPJCWNRQ.js +50 -0
- package/dist/{ripgrep-XCQYUJT5.js → ripgrep-HBPV2FBR.js} +3 -3
- package/dist/{skillMarketplace-OA7ZO7CJ.js → skillMarketplace-26YHSW2E.js} +3 -3
- package/dist/{state-BNESSPEK.js → state-EMMT246A.js} +2 -2
- package/dist/{theme-ZIUQDRA3.js → theme-KJCMEQPH.js} +5 -5
- package/dist/{toolPermissionSettings-6ANKW5RJ.js → toolPermissionSettings-G3ODXGTP.js} +6 -6
- package/dist/tools-TCX3OSR5.js +50 -0
- package/dist/{userInput-NHATC6JJ.js → userInput-TIOAK2UB.js} +27 -27
- package/package.json +1 -1
- package/dist/REPL-2MFAZYFR.js +0 -42
- package/dist/chunk-ESQPYAOR.js.map +0 -7
- package/dist/chunk-EYJQMII5.js.map +0 -7
- package/dist/chunk-VU5HNOM5.js.map +0 -7
- package/dist/commands-HSCVSRUN.js +0 -46
- package/dist/prompts-56KCWZNZ.js +0 -48
- package/dist/query-BJAUI2E7.js +0 -50
- package/dist/tools-4TTMZ6SJ.js +0 -50
- /package/dist/{REPL-2MFAZYFR.js.map → REPL-E73G5CWW.js.map} +0 -0
- /package/dist/{acp-LDGRB36V.js.map → acp-KYH5HR3C.js.map} +0 -0
- /package/dist/{agentsValidate-3ZT5L4GI.js.map → agentsValidate-5X6PA7UT.js.map} +0 -0
- /package/dist/{ask-KQZCP45I.js.map → ask-RUCMKC7X.js.map} +0 -0
- /package/dist/{autoUpdater-MBMXCVBD.js.map → autoUpdater-OKFWY47U.js.map} +0 -0
- /package/dist/{chunk-4KVOFH2S.js.map → chunk-2M2ECQ6E.js.map} +0 -0
- /package/dist/{chunk-H5ECL2W2.js.map → chunk-3IOLSZZF.js.map} +0 -0
- /package/dist/{chunk-ZPGEVS4A.js.map → chunk-3ST2U5IQ.js.map} +0 -0
- /package/dist/{chunk-7CIDTUWO.js.map → chunk-5JIGBIR2.js.map} +0 -0
- /package/dist/{chunk-KIYCTSKZ.js.map → chunk-5QJKELHH.js.map} +0 -0
- /package/dist/{chunk-5OS4UGYK.js.map → chunk-7BK273D7.js.map} +0 -0
- /package/dist/{chunk-YKU5MMJL.js.map → chunk-BOYZAS4R.js.map} +0 -0
- /package/dist/{chunk-XK233DN5.js.map → chunk-BUAT64GH.js.map} +0 -0
- /package/dist/{chunk-MCXQN7QX.js.map → chunk-CTZOQUUI.js.map} +0 -0
- /package/dist/{chunk-GPSOYNIA.js.map → chunk-DPM5KKKR.js.map} +0 -0
- /package/dist/{chunk-KJXBKZD4.js.map → chunk-E43DMKOM.js.map} +0 -0
- /package/dist/{chunk-BAM5Z6EA.js.map → chunk-EPRQHLFC.js.map} +0 -0
- /package/dist/{chunk-LEKWRXMF.js.map → chunk-HX32BMWC.js.map} +0 -0
- /package/dist/{chunk-TASZ4WRS.js.map → chunk-I2GWO4KE.js.map} +0 -0
- /package/dist/{chunk-L2H76Z4W.js.map → chunk-IAWIWSOQ.js.map} +0 -0
- /package/dist/{chunk-R2MM2EIA.js.map → chunk-LGZCGL3K.js.map} +0 -0
- /package/dist/{chunk-63LP4JE6.js.map → chunk-NQCJOKDL.js.map} +0 -0
- /package/dist/{chunk-ELPWSR2W.js.map → chunk-OWW53WVT.js.map} +0 -0
- /package/dist/{chunk-NOMIQFQT.js.map → chunk-QEI6DBOY.js.map} +0 -0
- /package/dist/{chunk-F3JJJLFB.js.map → chunk-T3XFIIOD.js.map} +0 -0
- /package/dist/{chunk-JWSFVBQB.js.map → chunk-TZ3IB6EB.js.map} +0 -0
- /package/dist/{chunk-TVCYEIR2.js.map → chunk-YYD6PI6O.js.map} +0 -0
- /package/dist/{chunk-SBSGYOBY.js.map → chunk-ZLIC4UKS.js.map} +0 -0
- /package/dist/{chunk-MY5O5CHS.js.map → chunk-ZP3JLALW.js.map} +0 -0
- /package/dist/{cli-6L5TC5QS.js.map → cli-FJCUWQAW.js.map} +0 -0
- /package/dist/{commands-HSCVSRUN.js.map → commands-OLQCABB5.js.map} +0 -0
- /package/dist/{config-YG2PMDJU.js.map → config-LBZUXBBN.js.map} +0 -0
- /package/dist/{context-U3BVAD76.js.map → context-Q53NFDOZ.js.map} +0 -0
- /package/dist/{customCommands-U2VHRRHF.js.map → customCommands-DGEGYNT7.js.map} +0 -0
- /package/dist/{env-H5WODPX3.js.map → env-NZEN4KIR.js.map} +0 -0
- /package/dist/{llm-CGDOSTGR.js.map → llm-MCQKDVRQ.js.map} +0 -0
- /package/dist/{llmLazy-I5FNZYU5.js.map → llmLazy-RF4NYWDO.js.map} +0 -0
- /package/dist/{loader-CVQIK26G.js.map → loader-KT4BHQOM.js.map} +0 -0
- /package/dist/{lspAnchor-IJEAL6DF.js.map → lspAnchor-5HHJKFHU.js.map} +0 -0
- /package/dist/{manager-UK5TEREN.js.map → manager-6VIGOKN2.js.map} +0 -0
- /package/dist/{mcp-LGKV3XX4.js.map → mcp-HLH6YLKP.js.map} +0 -0
- /package/dist/{mentionProcessor-MDTHENKV.js.map → mentionProcessor-WXGBQYT6.js.map} +0 -0
- /package/dist/{messages-CQJMJWGJ.js.map → messages-RNBFKM2N.js.map} +0 -0
- /package/dist/{model-UBVT2YA3.js.map → model-NTZF3KAO.js.map} +0 -0
- /package/dist/{openai-C4EX52QG.js.map → openai-WUBHKKFB.js.map} +0 -0
- /package/dist/{outputStyles-OPCESLH3.js.map → outputStyles-667NVW7Y.js.map} +0 -0
- /package/dist/{pluginRuntime-4GQ5X6NW.js.map → pluginRuntime-XKTVVWCX.js.map} +0 -0
- /package/dist/{pluginValidation-ORKYLE35.js.map → pluginValidation-ZYND3HAU.js.map} +0 -0
- /package/dist/{prompts-56KCWZNZ.js.map → prompts-3TAHBJL3.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-UEX26O72.js.map → pybAgentSessionLoad-2S6YVNQI.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-HQWFSAOI.js.map → pybAgentSessionResume-JVCZVFDE.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-NTMBJMX6.js.map → pybAgentStreamJsonSession-5JVNB2US.js.map} +0 -0
- /package/dist/{pybHooks-3COODNSS.js.map → pybHooks-LFTPBZG5.js.map} +0 -0
- /package/dist/{query-BJAUI2E7.js.map → query-IPJCWNRQ.js.map} +0 -0
- /package/dist/{ripgrep-XCQYUJT5.js.map → ripgrep-HBPV2FBR.js.map} +0 -0
- /package/dist/{skillMarketplace-OA7ZO7CJ.js.map → skillMarketplace-26YHSW2E.js.map} +0 -0
- /package/dist/{state-BNESSPEK.js.map → state-EMMT246A.js.map} +0 -0
- /package/dist/{theme-ZIUQDRA3.js.map → theme-KJCMEQPH.js.map} +0 -0
- /package/dist/{toolPermissionSettings-6ANKW5RJ.js.map → toolPermissionSettings-G3ODXGTP.js.map} +0 -0
- /package/dist/{tools-4TTMZ6SJ.js.map → tools-TCX3OSR5.js.map} +0 -0
- /package/dist/{userInput-NHATC6JJ.js.map → userInput-TIOAK2UB.js.map} +0 -0
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
import { createRequire as __pybCreateRequire } from "node:module";
|
|
2
|
+
const require = __pybCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
REPL
|
|
5
|
+
} from "./chunk-LAND3SRL.js";
|
|
6
|
+
import "./chunk-QEI6DBOY.js";
|
|
7
|
+
import "./chunk-ZP3JLALW.js";
|
|
8
|
+
import "./chunk-TZ3IB6EB.js";
|
|
9
|
+
import "./chunk-5P7HBXTD.js";
|
|
10
|
+
import "./chunk-HX32BMWC.js";
|
|
11
|
+
import "./chunk-EPRQHLFC.js";
|
|
12
|
+
import "./chunk-CTZOQUUI.js";
|
|
13
|
+
import "./chunk-BOYZAS4R.js";
|
|
14
|
+
import "./chunk-2M2ECQ6E.js";
|
|
15
|
+
import "./chunk-BUAT64GH.js";
|
|
16
|
+
import "./chunk-ERMQRV55.js";
|
|
17
|
+
import "./chunk-3IOLSZZF.js";
|
|
18
|
+
import "./chunk-7BK273D7.js";
|
|
19
|
+
import "./chunk-3DFBSQIT.js";
|
|
20
|
+
import "./chunk-ZLIC4UKS.js";
|
|
21
|
+
import "./chunk-B6IMQJZM.js";
|
|
22
|
+
import "./chunk-OWW53WVT.js";
|
|
23
|
+
import "./chunk-A3BVXXA3.js";
|
|
24
|
+
import "./chunk-3ST2U5IQ.js";
|
|
25
|
+
import "./chunk-5JIGBIR2.js";
|
|
26
|
+
import "./chunk-BJSWTHRM.js";
|
|
27
|
+
import "./chunk-YYD6PI6O.js";
|
|
28
|
+
import "./chunk-T3XFIIOD.js";
|
|
29
|
+
import "./chunk-UNNVICVU.js";
|
|
30
|
+
import "./chunk-I2GWO4KE.js";
|
|
31
|
+
import "./chunk-LGZCGL3K.js";
|
|
32
|
+
import "./chunk-DPM5KKKR.js";
|
|
33
|
+
import "./chunk-NQCJOKDL.js";
|
|
34
|
+
import "./chunk-RQVLBMP7.js";
|
|
35
|
+
import "./chunk-5QJKELHH.js";
|
|
36
|
+
import "./chunk-E43DMKOM.js";
|
|
37
|
+
import "./chunk-6ZCT2WED.js";
|
|
38
|
+
import "./chunk-OUXHGDLH.js";
|
|
39
|
+
import "./chunk-I3J4JYES.js";
|
|
40
|
+
export {
|
|
41
|
+
REPL
|
|
42
|
+
};
|
|
@@ -6,63 +6,63 @@ import {
|
|
|
6
6
|
} from "./chunk-MWPFU2KU.js";
|
|
7
7
|
import {
|
|
8
8
|
getTools
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-B3H6ZCFG.js";
|
|
10
10
|
import {
|
|
11
11
|
getCommands,
|
|
12
12
|
getSystemPrompt,
|
|
13
13
|
grantReadPermissionForOriginalDir,
|
|
14
14
|
hasPermissionsToUseTool,
|
|
15
15
|
query
|
|
16
|
-
} from "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
19
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-LAND3SRL.js";
|
|
17
|
+
import "./chunk-QEI6DBOY.js";
|
|
18
|
+
import "./chunk-ZP3JLALW.js";
|
|
19
|
+
import "./chunk-TZ3IB6EB.js";
|
|
20
20
|
import "./chunk-5P7HBXTD.js";
|
|
21
|
-
import "./chunk-
|
|
22
|
-
import "./chunk-
|
|
21
|
+
import "./chunk-HX32BMWC.js";
|
|
22
|
+
import "./chunk-EPRQHLFC.js";
|
|
23
23
|
import {
|
|
24
24
|
getClients
|
|
25
|
-
} from "./chunk-
|
|
26
|
-
import "./chunk-
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
25
|
+
} from "./chunk-CTZOQUUI.js";
|
|
26
|
+
import "./chunk-BOYZAS4R.js";
|
|
27
|
+
import "./chunk-2M2ECQ6E.js";
|
|
28
|
+
import "./chunk-BUAT64GH.js";
|
|
29
29
|
import "./chunk-ERMQRV55.js";
|
|
30
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-3IOLSZZF.js";
|
|
31
31
|
import {
|
|
32
32
|
createAssistantMessage,
|
|
33
33
|
createUserMessage
|
|
34
|
-
} from "./chunk-
|
|
34
|
+
} from "./chunk-7BK273D7.js";
|
|
35
35
|
import "./chunk-3DFBSQIT.js";
|
|
36
|
-
import "./chunk-
|
|
36
|
+
import "./chunk-ZLIC4UKS.js";
|
|
37
37
|
import "./chunk-B6IMQJZM.js";
|
|
38
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-OWW53WVT.js";
|
|
39
39
|
import "./chunk-A3BVXXA3.js";
|
|
40
|
-
import "./chunk-
|
|
40
|
+
import "./chunk-3ST2U5IQ.js";
|
|
41
41
|
import "./chunk-IZ3M5OX4.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-7E4V7VX3.js";
|
|
43
43
|
import "./chunk-UZ34JEUK.js";
|
|
44
|
-
import "./chunk-
|
|
44
|
+
import "./chunk-5JIGBIR2.js";
|
|
45
45
|
import "./chunk-BJSWTHRM.js";
|
|
46
46
|
import {
|
|
47
47
|
loadToolPermissionContextFromDisk,
|
|
48
48
|
persistToolPermissionUpdateToDisk
|
|
49
|
-
} from "./chunk-
|
|
50
|
-
import "./chunk-
|
|
49
|
+
} from "./chunk-YYD6PI6O.js";
|
|
50
|
+
import "./chunk-T3XFIIOD.js";
|
|
51
51
|
import {
|
|
52
52
|
applyToolPermissionContextUpdates
|
|
53
53
|
} from "./chunk-UNNVICVU.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-I2GWO4KE.js";
|
|
55
55
|
import {
|
|
56
56
|
getContext
|
|
57
|
-
} from "./chunk-
|
|
58
|
-
import "./chunk-
|
|
57
|
+
} from "./chunk-LGZCGL3K.js";
|
|
58
|
+
import "./chunk-DPM5KKKR.js";
|
|
59
59
|
import {
|
|
60
60
|
enableConfigs
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-NQCJOKDL.js";
|
|
62
62
|
import "./chunk-RQVLBMP7.js";
|
|
63
63
|
import {
|
|
64
64
|
initDebugLogger
|
|
65
|
-
} from "./chunk-
|
|
65
|
+
} from "./chunk-5QJKELHH.js";
|
|
66
66
|
import {
|
|
67
67
|
PRODUCT_COMMAND,
|
|
68
68
|
getPybBaseDir,
|
|
@@ -70,10 +70,10 @@ import {
|
|
|
70
70
|
logError,
|
|
71
71
|
setCwd,
|
|
72
72
|
setOriginalCwd
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-E43DMKOM.js";
|
|
74
74
|
import {
|
|
75
75
|
MACRO
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-6ZCT2WED.js";
|
|
77
77
|
import "./chunk-OUXHGDLH.js";
|
|
78
78
|
import "./chunk-I3J4JYES.js";
|
|
79
79
|
|
|
@@ -2,12 +2,12 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
getModelManager
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-I2GWO4KE.js";
|
|
6
|
+
import "./chunk-NQCJOKDL.js";
|
|
7
7
|
import "./chunk-RQVLBMP7.js";
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-5QJKELHH.js";
|
|
9
|
+
import "./chunk-E43DMKOM.js";
|
|
10
|
+
import "./chunk-6ZCT2WED.js";
|
|
11
11
|
import "./chunk-I3J4JYES.js";
|
|
12
12
|
|
|
13
13
|
// src/entrypoints/cli/agentsValidate.ts
|
|
@@ -344,8 +344,8 @@ async function validateAgentTemplates(args) {
|
|
|
344
344
|
let knownToolNames;
|
|
345
345
|
if (args.checkTools) {
|
|
346
346
|
try {
|
|
347
|
-
const { getTools } = await import("./tools-
|
|
348
|
-
const { getCurrentProjectConfig } = await import("./config-
|
|
347
|
+
const { getTools } = await import("./tools-TCX3OSR5.js");
|
|
348
|
+
const { getCurrentProjectConfig } = await import("./config-LBZUXBBN.js");
|
|
349
349
|
const allTools = await getTools(getCurrentProjectConfig().enableArchitectTool);
|
|
350
350
|
knownToolNames = new Set(allTools.map((t) => t.name));
|
|
351
351
|
} catch {
|
|
@@ -3,49 +3,49 @@ const require = __pybCreateRequire(import.meta.url);
|
|
|
3
3
|
import {
|
|
4
4
|
getSystemPrompt,
|
|
5
5
|
query
|
|
6
|
-
} from "./chunk-
|
|
7
|
-
import "./chunk-
|
|
8
|
-
import "./chunk-
|
|
9
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-LAND3SRL.js";
|
|
7
|
+
import "./chunk-QEI6DBOY.js";
|
|
8
|
+
import "./chunk-ZP3JLALW.js";
|
|
9
|
+
import "./chunk-TZ3IB6EB.js";
|
|
10
10
|
import "./chunk-5P7HBXTD.js";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-HX32BMWC.js";
|
|
12
|
+
import "./chunk-EPRQHLFC.js";
|
|
13
|
+
import "./chunk-CTZOQUUI.js";
|
|
14
|
+
import "./chunk-BOYZAS4R.js";
|
|
15
|
+
import "./chunk-2M2ECQ6E.js";
|
|
16
|
+
import "./chunk-BUAT64GH.js";
|
|
17
17
|
import "./chunk-ERMQRV55.js";
|
|
18
|
-
import "./chunk-
|
|
18
|
+
import "./chunk-3IOLSZZF.js";
|
|
19
19
|
import {
|
|
20
20
|
createUserMessage
|
|
21
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-7BK273D7.js";
|
|
22
22
|
import "./chunk-3DFBSQIT.js";
|
|
23
|
-
import "./chunk-
|
|
23
|
+
import "./chunk-ZLIC4UKS.js";
|
|
24
24
|
import "./chunk-B6IMQJZM.js";
|
|
25
|
-
import "./chunk-
|
|
25
|
+
import "./chunk-OWW53WVT.js";
|
|
26
26
|
import "./chunk-A3BVXXA3.js";
|
|
27
|
-
import "./chunk-
|
|
28
|
-
import "./chunk-
|
|
27
|
+
import "./chunk-3ST2U5IQ.js";
|
|
28
|
+
import "./chunk-5JIGBIR2.js";
|
|
29
29
|
import "./chunk-BJSWTHRM.js";
|
|
30
|
-
import "./chunk-
|
|
31
|
-
import "./chunk-
|
|
30
|
+
import "./chunk-YYD6PI6O.js";
|
|
31
|
+
import "./chunk-T3XFIIOD.js";
|
|
32
32
|
import "./chunk-UNNVICVU.js";
|
|
33
33
|
import {
|
|
34
34
|
getModelManager
|
|
35
|
-
} from "./chunk-
|
|
35
|
+
} from "./chunk-I2GWO4KE.js";
|
|
36
36
|
import {
|
|
37
37
|
getContext
|
|
38
|
-
} from "./chunk-
|
|
39
|
-
import "./chunk-
|
|
40
|
-
import "./chunk-
|
|
38
|
+
} from "./chunk-LGZCGL3K.js";
|
|
39
|
+
import "./chunk-DPM5KKKR.js";
|
|
40
|
+
import "./chunk-NQCJOKDL.js";
|
|
41
41
|
import "./chunk-RQVLBMP7.js";
|
|
42
|
-
import "./chunk-
|
|
42
|
+
import "./chunk-5QJKELHH.js";
|
|
43
43
|
import {
|
|
44
44
|
getMessagesPath,
|
|
45
45
|
overwriteLog,
|
|
46
46
|
setCwd
|
|
47
|
-
} from "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
} from "./chunk-E43DMKOM.js";
|
|
48
|
+
import "./chunk-6ZCT2WED.js";
|
|
49
49
|
import {
|
|
50
50
|
getTotalCost
|
|
51
51
|
} from "./chunk-OUXHGDLH.js";
|
|
@@ -5,9 +5,9 @@ import {
|
|
|
5
5
|
checkAndNotifyUpdate,
|
|
6
6
|
getLatestVersion,
|
|
7
7
|
getUpdateCommandSuggestions
|
|
8
|
-
} from "./chunk-
|
|
9
|
-
import "./chunk-
|
|
10
|
-
import "./chunk-
|
|
8
|
+
} from "./chunk-IAWIWSOQ.js";
|
|
9
|
+
import "./chunk-E43DMKOM.js";
|
|
10
|
+
import "./chunk-6ZCT2WED.js";
|
|
11
11
|
import "./chunk-I3J4JYES.js";
|
|
12
12
|
export {
|
|
13
13
|
assertMinVersion,
|
|
@@ -8,11 +8,11 @@ import {
|
|
|
8
8
|
} from "./chunk-BJSWTHRM.js";
|
|
9
9
|
import {
|
|
10
10
|
debug
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-5QJKELHH.js";
|
|
12
12
|
import {
|
|
13
13
|
getCwd,
|
|
14
14
|
logError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-E43DMKOM.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/agent/loader.ts
|
|
18
18
|
import {
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-BJSWTHRM.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5QJKELHH.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd,
|
|
11
11
|
getPybBaseDir,
|
|
12
12
|
logError
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-E43DMKOM.js";
|
|
14
14
|
|
|
15
15
|
// src/services/plugins/customCommands.ts
|
|
16
16
|
import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
@@ -2,7 +2,7 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
SESSION_ID
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-E43DMKOM.js";
|
|
6
6
|
|
|
7
7
|
// src/utils/log/debugLogger.ts
|
|
8
8
|
import { existsSync, mkdirSync, appendFileSync } from "fs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
3
|
"sources": ["../package.json", "../src/constants/macros.ts"],
|
|
4
|
-
"sourcesContent": ["{\n \"name\": \"pybao-cli\",\n \"version\": \"1.3.
|
|
4
|
+
"sourcesContent": ["{\n \"name\": \"pybao-cli\",\n \"version\": \"1.3.78\",\n \"bin\": {\n \"pyb\": \"cli.js\",\n \"pyb-acp\": \"cli-acp.js\"\n },\n \"engines\": {\n \"node\": \">=20.18.1\"\n },\n \"main\": \"cli.js\",\n \"author\": \"PYB-XC\",\n \"license\": \"MIT\",\n \"description\": \"PYB-CLI - Minimal AI Agent with multi-model support and CLI interface\",\n \"keywords\": [\n \"ai\",\n \"agent\",\n \"minimal\",\n \"claude\"\n ],\n \"homepage\": \"https://github.com/pyb-xc/pyb-ts\",\n \"repository\": {\n \"type\": \"git\",\n \"url\": \"git+https://github.com/pyb-xc/pyb-ts.git\"\n },\n \"bugs\": {\n \"url\": \"https://github.com/pyb-xc/pyb-ts/issues\"\n },\n \"files\": [\n \"cli.js\",\n \"cli-acp.js\",\n \"yoga.wasm\",\n \"dist/**/*\",\n \"scripts/binary-utils.cjs\",\n \"scripts/cli-wrapper.cjs\",\n \"scripts/cli-acp-wrapper.cjs\",\n \"scripts/postinstall.js\",\n \".npmrc\",\n \"resources/**/*\"\n ],\n \"scripts\": {\n \"dev\": \"bun run ./src/entrypoints/cli.tsx --verbose\",\n \"build:npm\": \"bun scripts/build.mjs\",\n \"build\": \"npm run build:npm\",\n \"build:binary\": \"node scripts/build-binary.mjs\",\n \"clean\": \"node scripts/clean.mjs\",\n \"prepublishOnly\": \"npm run build:npm && node scripts/prepublish-check.js\",\n \"postinstall\": \"node scripts/postinstall.js || true\",\n \"format\": \"prettier --write \\\"src/**/*.{ts,tsx,js,jsx,json}\\\" \\\"tests/**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"format:check\": \"prettier --check \\\"src/**/*.{ts,tsx,js,jsx,json}\\\" \\\"tests/**/*.{ts,tsx,js,jsx,json}\\\"\",\n \"lint\": \"eslint . --ext .ts,.tsx,.js --max-warnings 0\",\n \"lint:fix\": \"eslint . --ext .ts,.tsx,.js --fix\",\n \"test\": \"bun test\",\n \"test:unit\": \"bun test tests/unit\",\n \"test:integration\": \"bun test tests/integration\",\n \"test:e2e\": \"bun test tests/e2e\",\n \"typecheck\": \"tsc --noEmit\",\n \"prepare\": \"bun run scripts/install-hooks.mjs\",\n \"publish:dev\": \"bun run scripts/publish-dev.js\",\n \"publish:release\": \"bun run scripts/publish-release.js\",\n \"bench:startup\": \"bun run scripts/bench-startup.mjs\",\n \"parity:reference\": \"bun run scripts/reference-parity-check.mjs\"\n },\n \"dependencies\": {\n \"@anthropic-ai/bedrock-sdk\": \"^0.12.6\",\n \"@anthropic-ai/sdk\": \"^0.39.0\",\n \"@anthropic-ai/vertex-sdk\": \"^0.7.0\",\n \"@astrojs/language-server\": \"2.16.2\",\n \"@aws-sdk/client-bedrock-runtime\": \"3.797.0\",\n \"@commander-js/extra-typings\": \"^13.1.0\",\n \"@inkjs/ui\": \"^2.0.0\",\n \"@modelcontextprotocol/sdk\": \"^1.15.1\",\n \"@prisma/language-server\": \"31.3.4\",\n \"@types/lodash-es\": \"^4.17.12\",\n \"@types/react\": \"^19.1.8\",\n \"@vscode/ripgrep\": \"^1.17.0\",\n \"@vue/language-server\": \"3.2.2\",\n \"ajv\": \"^8.17.1\",\n \"ansi-escapes\": \"^7.0.0\",\n \"bash-language-server\": \"5.6.0\",\n \"chalk\": \"^5.4.1\",\n \"cli-highlight\": \"^2.1.11\",\n \"cli-table3\": \"^0.6.5\",\n \"commander\": \"^13.1.0\",\n \"debug\": \"^4.4.1\",\n \"diff\": \"^7.0.0\",\n \"dockerfile-language-server-nodejs\": \"0.15.0\",\n \"dotenv\": \"^16.6.1\",\n \"env-paths\": \"^3.0.0\",\n \"fflate\": \"^0.8.2\",\n \"figures\": \"^6.1.0\",\n \"glob\": \"^11.0.3\",\n \"graphql-language-service-cli\": \"3.5.0\",\n \"gray-matter\": \"^4.0.3\",\n \"highlight.js\": \"^11.11.1\",\n \"ignore\": \"^7.0.5\",\n \"ink\": \"5.2.1\",\n \"ink-link\": \"^4.1.0\",\n \"ink-select-input\": \"^6.2.0\",\n \"ink-text-input\": \"^6.0.0\",\n \"intelephense\": \"1.16.3\",\n \"js-yaml\": \"^4.1.1\",\n \"lodash-es\": \"^4.17.21\",\n \"lru-cache\": \"^11.1.0\",\n \"marked\": \"^15.0.12\",\n \"minimatch\": \"^10.1.1\",\n \"nanoid\": \"^5.1.5\",\n \"node-fetch\": \"^3.3.2\",\n \"node-html-parser\": \"^7.0.1\",\n \"openai\": \"4.104.0\",\n \"pyright\": \"1.1.408\",\n \"react\": \"18.3.1\",\n \"semver\": \"^7.7.2\",\n \"shell-quote\": \"1.8.3\",\n \"spawn-rx\": \"^5.1.2\",\n \"string-width\": \"^7.2.0\",\n \"strip-ansi\": \"^7.1.0\",\n \"svelte-language-server\": \"0.17.23\",\n \"tsx\": \"^4.20.3\",\n \"turndown\": \"^7.2.0\",\n \"typescript-language-server\": \"5.1.3\",\n \"undici\": \"^7.11.0\",\n \"vscode-jsonrpc\": \"8.2.1\",\n \"vscode-langservers-extracted\": \"4.10.0\",\n \"web-tree-sitter\": \"0.25.10\",\n \"which\": \"^6.0.0\",\n \"wrap-ansi\": \"^9.0.0\",\n \"yaml-language-server\": \"1.19.2\",\n \"zod\": \"^3.25.76\",\n \"zod-to-json-schema\": \"^3.24.6\"\n },\n \"devDependencies\": {\n \"@types/bun\": \"latest\",\n \"@types/jest\": \"^30.0.0\",\n \"@types/node\": \"^24.1.0\",\n \"@types/which\": \"^3.0.4\",\n \"@typescript-eslint/eslint-plugin\": \"^8.50.1\",\n \"@typescript-eslint/parser\": \"^8.50.1\",\n \"bun-types\": \"latest\",\n \"esbuild\": \"^0.25.9\",\n \"eslint\": \"8.57.0\",\n \"eslint-plugin-react-hooks\": \"^7.0.1\",\n \"ink-testing-library\": \"4.0.0\",\n \"prettier\": \"^3.6.2\",\n \"react-devtools-core\": \"^7.0.1\",\n \"tree-sitter-bash\": \"0.25.1\",\n \"tree-sitter-c-sharp\": \"0.23.1\",\n \"tree-sitter-clojure\": \"0.4.0\",\n \"tree-sitter-cpp\": \"0.23.4\",\n \"tree-sitter-go\": \"0.25.0\",\n \"tree-sitter-haskell\": \"0.23.1\",\n \"tree-sitter-java\": \"0.23.5\",\n \"tree-sitter-julia\": \"0.23.1\",\n \"tree-sitter-nix\": \"0.0.2\",\n \"tree-sitter-ocaml\": \"0.24.2\",\n \"tree-sitter-python\": \"0.25.0\",\n \"tree-sitter-rust\": \"0.24.0\",\n \"tree-sitter-scala\": \"0.24.0\",\n \"tree-sitter-swift\": \"0.7.1\",\n \"tree-sitter-typescript\": \"0.23.2\",\n \"typescript\": \"^5.9.2\"\n },\n \"overrides\": {\n \"@aws-sdk/client-bedrock-runtime\": \"3.797.0\",\n \"@smithy/smithy-client\": \"2.5.1\"\n }\n}\n", "import pkg from '../../package.json'\n\nexport const MACRO = {\n VERSION: pkg.version,\n README_URL: 'https://github.com/pyb-xc/pyb-ts#readme',\n PACKAGE_URL: 'pybao-cli',\n ISSUES_EXPLAINER:\n 'report the issue at https://github.com/pyb-xc/pyb-ts/issues',\n}\n"],
|
|
5
5
|
"mappings": "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",
|
|
6
6
|
"names": []
|
|
7
7
|
}
|
|
@@ -448,7 +448,7 @@ function getLastAssistantMessageId(messages) {
|
|
|
448
448
|
|
|
449
449
|
// src/utils/messages/index.ts
|
|
450
450
|
async function processUserInput(input, mode, setToolJSX, context, pastedImages) {
|
|
451
|
-
const impl = await import("./userInput-
|
|
451
|
+
const impl = await import("./userInput-TIOAK2UB.js");
|
|
452
452
|
return impl.processUserInput(input, mode, setToolJSX, context, pastedImages);
|
|
453
453
|
}
|
|
454
454
|
|
|
@@ -5,10 +5,10 @@ import {
|
|
|
5
5
|
} from "./chunk-UZ34JEUK.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-5QJKELHH.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-E43DMKOM.js";
|
|
12
12
|
import {
|
|
13
13
|
__require
|
|
14
14
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -196,6 +196,14 @@ var GenericLspClient = class {
|
|
|
196
196
|
};
|
|
197
197
|
await this.connection.sendNotification("textDocument/didChange", params);
|
|
198
198
|
}
|
|
199
|
+
async didClose(filePath) {
|
|
200
|
+
const params = {
|
|
201
|
+
textDocument: {
|
|
202
|
+
uri: this.normalizeUri(filePath)
|
|
203
|
+
}
|
|
204
|
+
};
|
|
205
|
+
await this.connection.sendNotification("textDocument/didClose", params);
|
|
206
|
+
}
|
|
199
207
|
async waitForReadiness(filePath, timeoutMs = 3e3) {
|
|
200
208
|
const normalizedUri = this.normalizeUri(filePath);
|
|
201
209
|
return new Promise((resolve) => {
|
|
@@ -207,7 +215,7 @@ var GenericLspClient = class {
|
|
|
207
215
|
this.diagnosticEvents.off("diagnostics", handler);
|
|
208
216
|
};
|
|
209
217
|
const handler = (event) => {
|
|
210
|
-
if (event.uri === normalizedUri) {
|
|
218
|
+
if (event.uri === normalizedUri || event.uri.toLowerCase() === normalizedUri.toLowerCase() || decodeURIComponent(event.uri) === decodeURIComponent(normalizedUri)) {
|
|
211
219
|
if (debounceTimer) clearTimeout(debounceTimer);
|
|
212
220
|
debounceTimer = setTimeout(() => {
|
|
213
221
|
cleanup();
|
|
@@ -724,6 +732,7 @@ var LspServerRegistry = class _LspServerRegistry {
|
|
|
724
732
|
|
|
725
733
|
// src/tools/search/LspTool/client/manager.ts
|
|
726
734
|
import { readdir, readFile } from "fs/promises";
|
|
735
|
+
import { existsSync as existsSync2 } from "fs";
|
|
727
736
|
var LspClientManager = class _LspClientManager {
|
|
728
737
|
static instance;
|
|
729
738
|
clients = /* @__PURE__ */ new Map();
|
|
@@ -735,6 +744,23 @@ var LspClientManager = class _LspClientManager {
|
|
|
735
744
|
}
|
|
736
745
|
return _LspClientManager.instance;
|
|
737
746
|
}
|
|
747
|
+
async getClientForFile(filePath) {
|
|
748
|
+
const rootPath = this.findProjectRoot(filePath);
|
|
749
|
+
return this.getClient(filePath, rootPath);
|
|
750
|
+
}
|
|
751
|
+
async getClient(filePath, rootPath = getCwd()) {
|
|
752
|
+
const ext = extname(filePath);
|
|
753
|
+
const languageId = this.getLanguageId(ext);
|
|
754
|
+
const serverPath = LspServerRegistry.getInstance().getServerPath(languageId);
|
|
755
|
+
if (!serverPath) return null;
|
|
756
|
+
const key = `${rootPath}:${languageId}`;
|
|
757
|
+
if (!this.clients.has(key)) {
|
|
758
|
+
const client = new GenericLspClient(serverPath, rootPath);
|
|
759
|
+
await client.initialize();
|
|
760
|
+
this.clients.set(key, client);
|
|
761
|
+
}
|
|
762
|
+
return this.clients.get(key) || null;
|
|
763
|
+
}
|
|
738
764
|
getLanguageId(ext) {
|
|
739
765
|
const map = {
|
|
740
766
|
".ts": "typescript",
|
|
@@ -755,6 +781,30 @@ var LspClientManager = class _LspClientManager {
|
|
|
755
781
|
try {
|
|
756
782
|
const files = await readdir(rootPath, { withFileTypes: true });
|
|
757
783
|
const extensionMap = /* @__PURE__ */ new Map();
|
|
784
|
+
const fileNames = new Set(files.map((f) => f.name));
|
|
785
|
+
if (fileNames.has("tsconfig.json") || fileNames.has("package.json")) {
|
|
786
|
+
if (!files.some((f) => f.isFile() && /\.(ts|tsx|js|jsx)$/.test(f.name))) {
|
|
787
|
+
try {
|
|
788
|
+
const srcFiles = await readdir(join2(rootPath, "src"), { withFileTypes: true });
|
|
789
|
+
const triggerFile = srcFiles.find((f) => f.isFile() && /\.(ts|tsx|js|jsx)$/.test(f.name));
|
|
790
|
+
if (triggerFile) {
|
|
791
|
+
extensionMap.set(extname(triggerFile.name), join2(rootPath, "src", triggerFile.name));
|
|
792
|
+
}
|
|
793
|
+
} catch (e) {
|
|
794
|
+
}
|
|
795
|
+
}
|
|
796
|
+
}
|
|
797
|
+
if (fileNames.has("go.mod")) {
|
|
798
|
+
extensionMap.set(".go", join2(rootPath, "go.mod"));
|
|
799
|
+
if (fileNames.has("main.go")) extensionMap.set(".go", join2(rootPath, "main.go"));
|
|
800
|
+
}
|
|
801
|
+
if (fileNames.has("Cargo.toml")) {
|
|
802
|
+
try {
|
|
803
|
+
if (existsSync2(join2(rootPath, "src", "main.rs"))) extensionMap.set(".rs", join2(rootPath, "src", "main.rs"));
|
|
804
|
+
else if (existsSync2(join2(rootPath, "src", "lib.rs"))) extensionMap.set(".rs", join2(rootPath, "src", "lib.rs"));
|
|
805
|
+
} catch (e) {
|
|
806
|
+
}
|
|
807
|
+
}
|
|
758
808
|
for (const file of files) {
|
|
759
809
|
if (file.isFile()) {
|
|
760
810
|
const ext = extname(file.name);
|
|
@@ -778,37 +828,6 @@ var LspClientManager = class _LspClientManager {
|
|
|
778
828
|
} catch (e) {
|
|
779
829
|
}
|
|
780
830
|
}
|
|
781
|
-
async getClient(filePath, rootPath) {
|
|
782
|
-
const ext = extname(filePath);
|
|
783
|
-
const serverInfo = LspServerRegistry.getInstance().getServerForExtension(ext);
|
|
784
|
-
if (!serverInfo) {
|
|
785
|
-
return null;
|
|
786
|
-
}
|
|
787
|
-
try {
|
|
788
|
-
const ready = await serverInfo.prepare();
|
|
789
|
-
if (!ready) {
|
|
790
|
-
return null;
|
|
791
|
-
}
|
|
792
|
-
} catch (e) {
|
|
793
|
-
return null;
|
|
794
|
-
}
|
|
795
|
-
const cmd = await serverInfo.getCommand(rootPath);
|
|
796
|
-
if (!cmd) {
|
|
797
|
-
return null;
|
|
798
|
-
}
|
|
799
|
-
const key = `${rootPath}:${serverInfo.id}`;
|
|
800
|
-
let client = this.clients.get(key);
|
|
801
|
-
if (!client) {
|
|
802
|
-
client = new GenericLspClient(cmd.command, cmd.args, rootPath, rootPath);
|
|
803
|
-
try {
|
|
804
|
-
await client.initialize();
|
|
805
|
-
this.clients.set(key, client);
|
|
806
|
-
} catch (error) {
|
|
807
|
-
return null;
|
|
808
|
-
}
|
|
809
|
-
}
|
|
810
|
-
return client;
|
|
811
|
-
}
|
|
812
831
|
async shutdownAll() {
|
|
813
832
|
for (const client of this.clients.values()) {
|
|
814
833
|
await client.shutdown();
|
|
@@ -871,6 +890,13 @@ var LspClientManager = class _LspClientManager {
|
|
|
871
890
|
}
|
|
872
891
|
return client.getDiagnostics(filePath);
|
|
873
892
|
}
|
|
893
|
+
// New helper to expose waitForReadiness to clients who only have a manager
|
|
894
|
+
async waitForReadiness(filePath, rootPath = getCwd(), timeoutMs = 2e3) {
|
|
895
|
+
const client = await this.getClientForFile(filePath);
|
|
896
|
+
if (client) {
|
|
897
|
+
await client.waitForReadiness(filePath, timeoutMs);
|
|
898
|
+
}
|
|
899
|
+
}
|
|
874
900
|
};
|
|
875
901
|
|
|
876
902
|
export {
|