pybao-cli 1.4.30 → 1.4.32
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-MBUQMGSZ.js +47 -0
- package/dist/{acp-54OCTLF3.js → acp-NEWJ7ZEJ.js} +29 -29
- package/dist/{agentsValidate-YRRDELGP.js → agentsValidate-ETGZ46QY.js} +7 -7
- package/dist/{ask-5HGEJWG7.js → ask-VGG5ZYG3.js} +28 -28
- package/dist/{autoUpdater-TMED2FL3.js → autoUpdater-7QJ4JHCH.js} +3 -3
- package/dist/{chunk-QW253P6N.js → chunk-2APS6R7Z.js} +2 -2
- package/dist/{chunk-I2BKWJAO.js → chunk-3T4RKTGP.js} +1 -1
- package/dist/{chunk-XC6KRXO4.js → chunk-4EPBZSZQ.js} +2 -2
- package/dist/{chunk-ELEZZHZS.js → chunk-4O5LZZ4Q.js} +3 -3
- package/dist/{chunk-EKD5CTDU.js → chunk-64Y7FUOU.js} +153 -71
- package/dist/chunk-64Y7FUOU.js.map +7 -0
- package/dist/{chunk-BQ26LTWD.js → chunk-6GS2HY5V.js} +1 -1
- package/dist/{chunk-XKX4ZJ2V.js → chunk-76SSF36Q.js} +2 -2
- package/dist/{chunk-2KOFEFBB.js → chunk-AFL55GKY.js} +3 -3
- package/dist/{chunk-BNCZBSZD.js → chunk-BPFIOGMI.js} +2 -2
- package/dist/{chunk-MN54LZVZ.js → chunk-C2OCFGO3.js} +3 -3
- package/dist/{chunk-5DDCVD2R.js → chunk-CGR6A7YT.js} +49 -22
- package/dist/{chunk-5DDCVD2R.js.map → chunk-CGR6A7YT.js.map} +2 -2
- package/dist/{chunk-SRH6224K.js → chunk-E2EVPBI3.js} +1 -1
- package/dist/{chunk-MIOC6RKV.js → chunk-F6PROUMO.js} +1 -1
- package/dist/{chunk-AOTYIYWG.js → chunk-FZIXMLIU.js} +1 -1
- package/dist/{chunk-5DSZI336.js → chunk-GTRZ7BA5.js} +1 -1
- package/dist/{chunk-KEAAXCHQ.js → chunk-HBTSM24X.js} +1 -1
- package/dist/{chunk-KEAAXCHQ.js.map → chunk-HBTSM24X.js.map} +1 -1
- package/dist/{chunk-GEPUKZC4.js → chunk-I7PU5DBZ.js} +2 -2
- package/dist/{chunk-73CR5PAL.js → chunk-JCO6RBCB.js} +3 -3
- package/dist/{chunk-UJ72GILG.js → chunk-KRHOXU2T.js} +1 -1
- package/dist/{chunk-XI43ZZAB.js → chunk-KT4VRFXO.js} +2 -2
- package/dist/{chunk-B6HYELDD.js → chunk-MATV6MQB.js} +4 -4
- package/dist/{chunk-BIZN4EED.js → chunk-O6YHV5DR.js} +4 -4
- package/dist/{chunk-OL3P63VW.js → chunk-OL62GN6D.js} +3 -3
- package/dist/{chunk-EGFVCSYF.js → chunk-QGGER6TO.js} +4 -4
- package/dist/{chunk-D6UDBSUX.js → chunk-SWKT4C3I.js} +1 -1
- package/dist/{chunk-VYKPA3DL.js → chunk-T3DTPXLM.js} +3 -3
- package/dist/{chunk-B3NXSU27.js → chunk-T5GI3YOX.js} +2 -2
- package/dist/{chunk-OHRJBNNZ.js → chunk-TMMJD5H5.js} +3 -3
- package/dist/{chunk-UDIBSJMV.js → chunk-WYKTTGYL.js} +4 -4
- package/dist/{chunk-SJ3HUXP7.js → chunk-YIZIMH7X.js} +1 -1
- package/dist/{cli-YWL725BD.js → cli-FBWMEQ5P.js} +87 -87
- package/dist/commands-CWYQKJXA.js +51 -0
- package/dist/{config-J7I2N5NL.js → config-3RLLPPYL.js} +4 -4
- package/dist/{context-3R7RLPX5.js → context-LQ4PEBTW.js} +6 -6
- package/dist/{customCommands-5ZVXTXH6.js → customCommands-IOWUIB4S.js} +4 -4
- package/dist/{env-BAKRIRQC.js → env-LGYNV3JO.js} +2 -2
- package/dist/{file-4Y72E7IL.js → file-X52OLEKL.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-75RT6NLK.js → llm-PM7IVQQN.js} +29 -29
- package/dist/{llmLazy-EWLSFOGD.js → llmLazy-6JKTMYRP.js} +1 -1
- package/dist/{loader-5U5AX6IP.js → loader-MGQFE76K.js} +4 -4
- package/dist/{lsp-XTBUV6RU.js → lsp-UQONZPLR.js} +6 -6
- package/dist/{lspAnchor-G6UEU6QU.js → lspAnchor-TE2EOWZL.js} +6 -6
- package/dist/{mcp-LEOCGVDC.js → mcp-2FP74S3R.js} +7 -7
- package/dist/{mentionProcessor-NLGRIMJD.js → mentionProcessor-6BLPQMIV.js} +5 -5
- package/dist/{messages-CARAB52M.js → messages-Y5HRQMGB.js} +1 -1
- package/dist/{model-4EGNIRWE.js → model-LZH4I4QM.js} +5 -5
- package/dist/{openai-O3PUHWWU.js → openai-DQDFQZSR.js} +5 -5
- package/dist/{outputStyles-X3ITUVYE.js → outputStyles-Z3W64H3F.js} +4 -4
- package/dist/{pluginRuntime-OBDFITHL.js → pluginRuntime-VJNHX3O7.js} +6 -6
- package/dist/{pluginValidation-6TNFALG6.js → pluginValidation-A7EGOZYC.js} +6 -6
- package/dist/prompts-Y3KLD3QB.js +53 -0
- package/dist/{pybAgentSessionLoad-FT73D3E2.js → pybAgentSessionLoad-7AEZUO3Y.js} +4 -4
- package/dist/{pybAgentSessionResume-HKIIWQDI.js → pybAgentSessionResume-GGA6BZWG.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-USRGHMK4.js → pybAgentStreamJsonSession-3534JVTS.js} +1 -1
- package/dist/{pybHooks-WEGOHD5Z.js → pybHooks-VJHXFUF7.js} +4 -4
- package/dist/query-KMIIXCCS.js +55 -0
- package/dist/{registry-MDCCBAIF.js → registry-YHDGHZFI.js} +5 -5
- package/dist/{ripgrep-CRMSCKGA.js → ripgrep-7SMG7VHS.js} +3 -3
- package/dist/{skillMarketplace-IUYCHIYN.js → skillMarketplace-TEKUKLKJ.js} +3 -3
- package/dist/{state-ZNMSCZYB.js → state-C2VP6UNB.js} +2 -2
- package/dist/{theme-E6OZCYB2.js → theme-5DBAYRZM.js} +5 -5
- package/dist/{toolPermissionSettings-CICBKWZX.js → toolPermissionSettings-BJ4YDRKI.js} +6 -6
- package/dist/tools-M4YPHPNW.js +52 -0
- package/dist/{userInput-LTWIKEQM.js → userInput-LVQ2BPTX.js} +30 -30
- package/package.json +1 -1
- package/dist/REPL-VJYNC4GK.js +0 -47
- package/dist/chunk-EKD5CTDU.js.map +0 -7
- package/dist/commands-TVBYEX3Y.js +0 -51
- package/dist/prompts-ZSZXDDAZ.js +0 -53
- package/dist/query-Q7BAEMZY.js +0 -55
- package/dist/tools-WWXWYZ3A.js +0 -52
- /package/dist/{REPL-VJYNC4GK.js.map → REPL-MBUQMGSZ.js.map} +0 -0
- /package/dist/{acp-54OCTLF3.js.map → acp-NEWJ7ZEJ.js.map} +0 -0
- /package/dist/{agentsValidate-YRRDELGP.js.map → agentsValidate-ETGZ46QY.js.map} +0 -0
- /package/dist/{ask-5HGEJWG7.js.map → ask-VGG5ZYG3.js.map} +0 -0
- /package/dist/{autoUpdater-TMED2FL3.js.map → autoUpdater-7QJ4JHCH.js.map} +0 -0
- /package/dist/{chunk-QW253P6N.js.map → chunk-2APS6R7Z.js.map} +0 -0
- /package/dist/{chunk-I2BKWJAO.js.map → chunk-3T4RKTGP.js.map} +0 -0
- /package/dist/{chunk-XC6KRXO4.js.map → chunk-4EPBZSZQ.js.map} +0 -0
- /package/dist/{chunk-ELEZZHZS.js.map → chunk-4O5LZZ4Q.js.map} +0 -0
- /package/dist/{chunk-BQ26LTWD.js.map → chunk-6GS2HY5V.js.map} +0 -0
- /package/dist/{chunk-XKX4ZJ2V.js.map → chunk-76SSF36Q.js.map} +0 -0
- /package/dist/{chunk-2KOFEFBB.js.map → chunk-AFL55GKY.js.map} +0 -0
- /package/dist/{chunk-BNCZBSZD.js.map → chunk-BPFIOGMI.js.map} +0 -0
- /package/dist/{chunk-MN54LZVZ.js.map → chunk-C2OCFGO3.js.map} +0 -0
- /package/dist/{chunk-SRH6224K.js.map → chunk-E2EVPBI3.js.map} +0 -0
- /package/dist/{chunk-MIOC6RKV.js.map → chunk-F6PROUMO.js.map} +0 -0
- /package/dist/{chunk-AOTYIYWG.js.map → chunk-FZIXMLIU.js.map} +0 -0
- /package/dist/{chunk-5DSZI336.js.map → chunk-GTRZ7BA5.js.map} +0 -0
- /package/dist/{chunk-GEPUKZC4.js.map → chunk-I7PU5DBZ.js.map} +0 -0
- /package/dist/{chunk-73CR5PAL.js.map → chunk-JCO6RBCB.js.map} +0 -0
- /package/dist/{chunk-UJ72GILG.js.map → chunk-KRHOXU2T.js.map} +0 -0
- /package/dist/{chunk-XI43ZZAB.js.map → chunk-KT4VRFXO.js.map} +0 -0
- /package/dist/{chunk-B6HYELDD.js.map → chunk-MATV6MQB.js.map} +0 -0
- /package/dist/{chunk-BIZN4EED.js.map → chunk-O6YHV5DR.js.map} +0 -0
- /package/dist/{chunk-OL3P63VW.js.map → chunk-OL62GN6D.js.map} +0 -0
- /package/dist/{chunk-EGFVCSYF.js.map → chunk-QGGER6TO.js.map} +0 -0
- /package/dist/{chunk-D6UDBSUX.js.map → chunk-SWKT4C3I.js.map} +0 -0
- /package/dist/{chunk-VYKPA3DL.js.map → chunk-T3DTPXLM.js.map} +0 -0
- /package/dist/{chunk-B3NXSU27.js.map → chunk-T5GI3YOX.js.map} +0 -0
- /package/dist/{chunk-OHRJBNNZ.js.map → chunk-TMMJD5H5.js.map} +0 -0
- /package/dist/{chunk-UDIBSJMV.js.map → chunk-WYKTTGYL.js.map} +0 -0
- /package/dist/{chunk-SJ3HUXP7.js.map → chunk-YIZIMH7X.js.map} +0 -0
- /package/dist/{cli-YWL725BD.js.map → cli-FBWMEQ5P.js.map} +0 -0
- /package/dist/{commands-TVBYEX3Y.js.map → commands-CWYQKJXA.js.map} +0 -0
- /package/dist/{config-J7I2N5NL.js.map → config-3RLLPPYL.js.map} +0 -0
- /package/dist/{context-3R7RLPX5.js.map → context-LQ4PEBTW.js.map} +0 -0
- /package/dist/{customCommands-5ZVXTXH6.js.map → customCommands-IOWUIB4S.js.map} +0 -0
- /package/dist/{env-BAKRIRQC.js.map → env-LGYNV3JO.js.map} +0 -0
- /package/dist/{file-4Y72E7IL.js.map → file-X52OLEKL.js.map} +0 -0
- /package/dist/{llm-75RT6NLK.js.map → llm-PM7IVQQN.js.map} +0 -0
- /package/dist/{llmLazy-EWLSFOGD.js.map → llmLazy-6JKTMYRP.js.map} +0 -0
- /package/dist/{loader-5U5AX6IP.js.map → loader-MGQFE76K.js.map} +0 -0
- /package/dist/{lsp-XTBUV6RU.js.map → lsp-UQONZPLR.js.map} +0 -0
- /package/dist/{lspAnchor-G6UEU6QU.js.map → lspAnchor-TE2EOWZL.js.map} +0 -0
- /package/dist/{mcp-LEOCGVDC.js.map → mcp-2FP74S3R.js.map} +0 -0
- /package/dist/{mentionProcessor-NLGRIMJD.js.map → mentionProcessor-6BLPQMIV.js.map} +0 -0
- /package/dist/{messages-CARAB52M.js.map → messages-Y5HRQMGB.js.map} +0 -0
- /package/dist/{model-4EGNIRWE.js.map → model-LZH4I4QM.js.map} +0 -0
- /package/dist/{openai-O3PUHWWU.js.map → openai-DQDFQZSR.js.map} +0 -0
- /package/dist/{outputStyles-X3ITUVYE.js.map → outputStyles-Z3W64H3F.js.map} +0 -0
- /package/dist/{pluginRuntime-OBDFITHL.js.map → pluginRuntime-VJNHX3O7.js.map} +0 -0
- /package/dist/{pluginValidation-6TNFALG6.js.map → pluginValidation-A7EGOZYC.js.map} +0 -0
- /package/dist/{prompts-ZSZXDDAZ.js.map → prompts-Y3KLD3QB.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-FT73D3E2.js.map → pybAgentSessionLoad-7AEZUO3Y.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-HKIIWQDI.js.map → pybAgentSessionResume-GGA6BZWG.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-USRGHMK4.js.map → pybAgentStreamJsonSession-3534JVTS.js.map} +0 -0
- /package/dist/{pybHooks-WEGOHD5Z.js.map → pybHooks-VJHXFUF7.js.map} +0 -0
- /package/dist/{query-Q7BAEMZY.js.map → query-KMIIXCCS.js.map} +0 -0
- /package/dist/{registry-MDCCBAIF.js.map → registry-YHDGHZFI.js.map} +0 -0
- /package/dist/{ripgrep-CRMSCKGA.js.map → ripgrep-7SMG7VHS.js.map} +0 -0
- /package/dist/{skillMarketplace-IUYCHIYN.js.map → skillMarketplace-TEKUKLKJ.js.map} +0 -0
- /package/dist/{state-ZNMSCZYB.js.map → state-C2VP6UNB.js.map} +0 -0
- /package/dist/{theme-E6OZCYB2.js.map → theme-5DBAYRZM.js.map} +0 -0
- /package/dist/{toolPermissionSettings-CICBKWZX.js.map → toolPermissionSettings-BJ4YDRKI.js.map} +0 -0
- /package/dist/{tools-WWXWYZ3A.js.map → tools-M4YPHPNW.js.map} +0 -0
- /package/dist/{userInput-LTWIKEQM.js.map → userInput-LVQ2BPTX.js.map} +0 -0
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
PLAN_SLUG_VERBS,
|
|
10
10
|
getCwd,
|
|
11
11
|
resolveXdgDataPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-3T4RKTGP.js";
|
|
13
13
|
import {
|
|
14
14
|
MACRO
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-HBTSM24X.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/protocol/pybAgentSessionLog.ts
|
|
18
18
|
import { execFileSync } from "child_process";
|
|
@@ -4,10 +4,10 @@ import {
|
|
|
4
4
|
PRODUCT_NAME,
|
|
5
5
|
execFileNoThrow,
|
|
6
6
|
logError
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3T4RKTGP.js";
|
|
8
8
|
import {
|
|
9
9
|
MACRO
|
|
10
|
-
} from "./chunk-
|
|
10
|
+
} from "./chunk-HBTSM24X.js";
|
|
11
11
|
|
|
12
12
|
// src/utils/session/autoUpdater.ts
|
|
13
13
|
async function getSemver() {
|
|
@@ -82,7 +82,7 @@ async function checkAndNotifyUpdate() {
|
|
|
82
82
|
const [
|
|
83
83
|
{ isAutoUpdaterDisabled, getGlobalConfig, saveGlobalConfig },
|
|
84
84
|
{ env }
|
|
85
|
-
] = await Promise.all([import("./config-
|
|
85
|
+
] = await Promise.all([import("./config-3RLLPPYL.js"), import("./env-LGYNV3JO.js")]);
|
|
86
86
|
if (await isAutoUpdaterDisabled()) return;
|
|
87
87
|
if (await env.getIsDocker()) return;
|
|
88
88
|
if (!await env.hasInternetAccess()) return;
|
|
@@ -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-E2EVPBI3.js";
|
|
6
6
|
import {
|
|
7
7
|
getCwd,
|
|
8
8
|
logError
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-3T4RKTGP.js";
|
|
10
10
|
|
|
11
11
|
// src/utils/fs/file.ts
|
|
12
12
|
import {
|
|
@@ -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-YIZIMH7X.js";
|
|
6
6
|
import {
|
|
7
7
|
parseFrontmatter
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2APS6R7Z.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-3T4RKTGP.js";
|
|
12
12
|
|
|
13
13
|
// src/services/plugins/pluginValidation.ts
|
|
14
14
|
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
@@ -26,57 +26,57 @@ import {
|
|
|
26
26
|
hasReadPermission,
|
|
27
27
|
hasWritePermission,
|
|
28
28
|
query
|
|
29
|
-
} from "./chunk-
|
|
29
|
+
} from "./chunk-64Y7FUOU.js";
|
|
30
30
|
import {
|
|
31
31
|
queryLLM
|
|
32
|
-
} from "./chunk-
|
|
32
|
+
} from "./chunk-O6YHV5DR.js";
|
|
33
33
|
import {
|
|
34
34
|
FallbackToolUseRejectedMessage,
|
|
35
35
|
MCPTool,
|
|
36
36
|
getClients,
|
|
37
37
|
getMCPTools
|
|
38
|
-
} from "./chunk-
|
|
38
|
+
} from "./chunk-MATV6MQB.js";
|
|
39
39
|
import {
|
|
40
40
|
generateAgentId
|
|
41
|
-
} from "./chunk-
|
|
41
|
+
} from "./chunk-KT4VRFXO.js";
|
|
42
42
|
import {
|
|
43
43
|
getActiveAgents,
|
|
44
44
|
getAgentByType,
|
|
45
45
|
getAvailableAgentTypes
|
|
46
|
-
} from "./chunk-
|
|
46
|
+
} from "./chunk-4EPBZSZQ.js";
|
|
47
47
|
import {
|
|
48
48
|
INTERRUPT_MESSAGE,
|
|
49
49
|
createAssistantMessage,
|
|
50
50
|
createUserMessage,
|
|
51
51
|
getLastAssistantMessageId
|
|
52
|
-
} from "./chunk-
|
|
52
|
+
} from "./chunk-F6PROUMO.js";
|
|
53
53
|
import {
|
|
54
54
|
formatDuration,
|
|
55
55
|
formatNumber
|
|
56
56
|
} from "./chunk-OUXHGDLH.js";
|
|
57
57
|
import {
|
|
58
58
|
getAbsolutePath
|
|
59
|
-
} from "./chunk-
|
|
59
|
+
} from "./chunk-BPFIOGMI.js";
|
|
60
60
|
import {
|
|
61
61
|
LspFacade,
|
|
62
62
|
formatDiagnosticsPretty
|
|
63
|
-
} from "./chunk-
|
|
63
|
+
} from "./chunk-QGGER6TO.js";
|
|
64
64
|
import {
|
|
65
65
|
getModelManager
|
|
66
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-TMMJD5H5.js";
|
|
67
67
|
import {
|
|
68
68
|
getContext
|
|
69
|
-
} from "./chunk-
|
|
69
|
+
} from "./chunk-WYKTTGYL.js";
|
|
70
70
|
import {
|
|
71
71
|
filesToTree,
|
|
72
72
|
ripGrepWithStatus
|
|
73
|
-
} from "./chunk-
|
|
73
|
+
} from "./chunk-E2EVPBI3.js";
|
|
74
74
|
import {
|
|
75
75
|
getTheme
|
|
76
|
-
} from "./chunk-
|
|
76
|
+
} from "./chunk-KRHOXU2T.js";
|
|
77
77
|
import {
|
|
78
78
|
debug
|
|
79
|
-
} from "./chunk-
|
|
79
|
+
} from "./chunk-6GS2HY5V.js";
|
|
80
80
|
import {
|
|
81
81
|
BunShell,
|
|
82
82
|
getCwd,
|
|
@@ -87,7 +87,7 @@ import {
|
|
|
87
87
|
overwriteLog,
|
|
88
88
|
readTaskOutput,
|
|
89
89
|
resolveXdgDataPath
|
|
90
|
-
} from "./chunk-
|
|
90
|
+
} from "./chunk-3T4RKTGP.js";
|
|
91
91
|
|
|
92
92
|
// src/tools/index.ts
|
|
93
93
|
import { memoize as memoize2 } from "lodash-es";
|
|
@@ -766,7 +766,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
|
|
|
766
766
|
if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
|
|
767
767
|
try {
|
|
768
768
|
const { isAbsolute: isAbsolute3, resolve: resolve4 } = await import("path");
|
|
769
|
-
const { getSessionRoot: getSessionRoot2 } = await import("./state-
|
|
769
|
+
const { getSessionRoot: getSessionRoot2 } = await import("./state-C2VP6UNB.js");
|
|
770
770
|
const lines = output.split("\n");
|
|
771
771
|
const uniqueFiles = /* @__PURE__ */ new Set();
|
|
772
772
|
const lspSuggestions = [];
|
|
@@ -1139,7 +1139,7 @@ var DeleteTool = {
|
|
|
1139
1139
|
}
|
|
1140
1140
|
if (!force) {
|
|
1141
1141
|
try {
|
|
1142
|
-
const { LspFacade: LspFacade2 } = await import("./lsp-
|
|
1142
|
+
const { LspFacade: LspFacade2 } = await import("./lsp-UQONZPLR.js");
|
|
1143
1143
|
const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
|
|
1144
1144
|
if (referenceDetail) {
|
|
1145
1145
|
failedItems.push(
|
|
@@ -1311,7 +1311,7 @@ import { z as z5 } from "zod";
|
|
|
1311
1311
|
import { minimatch } from "minimatch";
|
|
1312
1312
|
|
|
1313
1313
|
// src/tools/lsTool/prompt.ts
|
|
1314
|
-
var DESCRIPTION3 = `\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\
|
|
1314
|
+
var DESCRIPTION3 = `\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u7684\u4E00\u5C42\u5B8C\u6574\u6811\u5F62\u7ED3\u6784\u89C6\u56FE\u548C\u7EDF\u8BA1\u660E\u7EC6\u4FE1\u606F\u3002
|
|
1315
1315
|
|
|
1316
1316
|
\u7528\u6CD5\uFF1A
|
|
1317
1317
|
1. **\u5FFD\u7565\u89C4\u5219**\uFF1A\u4F7F\u7528 \`ignore\` \u6392\u9664\u566A\u97F3\u8DEF\u5F84\u4EE5\u51CF\u5C11\u8F93\u51FA\u3002\u9ED8\u8BA4\u5FFD\u7565\u5E38\u89C1\u975E\u6838\u5FC3\u76EE\u5F55/\u6784\u5EFA\u4EA7\u7269/\u4F9D\u8D56\u7F13\u5B58\uFF08\u5982 node_modules\u3001dist\uFF09\u3002
|
|
@@ -1321,6 +1321,9 @@ var DESCRIPTION3 = `\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u4E2D\u6240\u6709\u6587
|
|
|
1321
1321
|
- BFS \u4F1A\u4F18\u5148\u5C55\u793A\u9876\u5C42\uFF08\u6839\u76EE\u5F55\uFF09\u7ED3\u6784\uFF0C\u5373\u4F7F\u8F93\u51FA\u88AB\u622A\u65AD\u3002
|
|
1322
1322
|
- path \u53C2\u6570\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002
|
|
1323
1323
|
- \u8DEF\u5F84\u6765\u6E90\u7EA6\u675F\uFF1A\u5F53\u8DEF\u5F84\u975E\u7528\u6237\u63D0\u4F9B\u65F6\uFF0C\u5FC5\u987B\u5148\u7528 LS/Glob \u786E\u8BA4\u7236\u7EA7\u76EE\u5F55\u5B58\u5728\uFF0C\u518D\u5BF9\u4E0B\u7EA7\u8DEF\u5F84\u6267\u884C LS\u3002
|
|
1324
|
+
- \u5BF9\u5019\u9009\u5B50\u76EE\u5F55\u7EE7\u7EED LS \u6216\u7528 Glob/Grep \u6536\u655B\u3002
|
|
1325
|
+
- \u4E0D\u7528\u4E8E\u6A21\u7CCA\u67E5\u627E\u6587\u4EF6\u540D\u6216\u5185\u5BB9\uFF0C\u76F8\u5173\u573A\u666F\u7528 Glob/Grep\u3002
|
|
1326
|
+
- \u5927\u578B\u4ED3\u5E93\u907F\u514D\u5BF9\u5168\u91CF\u8DEF\u5F84\u53CD\u590D LS\uFF0C\u4F18\u5148\u5206\u7247\u6216\u805A\u7126\u76EE\u5F55\u8303\u56F4\u3002
|
|
1324
1327
|
|
|
1325
1328
|
\u9002\u7528\u573A\u666F\uFF1A
|
|
1326
1329
|
- \u5FEB\u901F\u4E86\u89E3\u9879\u76EE\u6216\u6307\u5B9A\u76EE\u5F55\u7684\u9876\u5C42\uFF08\u6839\u76EE\u5F55\uFF09\u6587\u4EF6\u76EE\u5F55\u4FE1\u606F\u548C\u76EE\u5F55\u6811\u7ED3\u6784
|
|
@@ -1644,8 +1647,8 @@ This tool acts as your "Code Analyst". Use it to understand the codebase semanti
|
|
|
1644
1647
|
|
|
1645
1648
|
### 2. Impact Analysis (What uses this?)
|
|
1646
1649
|
- **Scenario**: You are planning to rename or modify the \`User\` class.
|
|
1647
|
-
- **Action**: Use \`findReferences\`
|
|
1648
|
-
- **Why**: It lists every file and line where \`User\` is
|
|
1650
|
+
- **Action**: Use \`findReferences\` at the symbol position (line + character) in the file where \`User\` is declared or used.
|
|
1651
|
+
- **Why**: It lists every file and line where \`User\` is referenced, ensuring you don't break dependents.
|
|
1649
1652
|
|
|
1650
1653
|
### 3. Exploring New Files (What's in here?)
|
|
1651
1654
|
- **Scenario**: You just opened a large file \`utils.ts\` and want a quick overview.
|
|
@@ -1686,10 +1689,13 @@ All operations require:
|
|
|
1686
1689
|
Location-based operations require:
|
|
1687
1690
|
- line: The line number (1-based, as shown in editors)
|
|
1688
1691
|
- character: The character offset (1-based, as shown in editors)
|
|
1692
|
+
Do not pass a symbol name. LSPTool works on positions, not names. Use Read to locate the symbol and derive line + character first.
|
|
1693
|
+
workspaceSymbol requires:
|
|
1694
|
+
- query: The symbol name or keyword to search for
|
|
1689
1695
|
|
|
1690
1696
|
## LSP \u540E\u7F6E\u4E0E\u8303\u56F4\u9650\u5236
|
|
1691
|
-
- \u4F18\u5148\u987A\u5E8F\uFF1A\u7ED3\u6784\u6811 -> \u70ED\u70B9\u5B9A\u4F4D -> Read -> LSP
|
|
1692
|
-
- workspaceSymbol \
|
|
1697
|
+
- \u4F18\u5148\u987A\u5E8F\uFF1A\u7ED3\u6784\u6811 -> \u70ED\u70B9\u5B9A\u4F4D -> Read -> LSP\uFF08\u786E\u4FDD\u62FF\u5230 line + character\uFF09
|
|
1698
|
+
- workspaceSymbol \u9700\u8981 query \u4E14\u4EC5\u901A\u8FC7 filePath \u63A7\u5236\u8303\u56F4\uFF08\u53EF\u4F20\u76EE\u5F55\u8DEF\u5F84\uFF09\uFF0C\u907F\u514D\u5BF9\u5168\u4ED3\u5E93\u65E0\u754C\u67E5\u8BE2
|
|
1693
1699
|
- documentSymbol \u7684\u4F18\u5148\u7EA7\u7531 LspFacade \u51B3\u5B9A\uFF08\u9ED8\u8BA4 LSP \u4F18\u5148\uFF0CTree-Sitter \u515C\u5E95\uFF09
|
|
1694
1700
|
|
|
1695
1701
|
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.`;
|
|
@@ -1713,6 +1719,7 @@ var inputSchema6 = z6.strictObject({
|
|
|
1713
1719
|
filePath: z6.string().describe("The absolute or relative path to the file"),
|
|
1714
1720
|
line: z6.number().int().positive().optional().describe("The line number (1-based, as shown in editors). Required for location-based operations."),
|
|
1715
1721
|
character: z6.number().int().positive().optional().describe("The character offset (1-based, as shown in editors). Required for location-based operations."),
|
|
1722
|
+
query: z6.string().optional().describe('The query string for workspaceSymbol. Required when operation is "workspaceSymbol".'),
|
|
1716
1723
|
waitForDiagnostics: z6.boolean().optional().describe('If true, wait for fresh diagnostics from the server (used with "diagnostics" operation)'),
|
|
1717
1724
|
timeout: z6.number().optional().describe("Timeout in milliseconds for waiting operations (default: 5000)")
|
|
1718
1725
|
});
|
|
@@ -2020,6 +2027,15 @@ var LspTool = {
|
|
|
2020
2027
|
async *call(input, _context) {
|
|
2021
2028
|
const absPath = getAbsolutePath(input.filePath) ?? input.filePath;
|
|
2022
2029
|
const needsLocation = input.operation === "goToDefinition" || input.operation === "findReferences" || input.operation === "hover" || input.operation === "goToImplementation" || input.operation === "prepareCallHierarchy" || input.operation === "incomingCalls" || input.operation === "outgoingCalls" || input.operation === "getScope";
|
|
2030
|
+
if (needsLocation && (input.line === void 0 || input.character === void 0)) {
|
|
2031
|
+
const out2 = {
|
|
2032
|
+
operation: input.operation,
|
|
2033
|
+
result: "Missing line/character. Use Read to locate the symbol and provide 1-based line + character.",
|
|
2034
|
+
filePath: input.filePath
|
|
2035
|
+
};
|
|
2036
|
+
yield { type: "result", data: out2, resultForAssistant: out2.result };
|
|
2037
|
+
return;
|
|
2038
|
+
}
|
|
2023
2039
|
if (needsLocation && input.line !== void 0 && input.character !== void 0) {
|
|
2024
2040
|
try {
|
|
2025
2041
|
const content = readFileSync2(absPath, "utf8");
|
|
@@ -2045,6 +2061,17 @@ var LspTool = {
|
|
|
2045
2061
|
} catch {
|
|
2046
2062
|
}
|
|
2047
2063
|
}
|
|
2064
|
+
if (input.operation === "workspaceSymbol") {
|
|
2065
|
+
if (!input.query || input.query.trim() === "") {
|
|
2066
|
+
const out2 = {
|
|
2067
|
+
operation: input.operation,
|
|
2068
|
+
result: "Missing query. Provide a workspaceSymbol query string.",
|
|
2069
|
+
filePath: input.filePath
|
|
2070
|
+
};
|
|
2071
|
+
yield { type: "result", data: out2, resultForAssistant: out2.result };
|
|
2072
|
+
return;
|
|
2073
|
+
}
|
|
2074
|
+
}
|
|
2048
2075
|
const workspaceRoot = input.operation === "workspaceSymbol" ? statSync2(absPath).isDirectory() ? absPath : getSessionRoot() : void 0;
|
|
2049
2076
|
const targetPath = input.operation === "workspaceSymbol" ? absPath : absPath;
|
|
2050
2077
|
const formattedResult = await LspFacade.run({
|
|
@@ -2054,7 +2081,7 @@ var LspTool = {
|
|
|
2054
2081
|
character: input.character,
|
|
2055
2082
|
waitForDiagnostics: input.waitForDiagnostics,
|
|
2056
2083
|
timeoutMs: input.timeout,
|
|
2057
|
-
query: input.operation === "workspaceSymbol" ?
|
|
2084
|
+
query: input.operation === "workspaceSymbol" ? input.query : void 0,
|
|
2058
2085
|
rootPath: workspaceRoot
|
|
2059
2086
|
});
|
|
2060
2087
|
const out = {
|