pybao-cli 1.3.97 → 1.3.98
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-X3SUAQOK.js +47 -0
- package/dist/{acp-Y5GVEAK5.js → acp-KGDBJEZM.js} +30 -30
- package/dist/{agentsValidate-HVG4G32H.js → agentsValidate-44ZL6CU7.js} +7 -7
- package/dist/{ask-Q4D437ZY.js → ask-UQQJRBXC.js} +31 -31
- package/dist/{autoUpdater-2HZ5MXSY.js → autoUpdater-VLX3NCAD.js} +3 -3
- package/dist/{chunk-FMZTGW27.js → chunk-2QRVX2CJ.js} +4 -4
- package/dist/{chunk-7ZK32QRX.js → chunk-3CM4GHNR.js} +2 -2
- package/dist/{chunk-T7MGCO5Q.js → chunk-3EP5IIWI.js} +2 -2
- package/dist/{chunk-VCS4L3LA.js → chunk-4DMLFQ6M.js} +2 -2
- package/dist/{chunk-W7CPW6S2.js → chunk-4HNMLCPZ.js} +3 -3
- package/dist/{chunk-SHKXEYZX.js → chunk-54D3G6Q6.js} +162 -53
- package/dist/chunk-54D3G6Q6.js.map +7 -0
- package/dist/{chunk-4C2BJ5TH.js → chunk-55V32BQI.js} +488 -696
- package/dist/chunk-55V32BQI.js.map +7 -0
- package/dist/{chunk-GW4FHFLN.js → chunk-66T64NT6.js} +1 -1
- package/dist/{chunk-LGG56SIC.js → chunk-B5Q3NPPE.js} +1 -1
- package/dist/{chunk-T6MZIN3Y.js → chunk-BNRAPYWK.js} +1 -1
- package/dist/{chunk-GVQW5V5E.js → chunk-EC7O274M.js} +2 -2
- package/dist/{chunk-HZQ5D4KE.js → chunk-EL3VSBLN.js} +371 -500
- package/dist/chunk-EL3VSBLN.js.map +7 -0
- package/dist/{chunk-BNTZKC47.js → chunk-FKCPEPP7.js} +2 -2
- package/dist/{chunk-D7EHET2A.js → chunk-FYYSOZC7.js} +3 -3
- package/dist/{chunk-DFGDXB5I.js → chunk-GGO6HMMS.js} +2 -2
- package/dist/{chunk-4UESJIJZ.js → chunk-K3BD4OVM.js} +1 -1
- package/dist/{chunk-JQ7U4FNJ.js → chunk-KD4UN4E7.js} +3 -3
- package/dist/{chunk-IGEQR5ET.js → chunk-LY56HBFK.js} +3 -3
- package/dist/{chunk-WHWTXVZ4.js → chunk-M2D5CMNE.js} +1 -1
- package/dist/{chunk-VBDYRFAI.js → chunk-MNKXUCNA.js} +3 -6
- package/dist/chunk-MNKXUCNA.js.map +7 -0
- package/dist/{chunk-IBMWS4VP.js → chunk-QYHEP5T2.js} +1 -1
- package/dist/{chunk-TQAQR7CB.js → chunk-R7GBUD66.js} +1 -1
- package/dist/{chunk-CJ5J54UV.js → chunk-RGOG2FCR.js} +3 -3
- package/dist/{chunk-T4CDNQDK.js → chunk-S5FTUHPH.js} +4 -7
- package/dist/chunk-S5FTUHPH.js.map +7 -0
- package/dist/{chunk-X7NKBF4S.js → chunk-SPX4Q5Z5.js} +788 -158
- package/dist/chunk-SPX4Q5Z5.js.map +7 -0
- package/dist/{chunk-DSHUCMWX.js → chunk-TXBPCCRE.js} +1 -1
- package/dist/{chunk-DSHUCMWX.js.map → chunk-TXBPCCRE.js.map} +1 -1
- package/dist/{chunk-ILVR3OKO.js → chunk-WHJRTHTN.js} +1 -1
- package/dist/{chunk-SRPG24JR.js → chunk-XTA2HSUL.js} +9 -10
- package/dist/{chunk-SRPG24JR.js.map → chunk-XTA2HSUL.js.map} +2 -2
- package/dist/{chunk-5SWRWOXZ.js → chunk-ZG5IWBYT.js} +3 -3
- package/dist/{chunk-VU4GCLM2.js → chunk-ZPVUGGYA.js} +2 -2
- package/dist/{cli-YWSRHJXF.js → cli-FIJNCN67.js} +88 -88
- package/dist/commands-ZNF6VSDT.js +51 -0
- package/dist/{config-XEZZSNSO.js → config-3I5YMAFL.js} +4 -4
- package/dist/{context-O7XDPBZM.js → context-5X2SORJY.js} +12 -9
- package/dist/{customCommands-T227ND56.js → customCommands-5SPC62ZC.js} +4 -4
- package/dist/{env-LGLECBD2.js → env-57IO6RNL.js} +2 -2
- package/dist/{file-LRWOIEO2.js → file-NKD5PPBY.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-KH33MHA2.js → llm-LYDFVXMB.js} +32 -32
- package/dist/{llmLazy-QDJLCLFB.js → llmLazy-DFEN7PAI.js} +1 -1
- package/dist/{loader-DOLDAFSG.js → loader-2GIAZ3HL.js} +4 -4
- package/dist/{lsp-F2AYEHJW.js → lsp-W3AXFJZC.js} +10 -6
- package/dist/{lspAnchor-LDTVHYPK.js → lspAnchor-3XTM2QPQ.js} +6 -6
- package/dist/{mcp-3SENV5JM.js → mcp-JQIJRSYG.js} +7 -7
- package/dist/{mentionProcessor-AES6QJFQ.js → mentionProcessor-NZHHCLSE.js} +5 -5
- package/dist/{messages-A77FBKUD.js → messages-KF3S4HA4.js} +1 -1
- package/dist/{model-T5FSSEGT.js → model-W2UGEFKK.js} +5 -5
- package/dist/{openai-4Z5HQAPJ.js → openai-PH32RG3H.js} +5 -5
- package/dist/{outputStyles-NPZ5JCX4.js → outputStyles-CHW6K32O.js} +4 -4
- package/dist/{pluginRuntime-ESATQIVZ.js → pluginRuntime-S4DHYH3R.js} +6 -6
- package/dist/{pluginValidation-ZIDSORKU.js → pluginValidation-Z5BRZ656.js} +6 -6
- package/dist/prompts-EYJMD23J.js +53 -0
- package/dist/{pybAgentSessionLoad-INUFKXJY.js → pybAgentSessionLoad-PRWBEGFD.js} +4 -4
- package/dist/{pybAgentSessionResume-QW7NW3GM.js → pybAgentSessionResume-B5TXVDBS.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-GKZPRQGC.js → pybAgentStreamJsonSession-WABCNXJI.js} +1 -1
- package/dist/{pybHooks-HD3YL2EO.js → pybHooks-LBVVFRME.js} +4 -4
- package/dist/query-ENVGHGXY.js +55 -0
- package/dist/{registry-VYHW665M.js → registry-DUUU5OUB.js} +5 -5
- package/dist/{ripgrep-RUMV7DUX.js → ripgrep-I3NSKTZL.js} +3 -3
- package/dist/{skillMarketplace-TEDBVTRN.js → skillMarketplace-TDHDU5LH.js} +3 -3
- package/dist/{state-BESFSMYW.js → state-D2YJSF7H.js} +2 -2
- package/dist/{theme-O5XJ5B2X.js → theme-CDRFD75G.js} +5 -5
- package/dist/{toolPermissionSettings-N4VMBCRF.js → toolPermissionSettings-OLOBSKXT.js} +6 -6
- package/dist/tools-RCVS7632.js +52 -0
- package/dist/{userInput-65GMTCNY.js → userInput-4S25MAFS.js} +31 -31
- package/package.json +1 -1
- package/dist/REPL-4UQT2JYD.js +0 -47
- package/dist/chunk-4C2BJ5TH.js.map +0 -7
- package/dist/chunk-HZQ5D4KE.js.map +0 -7
- package/dist/chunk-SHKXEYZX.js.map +0 -7
- package/dist/chunk-T4CDNQDK.js.map +0 -7
- package/dist/chunk-VBDYRFAI.js.map +0 -7
- package/dist/chunk-X7NKBF4S.js.map +0 -7
- package/dist/commands-KRK3MO6Q.js +0 -51
- package/dist/prompts-VSJKN5BB.js +0 -53
- package/dist/query-F5YSMI7D.js +0 -61
- package/dist/tools-V5NSQILS.js +0 -52
- /package/dist/{REPL-4UQT2JYD.js.map → REPL-X3SUAQOK.js.map} +0 -0
- /package/dist/{acp-Y5GVEAK5.js.map → acp-KGDBJEZM.js.map} +0 -0
- /package/dist/{agentsValidate-HVG4G32H.js.map → agentsValidate-44ZL6CU7.js.map} +0 -0
- /package/dist/{ask-Q4D437ZY.js.map → ask-UQQJRBXC.js.map} +0 -0
- /package/dist/{autoUpdater-2HZ5MXSY.js.map → autoUpdater-VLX3NCAD.js.map} +0 -0
- /package/dist/{chunk-FMZTGW27.js.map → chunk-2QRVX2CJ.js.map} +0 -0
- /package/dist/{chunk-7ZK32QRX.js.map → chunk-3CM4GHNR.js.map} +0 -0
- /package/dist/{chunk-T7MGCO5Q.js.map → chunk-3EP5IIWI.js.map} +0 -0
- /package/dist/{chunk-VCS4L3LA.js.map → chunk-4DMLFQ6M.js.map} +0 -0
- /package/dist/{chunk-W7CPW6S2.js.map → chunk-4HNMLCPZ.js.map} +0 -0
- /package/dist/{chunk-GW4FHFLN.js.map → chunk-66T64NT6.js.map} +0 -0
- /package/dist/{chunk-LGG56SIC.js.map → chunk-B5Q3NPPE.js.map} +0 -0
- /package/dist/{chunk-T6MZIN3Y.js.map → chunk-BNRAPYWK.js.map} +0 -0
- /package/dist/{chunk-GVQW5V5E.js.map → chunk-EC7O274M.js.map} +0 -0
- /package/dist/{chunk-BNTZKC47.js.map → chunk-FKCPEPP7.js.map} +0 -0
- /package/dist/{chunk-D7EHET2A.js.map → chunk-FYYSOZC7.js.map} +0 -0
- /package/dist/{chunk-DFGDXB5I.js.map → chunk-GGO6HMMS.js.map} +0 -0
- /package/dist/{chunk-4UESJIJZ.js.map → chunk-K3BD4OVM.js.map} +0 -0
- /package/dist/{chunk-JQ7U4FNJ.js.map → chunk-KD4UN4E7.js.map} +0 -0
- /package/dist/{chunk-IGEQR5ET.js.map → chunk-LY56HBFK.js.map} +0 -0
- /package/dist/{chunk-WHWTXVZ4.js.map → chunk-M2D5CMNE.js.map} +0 -0
- /package/dist/{chunk-IBMWS4VP.js.map → chunk-QYHEP5T2.js.map} +0 -0
- /package/dist/{chunk-TQAQR7CB.js.map → chunk-R7GBUD66.js.map} +0 -0
- /package/dist/{chunk-CJ5J54UV.js.map → chunk-RGOG2FCR.js.map} +0 -0
- /package/dist/{chunk-ILVR3OKO.js.map → chunk-WHJRTHTN.js.map} +0 -0
- /package/dist/{chunk-5SWRWOXZ.js.map → chunk-ZG5IWBYT.js.map} +0 -0
- /package/dist/{chunk-VU4GCLM2.js.map → chunk-ZPVUGGYA.js.map} +0 -0
- /package/dist/{cli-YWSRHJXF.js.map → cli-FIJNCN67.js.map} +0 -0
- /package/dist/{commands-KRK3MO6Q.js.map → commands-ZNF6VSDT.js.map} +0 -0
- /package/dist/{config-XEZZSNSO.js.map → config-3I5YMAFL.js.map} +0 -0
- /package/dist/{context-O7XDPBZM.js.map → context-5X2SORJY.js.map} +0 -0
- /package/dist/{customCommands-T227ND56.js.map → customCommands-5SPC62ZC.js.map} +0 -0
- /package/dist/{env-LGLECBD2.js.map → env-57IO6RNL.js.map} +0 -0
- /package/dist/{file-LRWOIEO2.js.map → file-NKD5PPBY.js.map} +0 -0
- /package/dist/{llm-KH33MHA2.js.map → llm-LYDFVXMB.js.map} +0 -0
- /package/dist/{llmLazy-QDJLCLFB.js.map → llmLazy-DFEN7PAI.js.map} +0 -0
- /package/dist/{loader-DOLDAFSG.js.map → loader-2GIAZ3HL.js.map} +0 -0
- /package/dist/{lsp-F2AYEHJW.js.map → lsp-W3AXFJZC.js.map} +0 -0
- /package/dist/{lspAnchor-LDTVHYPK.js.map → lspAnchor-3XTM2QPQ.js.map} +0 -0
- /package/dist/{mcp-3SENV5JM.js.map → mcp-JQIJRSYG.js.map} +0 -0
- /package/dist/{mentionProcessor-AES6QJFQ.js.map → mentionProcessor-NZHHCLSE.js.map} +0 -0
- /package/dist/{messages-A77FBKUD.js.map → messages-KF3S4HA4.js.map} +0 -0
- /package/dist/{model-T5FSSEGT.js.map → model-W2UGEFKK.js.map} +0 -0
- /package/dist/{openai-4Z5HQAPJ.js.map → openai-PH32RG3H.js.map} +0 -0
- /package/dist/{outputStyles-NPZ5JCX4.js.map → outputStyles-CHW6K32O.js.map} +0 -0
- /package/dist/{pluginRuntime-ESATQIVZ.js.map → pluginRuntime-S4DHYH3R.js.map} +0 -0
- /package/dist/{pluginValidation-ZIDSORKU.js.map → pluginValidation-Z5BRZ656.js.map} +0 -0
- /package/dist/{prompts-VSJKN5BB.js.map → prompts-EYJMD23J.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-INUFKXJY.js.map → pybAgentSessionLoad-PRWBEGFD.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-QW7NW3GM.js.map → pybAgentSessionResume-B5TXVDBS.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-GKZPRQGC.js.map → pybAgentStreamJsonSession-WABCNXJI.js.map} +0 -0
- /package/dist/{pybHooks-HD3YL2EO.js.map → pybHooks-LBVVFRME.js.map} +0 -0
- /package/dist/{query-F5YSMI7D.js.map → query-ENVGHGXY.js.map} +0 -0
- /package/dist/{registry-VYHW665M.js.map → registry-DUUU5OUB.js.map} +0 -0
- /package/dist/{ripgrep-RUMV7DUX.js.map → ripgrep-I3NSKTZL.js.map} +0 -0
- /package/dist/{skillMarketplace-TEDBVTRN.js.map → skillMarketplace-TDHDU5LH.js.map} +0 -0
- /package/dist/{state-BESFSMYW.js.map → state-D2YJSF7H.js.map} +0 -0
- /package/dist/{theme-O5XJ5B2X.js.map → theme-CDRFD75G.js.map} +0 -0
- /package/dist/{toolPermissionSettings-N4VMBCRF.js.map → toolPermissionSettings-OLOBSKXT.js.map} +0 -0
- /package/dist/{tools-V5NSQILS.js.map → tools-RCVS7632.js.map} +0 -0
- /package/dist/{userInput-65GMTCNY.js.map → userInput-4S25MAFS.js.map} +0 -0
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { createRequire as __pybCreateRequire } from "node:module";
|
|
2
|
+
const require = __pybCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
REPL
|
|
5
|
+
} from "./chunk-EL3VSBLN.js";
|
|
6
|
+
import "./chunk-4HNMLCPZ.js";
|
|
7
|
+
import "./chunk-B5Q3NPPE.js";
|
|
8
|
+
import "./chunk-R7GBUD66.js";
|
|
9
|
+
import "./chunk-EC7O274M.js";
|
|
10
|
+
import "./chunk-5P7HBXTD.js";
|
|
11
|
+
import "./chunk-FYYSOZC7.js";
|
|
12
|
+
import "./chunk-3CM4GHNR.js";
|
|
13
|
+
import "./chunk-4DMLFQ6M.js";
|
|
14
|
+
import "./chunk-2QRVX2CJ.js";
|
|
15
|
+
import "./chunk-XTA2HSUL.js";
|
|
16
|
+
import "./chunk-M2D5CMNE.js";
|
|
17
|
+
import "./chunk-LY56HBFK.js";
|
|
18
|
+
import "./chunk-UNNVICVU.js";
|
|
19
|
+
import "./chunk-GGO6HMMS.js";
|
|
20
|
+
import "./chunk-ERMQRV55.js";
|
|
21
|
+
import "./chunk-FKCPEPP7.js";
|
|
22
|
+
import "./chunk-A3BVXXA3.js";
|
|
23
|
+
import "./chunk-WHJRTHTN.js";
|
|
24
|
+
import "./chunk-3DFBSQIT.js";
|
|
25
|
+
import "./chunk-B6IMQJZM.js";
|
|
26
|
+
import "./chunk-OUXHGDLH.js";
|
|
27
|
+
import "./chunk-3EP5IIWI.js";
|
|
28
|
+
import "./chunk-QWIBSCDN.js";
|
|
29
|
+
import "./chunk-SPX4Q5Z5.js";
|
|
30
|
+
import "./chunk-RGOG2FCR.js";
|
|
31
|
+
import "./chunk-66T64NT6.js";
|
|
32
|
+
import "./chunk-UZ34JEUK.js";
|
|
33
|
+
import "./chunk-ZPVUGGYA.js";
|
|
34
|
+
import "./chunk-BJSWTHRM.js";
|
|
35
|
+
import "./chunk-KD4UN4E7.js";
|
|
36
|
+
import "./chunk-54D3G6Q6.js";
|
|
37
|
+
import "./chunk-S5FTUHPH.js";
|
|
38
|
+
import "./chunk-BNRAPYWK.js";
|
|
39
|
+
import "./chunk-MNKXUCNA.js";
|
|
40
|
+
import "./chunk-RQVLBMP7.js";
|
|
41
|
+
import "./chunk-QYHEP5T2.js";
|
|
42
|
+
import "./chunk-K3BD4OVM.js";
|
|
43
|
+
import "./chunk-TXBPCCRE.js";
|
|
44
|
+
import "./chunk-I3J4JYES.js";
|
|
45
|
+
export {
|
|
46
|
+
REPL
|
|
47
|
+
};
|
|
@@ -6,65 +6,66 @@ import {
|
|
|
6
6
|
} from "./chunk-MWPFU2KU.js";
|
|
7
7
|
import {
|
|
8
8
|
getTools
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-55V32BQI.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-
|
|
20
|
-
import "./chunk-
|
|
16
|
+
} from "./chunk-EL3VSBLN.js";
|
|
17
|
+
import "./chunk-4HNMLCPZ.js";
|
|
18
|
+
import "./chunk-B5Q3NPPE.js";
|
|
19
|
+
import "./chunk-R7GBUD66.js";
|
|
20
|
+
import "./chunk-EC7O274M.js";
|
|
21
21
|
import "./chunk-5P7HBXTD.js";
|
|
22
|
-
import "./chunk-
|
|
23
|
-
import "./chunk-
|
|
24
|
-
import "./chunk-
|
|
25
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-FYYSOZC7.js";
|
|
23
|
+
import "./chunk-3CM4GHNR.js";
|
|
24
|
+
import "./chunk-4DMLFQ6M.js";
|
|
25
|
+
import "./chunk-2QRVX2CJ.js";
|
|
26
26
|
import {
|
|
27
27
|
getClients
|
|
28
|
-
} from "./chunk-
|
|
29
|
-
import "./chunk-
|
|
28
|
+
} from "./chunk-XTA2HSUL.js";
|
|
29
|
+
import "./chunk-M2D5CMNE.js";
|
|
30
30
|
import {
|
|
31
31
|
loadToolPermissionContextFromDisk,
|
|
32
32
|
persistToolPermissionUpdateToDisk
|
|
33
|
-
} from "./chunk-
|
|
33
|
+
} from "./chunk-LY56HBFK.js";
|
|
34
34
|
import {
|
|
35
35
|
applyToolPermissionContextUpdates
|
|
36
36
|
} from "./chunk-UNNVICVU.js";
|
|
37
|
-
import "./chunk-
|
|
37
|
+
import "./chunk-GGO6HMMS.js";
|
|
38
38
|
import "./chunk-ERMQRV55.js";
|
|
39
|
-
import "./chunk-
|
|
39
|
+
import "./chunk-FKCPEPP7.js";
|
|
40
40
|
import "./chunk-A3BVXXA3.js";
|
|
41
41
|
import {
|
|
42
42
|
createAssistantMessage,
|
|
43
43
|
createUserMessage
|
|
44
|
-
} from "./chunk-
|
|
44
|
+
} from "./chunk-WHJRTHTN.js";
|
|
45
45
|
import "./chunk-3DFBSQIT.js";
|
|
46
46
|
import "./chunk-B6IMQJZM.js";
|
|
47
|
-
import "./chunk-
|
|
48
|
-
import "./chunk-
|
|
47
|
+
import "./chunk-OUXHGDLH.js";
|
|
48
|
+
import "./chunk-3EP5IIWI.js";
|
|
49
49
|
import "./chunk-QWIBSCDN.js";
|
|
50
|
-
import "./chunk-
|
|
51
|
-
import "./chunk-
|
|
52
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-SPX4Q5Z5.js";
|
|
51
|
+
import "./chunk-RGOG2FCR.js";
|
|
52
|
+
import "./chunk-66T64NT6.js";
|
|
53
53
|
import "./chunk-UZ34JEUK.js";
|
|
54
|
-
import "./chunk-
|
|
54
|
+
import "./chunk-ZPVUGGYA.js";
|
|
55
55
|
import "./chunk-BJSWTHRM.js";
|
|
56
|
-
import "./chunk-
|
|
56
|
+
import "./chunk-KD4UN4E7.js";
|
|
57
57
|
import {
|
|
58
58
|
getContext
|
|
59
|
-
} from "./chunk-
|
|
60
|
-
import "./chunk-
|
|
59
|
+
} from "./chunk-54D3G6Q6.js";
|
|
60
|
+
import "./chunk-S5FTUHPH.js";
|
|
61
|
+
import "./chunk-BNRAPYWK.js";
|
|
61
62
|
import {
|
|
62
63
|
enableConfigs
|
|
63
|
-
} from "./chunk-
|
|
64
|
+
} from "./chunk-MNKXUCNA.js";
|
|
64
65
|
import "./chunk-RQVLBMP7.js";
|
|
65
66
|
import {
|
|
66
67
|
initDebugLogger
|
|
67
|
-
} from "./chunk-
|
|
68
|
+
} from "./chunk-QYHEP5T2.js";
|
|
68
69
|
import {
|
|
69
70
|
PRODUCT_COMMAND,
|
|
70
71
|
initSentry,
|
|
@@ -72,11 +73,10 @@ import {
|
|
|
72
73
|
resolveXdgDataPath,
|
|
73
74
|
setCwd,
|
|
74
75
|
setOriginalCwd
|
|
75
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-K3BD4OVM.js";
|
|
76
77
|
import {
|
|
77
78
|
MACRO
|
|
78
|
-
} from "./chunk-
|
|
79
|
-
import "./chunk-OUXHGDLH.js";
|
|
79
|
+
} from "./chunk-TXBPCCRE.js";
|
|
80
80
|
import "./chunk-I3J4JYES.js";
|
|
81
81
|
|
|
82
82
|
// src/acp/jsonrpc.ts
|
|
@@ -2,14 +2,14 @@ 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-KD4UN4E7.js";
|
|
6
|
+
import "./chunk-MNKXUCNA.js";
|
|
7
7
|
import "./chunk-RQVLBMP7.js";
|
|
8
|
-
import "./chunk-
|
|
8
|
+
import "./chunk-QYHEP5T2.js";
|
|
9
9
|
import {
|
|
10
10
|
getXdgConfigDir
|
|
11
|
-
} from "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
} from "./chunk-K3BD4OVM.js";
|
|
12
|
+
import "./chunk-TXBPCCRE.js";
|
|
13
13
|
import "./chunk-I3J4JYES.js";
|
|
14
14
|
|
|
15
15
|
// src/entrypoints/cli/agentsValidate.ts
|
|
@@ -346,8 +346,8 @@ async function validateAgentTemplates(args) {
|
|
|
346
346
|
let knownToolNames;
|
|
347
347
|
if (args.checkTools) {
|
|
348
348
|
try {
|
|
349
|
-
const { getTools } = await import("./tools-
|
|
350
|
-
const { getCurrentProjectConfig } = await import("./config-
|
|
349
|
+
const { getTools } = await import("./tools-RCVS7632.js");
|
|
350
|
+
const { getCurrentProjectConfig } = await import("./config-3I5YMAFL.js");
|
|
351
351
|
const allTools = await getTools(getCurrentProjectConfig().enableArchitectTool);
|
|
352
352
|
knownToolNames = new Set(allTools.map((t) => t.name));
|
|
353
353
|
} catch {
|
|
@@ -3,57 +3,57 @@ 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-
|
|
10
|
-
import "./chunk-
|
|
6
|
+
} from "./chunk-EL3VSBLN.js";
|
|
7
|
+
import "./chunk-4HNMLCPZ.js";
|
|
8
|
+
import "./chunk-B5Q3NPPE.js";
|
|
9
|
+
import "./chunk-R7GBUD66.js";
|
|
10
|
+
import "./chunk-EC7O274M.js";
|
|
11
11
|
import "./chunk-5P7HBXTD.js";
|
|
12
|
-
import "./chunk-
|
|
13
|
-
import "./chunk-
|
|
14
|
-
import "./chunk-
|
|
15
|
-
import "./chunk-
|
|
16
|
-
import "./chunk-
|
|
17
|
-
import "./chunk-
|
|
18
|
-
import "./chunk-
|
|
12
|
+
import "./chunk-FYYSOZC7.js";
|
|
13
|
+
import "./chunk-3CM4GHNR.js";
|
|
14
|
+
import "./chunk-4DMLFQ6M.js";
|
|
15
|
+
import "./chunk-2QRVX2CJ.js";
|
|
16
|
+
import "./chunk-XTA2HSUL.js";
|
|
17
|
+
import "./chunk-M2D5CMNE.js";
|
|
18
|
+
import "./chunk-LY56HBFK.js";
|
|
19
19
|
import "./chunk-UNNVICVU.js";
|
|
20
|
-
import "./chunk-
|
|
20
|
+
import "./chunk-GGO6HMMS.js";
|
|
21
21
|
import "./chunk-ERMQRV55.js";
|
|
22
|
-
import "./chunk-
|
|
22
|
+
import "./chunk-FKCPEPP7.js";
|
|
23
23
|
import "./chunk-A3BVXXA3.js";
|
|
24
24
|
import {
|
|
25
25
|
createUserMessage
|
|
26
|
-
} from "./chunk-
|
|
26
|
+
} from "./chunk-WHJRTHTN.js";
|
|
27
27
|
import "./chunk-3DFBSQIT.js";
|
|
28
28
|
import "./chunk-B6IMQJZM.js";
|
|
29
|
-
import
|
|
30
|
-
|
|
29
|
+
import {
|
|
30
|
+
getTotalCost
|
|
31
|
+
} from "./chunk-OUXHGDLH.js";
|
|
32
|
+
import "./chunk-3EP5IIWI.js";
|
|
31
33
|
import "./chunk-QWIBSCDN.js";
|
|
32
|
-
import "./chunk-
|
|
33
|
-
import "./chunk-
|
|
34
|
-
import "./chunk-
|
|
34
|
+
import "./chunk-SPX4Q5Z5.js";
|
|
35
|
+
import "./chunk-RGOG2FCR.js";
|
|
36
|
+
import "./chunk-66T64NT6.js";
|
|
35
37
|
import "./chunk-UZ34JEUK.js";
|
|
36
|
-
import "./chunk-
|
|
38
|
+
import "./chunk-ZPVUGGYA.js";
|
|
37
39
|
import "./chunk-BJSWTHRM.js";
|
|
38
40
|
import {
|
|
39
41
|
getModelManager
|
|
40
|
-
} from "./chunk-
|
|
42
|
+
} from "./chunk-KD4UN4E7.js";
|
|
41
43
|
import {
|
|
42
44
|
getContext
|
|
43
|
-
} from "./chunk-
|
|
44
|
-
import "./chunk-
|
|
45
|
-
import "./chunk-
|
|
45
|
+
} from "./chunk-54D3G6Q6.js";
|
|
46
|
+
import "./chunk-S5FTUHPH.js";
|
|
47
|
+
import "./chunk-BNRAPYWK.js";
|
|
48
|
+
import "./chunk-MNKXUCNA.js";
|
|
46
49
|
import "./chunk-RQVLBMP7.js";
|
|
47
|
-
import "./chunk-
|
|
50
|
+
import "./chunk-QYHEP5T2.js";
|
|
48
51
|
import {
|
|
49
52
|
getMessagesPath,
|
|
50
53
|
overwriteLog,
|
|
51
54
|
setCwd
|
|
52
|
-
} from "./chunk-
|
|
53
|
-
import "./chunk-
|
|
54
|
-
import {
|
|
55
|
-
getTotalCost
|
|
56
|
-
} from "./chunk-OUXHGDLH.js";
|
|
55
|
+
} from "./chunk-K3BD4OVM.js";
|
|
56
|
+
import "./chunk-TXBPCCRE.js";
|
|
57
57
|
import "./chunk-I3J4JYES.js";
|
|
58
58
|
|
|
59
59
|
// src/app/ask.ts
|
|
@@ -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-ZG5IWBYT.js";
|
|
9
|
+
import "./chunk-K3BD4OVM.js";
|
|
10
|
+
import "./chunk-TXBPCCRE.js";
|
|
11
11
|
import "./chunk-I3J4JYES.js";
|
|
12
12
|
export {
|
|
13
13
|
assertMinVersion,
|
|
@@ -3,7 +3,7 @@ const require = __pybCreateRequire(import.meta.url);
|
|
|
3
3
|
|
|
4
4
|
// src/services/ai/llmLazy.ts
|
|
5
5
|
async function queryLLM(messages, systemPrompt, maxThinkingTokens, tools, signal, options) {
|
|
6
|
-
const { queryLLM: inner } = await import("./llm-
|
|
6
|
+
const { queryLLM: inner } = await import("./llm-LYDFVXMB.js");
|
|
7
7
|
return inner(
|
|
8
8
|
messages,
|
|
9
9
|
systemPrompt,
|
|
@@ -14,15 +14,15 @@ async function queryLLM(messages, systemPrompt, maxThinkingTokens, tools, signal
|
|
|
14
14
|
);
|
|
15
15
|
}
|
|
16
16
|
async function queryQuick(args) {
|
|
17
|
-
const { queryQuick: inner } = await import("./llm-
|
|
17
|
+
const { queryQuick: inner } = await import("./llm-LYDFVXMB.js");
|
|
18
18
|
return inner(args);
|
|
19
19
|
}
|
|
20
20
|
async function verifyApiKey(apiKey, baseURL, provider) {
|
|
21
|
-
const { verifyApiKey: inner } = await import("./llm-
|
|
21
|
+
const { verifyApiKey: inner } = await import("./llm-LYDFVXMB.js");
|
|
22
22
|
return inner(apiKey, baseURL, provider);
|
|
23
23
|
}
|
|
24
24
|
async function fetchAnthropicModels(apiKey, baseURL) {
|
|
25
|
-
const { fetchAnthropicModels: inner } = await import("./llm-
|
|
25
|
+
const { fetchAnthropicModels: inner } = await import("./llm-LYDFVXMB.js");
|
|
26
26
|
return inner(apiKey, baseURL);
|
|
27
27
|
}
|
|
28
28
|
|
|
@@ -7,14 +7,14 @@ import {
|
|
|
7
7
|
getSettingsFileCandidates,
|
|
8
8
|
loadSettingsWithLegacyFallback,
|
|
9
9
|
saveSettingsToPrimaryAndSyncLegacy
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-66T64NT6.js";
|
|
11
11
|
import {
|
|
12
12
|
getSessionPlugins
|
|
13
13
|
} from "./chunk-BJSWTHRM.js";
|
|
14
14
|
import {
|
|
15
15
|
getCwd,
|
|
16
16
|
getXdgConfigDir
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-K3BD4OVM.js";
|
|
18
18
|
|
|
19
19
|
// src/services/ui/outputStyles.ts
|
|
20
20
|
import figures from "figures";
|
|
@@ -2,11 +2,11 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
listAllContentFiles
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-S5FTUHPH.js";
|
|
6
6
|
import {
|
|
7
7
|
getCwd,
|
|
8
8
|
logError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-K3BD4OVM.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/fs/file.ts
|
|
12
12
|
import {
|
|
@@ -6,12 +6,12 @@ import {
|
|
|
6
6
|
} from "./chunk-ERMQRV55.js";
|
|
7
7
|
import {
|
|
8
8
|
getGlobalConfig
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-MNKXUCNA.js";
|
|
10
10
|
import {
|
|
11
11
|
debug,
|
|
12
12
|
getCurrentRequest,
|
|
13
13
|
logAPIError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-QYHEP5T2.js";
|
|
15
15
|
|
|
16
16
|
// src/services/ai/openai.ts
|
|
17
17
|
import { ProxyAgent, fetch } from "undici";
|
|
@@ -2,13 +2,13 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
MarketplaceManifestSchema
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-M2D5CMNE.js";
|
|
6
6
|
import {
|
|
7
7
|
parseFrontmatter
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-ZPVUGGYA.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-K3BD4OVM.js";
|
|
12
12
|
|
|
13
13
|
// src/services/plugins/pluginValidation.ts
|
|
14
14
|
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
@@ -1,21 +1,24 @@
|
|
|
1
1
|
import { createRequire as __pybCreateRequire } from "node:module";
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
|
+
import {
|
|
4
|
+
ripGrepWithStatus
|
|
5
|
+
} from "./chunk-S5FTUHPH.js";
|
|
3
6
|
import {
|
|
4
7
|
getCurrentProjectConfig,
|
|
5
8
|
getGlobalConfig,
|
|
6
9
|
getOrCreateUserID,
|
|
7
10
|
saveCurrentProjectConfig
|
|
8
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-MNKXUCNA.js";
|
|
9
12
|
import {
|
|
10
13
|
SESSION_ID,
|
|
11
14
|
env,
|
|
12
15
|
execFileNoThrow,
|
|
13
16
|
getCwd,
|
|
14
17
|
logError
|
|
15
|
-
} from "./chunk-
|
|
18
|
+
} from "./chunk-K3BD4OVM.js";
|
|
16
19
|
import {
|
|
17
20
|
MACRO
|
|
18
|
-
} from "./chunk-
|
|
21
|
+
} from "./chunk-TXBPCCRE.js";
|
|
19
22
|
import {
|
|
20
23
|
__require
|
|
21
24
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -261,7 +264,7 @@ async function getGitState() {
|
|
|
261
264
|
}
|
|
262
265
|
|
|
263
266
|
// src/context/index.ts
|
|
264
|
-
import { join as join3, sep as sep2 } from "path";
|
|
267
|
+
import { isAbsolute, join as join3, relative as relative3, resolve as resolve3, sep as sep2 } from "path";
|
|
265
268
|
import { readFile } from "fs/promises";
|
|
266
269
|
import { existsSync as existsSync3, readdirSync as readdirSync2 } from "fs";
|
|
267
270
|
|
|
@@ -358,6 +361,7 @@ function getProjectRules(cwd) {
|
|
|
358
361
|
}
|
|
359
362
|
|
|
360
363
|
// src/context/index.ts
|
|
364
|
+
import { minimatch as minimatch2 } from "minimatch";
|
|
361
365
|
async function getInstructionFilesNote() {
|
|
362
366
|
try {
|
|
363
367
|
const cwd = getCwd();
|
|
@@ -529,19 +533,27 @@ ${authorLog || "(no recent commits)"}`;
|
|
|
529
533
|
return null;
|
|
530
534
|
}
|
|
531
535
|
});
|
|
532
|
-
var
|
|
536
|
+
var getContext = memoize4(
|
|
533
537
|
async () => {
|
|
534
538
|
const codeStyle = getCodeStyle();
|
|
535
539
|
const projectConfig = getCurrentProjectConfig();
|
|
536
540
|
const dontCrawl = projectConfig.dontCrawlDirectory;
|
|
537
|
-
const [
|
|
541
|
+
const [
|
|
542
|
+
gitStatus,
|
|
543
|
+
directoryStructure,
|
|
544
|
+
instructionFilesNote,
|
|
545
|
+
readme,
|
|
546
|
+
projectDocs
|
|
547
|
+
] = await Promise.all([
|
|
538
548
|
getGitStatus(),
|
|
549
|
+
dontCrawl ? Promise.resolve("") : getDirectoryStructure(),
|
|
539
550
|
dontCrawl ? Promise.resolve("") : getInstructionFilesNote(),
|
|
540
551
|
getReadme(),
|
|
541
552
|
getProjectDocs()
|
|
542
553
|
]);
|
|
543
554
|
return {
|
|
544
555
|
...projectConfig.context,
|
|
556
|
+
...directoryStructure ? { directoryStructure } : {},
|
|
545
557
|
...gitStatus ? { gitStatus } : {},
|
|
546
558
|
...codeStyle ? { codeStyle } : {},
|
|
547
559
|
...instructionFilesNote ? { instructionFilesNote } : {},
|
|
@@ -550,26 +562,148 @@ var getStaticContext = memoize4(
|
|
|
550
562
|
};
|
|
551
563
|
}
|
|
552
564
|
);
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
565
|
+
var getDirectoryStructure = memoize4(
|
|
566
|
+
async function() {
|
|
567
|
+
let lines;
|
|
568
|
+
try {
|
|
569
|
+
lines = buildDirectoryStructure();
|
|
570
|
+
} catch (error) {
|
|
571
|
+
logError(error);
|
|
572
|
+
return "";
|
|
573
|
+
}
|
|
574
|
+
return `Below is a snapshot of this project's file tree structure at the start of the conversation. This snapshot will NOT update during the conversation.
|
|
575
|
+
|
|
576
|
+
${lines}`;
|
|
577
|
+
}
|
|
578
|
+
);
|
|
579
|
+
var buildDirectoryStructure = () => {
|
|
580
|
+
const entries = readdirSync2(getCwd(), { withFileTypes: true });
|
|
581
|
+
const directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
|
|
582
|
+
const files = entries.filter((entry) => !entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
|
|
583
|
+
const root = getCwd();
|
|
584
|
+
const rootLabel = root.endsWith(sep2) ? root : `${root}${sep2}`;
|
|
585
|
+
return renderTopLevelTree(rootLabel, directories, files);
|
|
586
|
+
};
|
|
587
|
+
var ENV_STATS_IGNORE_PATTERNS = [
|
|
588
|
+
"node_modules/",
|
|
589
|
+
"__pycache__/",
|
|
590
|
+
".git/",
|
|
591
|
+
"dist/",
|
|
592
|
+
"build/",
|
|
593
|
+
"target/",
|
|
594
|
+
"bin/",
|
|
595
|
+
"obj/",
|
|
596
|
+
".idea/",
|
|
597
|
+
".vscode/",
|
|
598
|
+
".zig-cache/",
|
|
599
|
+
"zig-out",
|
|
600
|
+
".coverage",
|
|
601
|
+
"coverage/",
|
|
602
|
+
"vendor/",
|
|
603
|
+
"tmp/",
|
|
604
|
+
"temp/",
|
|
605
|
+
".cache/",
|
|
606
|
+
"cache/",
|
|
607
|
+
"logs/",
|
|
608
|
+
".venv/",
|
|
609
|
+
"venv/",
|
|
610
|
+
"env/"
|
|
611
|
+
];
|
|
612
|
+
var PROJECT_STRUCTURE_STATS_GUIDANCE = "\u4F9D\u636E\u5F53\u524D\u9879\u76EE\u7ED3\u6784\u7EDF\u8BA1\u6570\u636E\uFF0C\u53EF\u521D\u6B65\u8FDB\u884C\u9879\u76EE\u7ED3\u6784\u590D\u6742\u5EA6\u5206\u6790\uFF1A1 \u603B\u76EE\u5F55/\u603B\u6587\u4EF6\u6BD4\u4F8B\u9AD8 \u2192 \u7ED3\u6784\u66F4\u788E\u3001\u5C42\u7EA7\u53EF\u80FD\u66F4\u7EC6\uFF0C\u590D\u6742\u5EA6\u503E\u5411\u66F4\u9AD8\u30022 \u6700\u6DF1\u5C42\u7EA7\u5927 \u2192 \u6DF1\u5C42\u5D4C\u5957\u660E\u663E\uFF0C\u5BFC\u822A\u4E0E\u5B9A\u4F4D\u6210\u672C\u66F4\u9AD8\u30023 \u9876\u5C42\u76EE\u5F55\u6570\u591A \u2192 \u6A21\u5757\u5165\u53E3\u5206\u6563\uFF0C\u9700\u66F4\u4E25\u683C\u5206\u5C42\u786E\u8BA4\u30024 \u6587\u4EF6\u603B\u91CF\u5927 \u2192 \u66F4\u5BB9\u6613\u89E6\u53D1\u8F93\u51FA\u622A\u65AD\u3002\u5904\u7406\u6D41\u7A0B\uFF1A\u590D\u6742\u5EA6\u4F4E \u2192 \u53EF\u76F4\u63A5 LS \u83B7\u53D6\u7ED3\u6784\u7EBF\u7D22\u540E\u8FDB\u5165\u5B9A\u4F4D\uFF1B\u590D\u6742\u5EA6\u9AD8 \u2192 \u5148\u7528 LS \u83B7\u53D6\u9876\u5C42\u7EBF\u7D22\uFF0C\u518D\u7528 Glob \u5206\u5C42\u786E\u8BA4\u8DEF\u5F84\u3002";
|
|
613
|
+
var getWorkingDirectoryStructureStatsSnapshot = memoize4(
|
|
614
|
+
async () => computeWorkingDirectoryStructureStats()
|
|
615
|
+
);
|
|
616
|
+
function resetWorkingDirectoryStatsCacheForTests() {
|
|
617
|
+
;
|
|
618
|
+
getWorkingDirectoryStructureStatsSnapshot.cache?.clear?.();
|
|
619
|
+
}
|
|
620
|
+
async function getWorkingDirectoryStructureStats() {
|
|
621
|
+
const mode = String(process.env.PYB_ENV_STATS_MODE || "realtime").trim().toLowerCase();
|
|
622
|
+
if (mode === "snapshot") {
|
|
623
|
+
return getWorkingDirectoryStructureStatsSnapshot();
|
|
624
|
+
}
|
|
625
|
+
return computeWorkingDirectoryStructureStats();
|
|
564
626
|
}
|
|
565
|
-
function
|
|
566
|
-
|
|
567
|
-
|
|
627
|
+
async function getProjectStructureStatisticsBlock() {
|
|
628
|
+
const stats = await getWorkingDirectoryStructureStats();
|
|
629
|
+
if (!stats) return "";
|
|
630
|
+
const statsLine = `\u5F53\u524D\u9879\u76EE\u7EDF\u8BA1\u4FE1\u606F: \u9876\u5C42\u76EE\u5F55\u6570\uFF1A${stats.topLevelDirectoryCount}\u4E2A\uFF0C\u9876\u5C42\u6587\u4EF6\u6570\uFF1A${stats.topLevelFileCount}\u4E2A\uFF0C\u603B\u76EE\u5F55\u6570\uFF1A${stats.totalDirectoryCount}\u4E2A\uFF0C\u603B\u6587\u4EF6\u6570\uFF1A${stats.totalFileCount}\u4E2A\uFF0C\u603B\u76EE\u5F55/\u603B\u6587\u4EF6\u6BD4\u4F8B=${stats.directoryFileRatio}\uFF0C\u6700\u6DF1\u76EE\u5F55\u5C42\u7EA7=${stats.maxDepth}\u3002\uFF08\u7EDF\u8BA1\u6570\u636E\u4E0D\u5305\u542B\u7A7A\u76EE\u5F55\u4EE5\u53CA\u5E38\u89C1\u975E\u6838\u5FC3\u76EE\u5F55/\u6784\u5EFA\u4EA7\u7269/\u4F9D\u8D56\u7F13\u5B58\u7B49\u6587\u4EF6\u6216\u76EE\u5F55\uFF09`;
|
|
631
|
+
return `<context name="Project Structure Statistics">
|
|
632
|
+
${PROJECT_STRUCTURE_STATS_GUIDANCE}
|
|
633
|
+
|
|
634
|
+
${statsLine}</context>`;
|
|
568
635
|
}
|
|
569
|
-
|
|
636
|
+
var computeWorkingDirectoryStructureStats = async () => {
|
|
637
|
+
const cwd = getCwd();
|
|
638
|
+
const abortController = new AbortController();
|
|
639
|
+
const rgIgnoreGlobs = ENV_STATS_IGNORE_PATTERNS.map((pattern) => `!${pattern}*`);
|
|
640
|
+
const rgArgs = [
|
|
641
|
+
"--files",
|
|
642
|
+
...rgIgnoreGlobs.flatMap((pattern) => ["--glob", pattern])
|
|
643
|
+
];
|
|
644
|
+
const result = await ripGrepWithStatus(rgArgs, cwd, abortController.signal);
|
|
645
|
+
if (result.status !== "ok") return null;
|
|
646
|
+
const matchIgnorePatterns = ENV_STATS_IGNORE_PATTERNS.map(
|
|
647
|
+
(pattern) => pattern.endsWith("/") ? `${pattern}**` : pattern
|
|
648
|
+
);
|
|
649
|
+
const files = result.files.filter(Boolean).map((file) => {
|
|
650
|
+
const absolutePath = isAbsolute(file) ? file : resolve3(cwd, file);
|
|
651
|
+
const relativePath = relative3(cwd, absolutePath);
|
|
652
|
+
const normalized = relativePath.split(sep2).join("/");
|
|
653
|
+
return { normalized };
|
|
654
|
+
}).filter((entry) => {
|
|
655
|
+
if (matchIgnorePatterns.length === 0) return true;
|
|
656
|
+
return !matchIgnorePatterns.some(
|
|
657
|
+
(pattern) => minimatch2(entry.normalized, pattern, { dot: true, nocase: false })
|
|
658
|
+
);
|
|
659
|
+
});
|
|
660
|
+
const totalFileCount = files.length;
|
|
661
|
+
const directorySet = getDirectorySet(files.map((entry) => entry.normalized));
|
|
662
|
+
let maxDepth = 0;
|
|
663
|
+
for (const entry of files) {
|
|
664
|
+
const parts = entry.normalized.split("/").filter(Boolean);
|
|
665
|
+
const depth = Math.max(0, parts.length - 1);
|
|
666
|
+
if (depth > maxDepth) maxDepth = depth;
|
|
667
|
+
}
|
|
668
|
+
const ratio = totalFileCount === 0 ? "0.00" : (directorySet.size / totalFileCount).toFixed(2);
|
|
669
|
+
const topLevelEntries = readdirSync2(cwd, { withFileTypes: true });
|
|
670
|
+
const visibleTopLevel = topLevelEntries.filter((entry) => {
|
|
671
|
+
const normalized = entry.isDirectory() ? `${entry.name}/` : entry.name;
|
|
672
|
+
if (matchIgnorePatterns.length === 0) return true;
|
|
673
|
+
return !matchIgnorePatterns.some(
|
|
674
|
+
(pattern) => minimatch2(normalized, pattern, { dot: true, nocase: false })
|
|
675
|
+
);
|
|
676
|
+
});
|
|
677
|
+
const topLevelDirectoryCount = visibleTopLevel.filter(
|
|
678
|
+
(entry) => entry.isDirectory()
|
|
679
|
+
).length;
|
|
680
|
+
const topLevelFileCount = visibleTopLevel.filter(
|
|
681
|
+
(entry) => !entry.isDirectory()
|
|
682
|
+
).length;
|
|
683
|
+
return {
|
|
684
|
+
topLevelDirectoryCount,
|
|
685
|
+
topLevelFileCount,
|
|
686
|
+
totalDirectoryCount: directorySet.size,
|
|
687
|
+
totalFileCount,
|
|
688
|
+
directoryFileRatio: ratio,
|
|
689
|
+
maxDepth
|
|
690
|
+
};
|
|
691
|
+
};
|
|
692
|
+
var getDirectorySet = (paths) => {
|
|
693
|
+
const directories = /* @__PURE__ */ new Set();
|
|
694
|
+
for (const entry of paths) {
|
|
695
|
+
const parts = entry.split("/").filter(Boolean);
|
|
696
|
+
if (parts.length <= 1) continue;
|
|
697
|
+
for (let i = 0; i < parts.length - 1; i++) {
|
|
698
|
+
directories.add(parts.slice(0, i + 1).join("/"));
|
|
699
|
+
}
|
|
700
|
+
}
|
|
701
|
+
return directories;
|
|
702
|
+
};
|
|
703
|
+
var renderTopLevelTree = (rootLabel, directories, files) => {
|
|
570
704
|
const items = [
|
|
571
|
-
...directories.map((
|
|
572
|
-
...files.map((
|
|
705
|
+
...directories.map((name) => ({ name: `${name}${sep2}`, isDir: true })),
|
|
706
|
+
...files.map((name) => ({ name, isDir: false }))
|
|
573
707
|
];
|
|
574
708
|
const lines = [];
|
|
575
709
|
lines.push(rootLabel);
|
|
@@ -578,33 +712,7 @@ function renderTopLevelTree(rootLabel, directories, files) {
|
|
|
578
712
|
lines.push(`${connector}${items[i].name}`);
|
|
579
713
|
}
|
|
580
714
|
return lines.join("\n");
|
|
581
|
-
}
|
|
582
|
-
async function buildDirectoryStructure() {
|
|
583
|
-
let lines;
|
|
584
|
-
let cwdWithSeparator = "";
|
|
585
|
-
let directories = [];
|
|
586
|
-
let files = [];
|
|
587
|
-
try {
|
|
588
|
-
const cwd = getCwd();
|
|
589
|
-
cwdWithSeparator = cwd.endsWith(sep2) ? cwd : `${cwd}${sep2}`;
|
|
590
|
-
const entries = readdirSync2(cwd, { withFileTypes: true });
|
|
591
|
-
directories = entries.filter((entry) => entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
|
|
592
|
-
files = entries.filter((entry) => !entry.isDirectory()).map((entry) => entry.name).sort((a, b) => a.localeCompare(b));
|
|
593
|
-
lines = renderTopLevelTree(cwdWithSeparator, directories, files);
|
|
594
|
-
} catch (error) {
|
|
595
|
-
logError(error);
|
|
596
|
-
return "";
|
|
597
|
-
}
|
|
598
|
-
return `One-time static snapshot of the workspace root directory structure (top-level files and directories); not guaranteed to match the real-time directory,as follows:
|
|
599
|
-
${lines}`;
|
|
600
|
-
}
|
|
601
|
-
var getDirectoryStructure = memoize4(
|
|
602
|
-
async () => {
|
|
603
|
-
const projectConfig = getCurrentProjectConfig();
|
|
604
|
-
if (projectConfig.dontCrawlDirectory) return "";
|
|
605
|
-
return buildDirectoryStructure();
|
|
606
|
-
}
|
|
607
|
-
);
|
|
715
|
+
};
|
|
608
716
|
|
|
609
717
|
export {
|
|
610
718
|
getCodeStyle,
|
|
@@ -618,7 +726,8 @@ export {
|
|
|
618
726
|
getProjectDocs,
|
|
619
727
|
getGitStatus,
|
|
620
728
|
getContext,
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
729
|
+
getDirectoryStructure,
|
|
730
|
+
resetWorkingDirectoryStatsCacheForTests,
|
|
731
|
+
getWorkingDirectoryStructureStats,
|
|
732
|
+
getProjectStructureStatisticsBlock
|
|
624
733
|
};
|