pybao-cli 1.5.4 → 1.5.6

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.
Files changed (151) hide show
  1. package/dist/REPL-S2UEVXWF.js +49 -0
  2. package/dist/{acp-IRGLAUUJ.js → acp-3KRM4YMC.js} +30 -30
  3. package/dist/{agentsValidate-JBJJ2EH7.js → agentsValidate-T6E3S4SD.js} +7 -7
  4. package/dist/{ask-WKLLFN55.js → ask-OT3N6WUV.js} +29 -29
  5. package/dist/{autoUpdater-UAC34Y6K.js → autoUpdater-MBTYMKZZ.js} +3 -3
  6. package/dist/{chunk-ATT3HCME.js → chunk-2DY7NKZY.js} +3 -3
  7. package/dist/{chunk-GL5OH6V4.js → chunk-33HCNVDW.js} +2 -2
  8. package/dist/{chunk-TBZGYEDP.js → chunk-5TPUQEB7.js} +3 -3
  9. package/dist/{chunk-M73XAOTH.js → chunk-63RVOHFS.js} +1 -1
  10. package/dist/{chunk-M73XAOTH.js.map → chunk-63RVOHFS.js.map} +1 -1
  11. package/dist/{chunk-KG3TWGBU.js → chunk-6MZDAIOV.js} +2 -2
  12. package/dist/{chunk-G3SWBGWN.js → chunk-AKLGEOKM.js} +172 -72
  13. package/dist/chunk-AKLGEOKM.js.map +7 -0
  14. package/dist/{chunk-IQV3HS22.js → chunk-BKG4N5U7.js} +1 -1
  15. package/dist/{chunk-MBM5WCIY.js → chunk-BRDQQ6DH.js} +2 -2
  16. package/dist/{chunk-XXDO6DFB.js → chunk-CXLPIXKP.js} +2 -2
  17. package/dist/{chunk-MWSQEKK6.js → chunk-DM2LV6T7.js} +4 -4
  18. package/dist/{chunk-A3NFY5TV.js → chunk-DTWSIMGF.js} +2 -2
  19. package/dist/{chunk-U5AY65EA.js → chunk-FZEVFEDH.js} +1 -1
  20. package/dist/{chunk-RHLNLOZP.js → chunk-GKFPN3PD.js} +1 -1
  21. package/dist/{chunk-2HK2IYZU.js → chunk-GPSHYLDR.js} +1 -1
  22. package/dist/{chunk-U76IVQIF.js → chunk-HV4AL2VG.js} +1 -1
  23. package/dist/{chunk-HLFRL66T.js → chunk-KO6ENKTQ.js} +3 -3
  24. package/dist/{chunk-6KR5MXW4.js → chunk-L3QFTUHN.js} +3 -3
  25. package/dist/{chunk-BJHBQUXH.js → chunk-LMTF4FXH.js} +2 -2
  26. package/dist/{chunk-PUBU44C2.js → chunk-MLZYATJX.js} +1 -1
  27. package/dist/{chunk-TI57KY6H.js → chunk-NM5GLMVH.js} +1 -1
  28. package/dist/{chunk-LKJJGCDP.js → chunk-PCSIH35L.js} +1 -1
  29. package/dist/{chunk-BVJZ6435.js → chunk-QD4OU22C.js} +3 -3
  30. package/dist/{chunk-RYALTDJI.js → chunk-RPIILAZ5.js} +4 -4
  31. package/dist/{chunk-A3WIVAEQ.js → chunk-SIE7VHSI.js} +1458 -301
  32. package/dist/chunk-SIE7VHSI.js.map +7 -0
  33. package/dist/{chunk-QJFAJORX.js → chunk-TN4TZY7G.js} +2 -2
  34. package/dist/{chunk-H744C3MH.js → chunk-VDIUCVWJ.js} +3 -3
  35. package/dist/{chunk-HCGBT46A.js → chunk-WTF7JOIQ.js} +4 -4
  36. package/dist/{chunk-Q64XH2HD.js → chunk-X7PDG4FB.js} +1 -1
  37. package/dist/{chunk-GUBKR5CU.js → chunk-YSZEGC2L.js} +3 -3
  38. package/dist/{chunk-QMQYRYOJ.js → chunk-ZUWPUBWZ.js} +1 -1
  39. package/dist/{chunk-SNLXXBXP.js → chunk-ZXUQALBB.js} +4 -4
  40. package/dist/{cli-UUU72LBP.js → cli-F65QNC6S.js} +89 -89
  41. package/dist/commands-A6WCP2T2.js +53 -0
  42. package/dist/{config-SKKYAIQT.js → config-TEBSBFSO.js} +4 -4
  43. package/dist/{context-VC4F6CQH.js → context-T5NFLTK4.js} +6 -6
  44. package/dist/{conversationTracker-2PRBUDU7.js → conversationTracker-ZUJHBMDH.js} +3 -3
  45. package/dist/{customCommands-KFSKRLOR.js → customCommands-TBZ5RMJ5.js} +4 -4
  46. package/dist/{env-UXRNUTRY.js → env-3LH2POC2.js} +2 -2
  47. package/dist/{file-YOLDPGAZ.js → file-O7PWWVFS.js} +4 -4
  48. package/dist/index.js +3 -3
  49. package/dist/{llm-NNPSCVNC.js → llm-OW7QDXPZ.js} +30 -30
  50. package/dist/{llmLazy-VFQBE4VQ.js → llmLazy-CCD2PHFB.js} +1 -1
  51. package/dist/{loader-JLKU56P4.js → loader-RBCHNZJW.js} +4 -4
  52. package/dist/{lsp-ODCSAM2C.js → lsp-WAD7S2GA.js} +6 -6
  53. package/dist/{lspAnchor-DRPDOTNI.js → lspAnchor-B5AR4FPG.js} +6 -6
  54. package/dist/{mcp-YNM5F6DI.js → mcp-5H5KKR2C.js} +7 -7
  55. package/dist/{mentionProcessor-XE5YX3QF.js → mentionProcessor-NK7NPMF2.js} +5 -5
  56. package/dist/{messages-S6CUVFAR.js → messages-DHHFMED7.js} +1 -1
  57. package/dist/{model-XRNLQZ4O.js → model-XWJ23WCS.js} +5 -5
  58. package/dist/{openai-JAWY3TYO.js → openai-WAGWEANY.js} +5 -5
  59. package/dist/{outputStyles-C2BALUUY.js → outputStyles-F6PPD3VU.js} +4 -4
  60. package/dist/{pluginRuntime-S7J5ODQU.js → pluginRuntime-BFIRISID.js} +6 -6
  61. package/dist/{pluginValidation-QTKM6IXY.js → pluginValidation-FDI5C7J7.js} +6 -6
  62. package/dist/prompts-XIY3JRPC.js +55 -0
  63. package/dist/{pybAgentSessionLoad-QONCGHTI.js → pybAgentSessionLoad-Z57EVSBX.js} +4 -4
  64. package/dist/{pybAgentSessionResume-2MIW4X3R.js → pybAgentSessionResume-74AWGCWV.js} +4 -4
  65. package/dist/{pybAgentStreamJsonSession-7IBCTJCI.js → pybAgentStreamJsonSession-HVWGJB4Q.js} +1 -1
  66. package/dist/{pybHooks-2FKUCMJD.js → pybHooks-FZYE52XG.js} +4 -4
  67. package/dist/query-JWT6DB4G.js +57 -0
  68. package/dist/{registry-OVP3MKFX.js → registry-FCKOLGU5.js} +5 -5
  69. package/dist/{ripgrep-KOL5M55E.js → ripgrep-MYG754KL.js} +3 -3
  70. package/dist/{skillMarketplace-XXVBYC57.js → skillMarketplace-B5UZC4ES.js} +3 -3
  71. package/dist/{state-CVENJNIV.js → state-SP4W7M4L.js} +2 -2
  72. package/dist/{theme-CV36XY2J.js → theme-OZAWAG6W.js} +5 -5
  73. package/dist/{toolPermissionSettings-MBBYIXDA.js → toolPermissionSettings-S2WBKN66.js} +6 -6
  74. package/dist/tools-UE2MORVX.js +54 -0
  75. package/dist/{userInput-JZQSTMJF.js → userInput-YJPISBP7.js} +31 -31
  76. package/package.json +1 -1
  77. package/dist/REPL-MBDNDVDD.js +0 -49
  78. package/dist/chunk-A3WIVAEQ.js.map +0 -7
  79. package/dist/chunk-G3SWBGWN.js.map +0 -7
  80. package/dist/commands-HN4V6NUM.js +0 -53
  81. package/dist/prompts-QVC7LLMH.js +0 -55
  82. package/dist/query-HUTD7BSB.js +0 -57
  83. package/dist/tools-2UQZG6N5.js +0 -54
  84. /package/dist/{REPL-MBDNDVDD.js.map → REPL-S2UEVXWF.js.map} +0 -0
  85. /package/dist/{acp-IRGLAUUJ.js.map → acp-3KRM4YMC.js.map} +0 -0
  86. /package/dist/{agentsValidate-JBJJ2EH7.js.map → agentsValidate-T6E3S4SD.js.map} +0 -0
  87. /package/dist/{ask-WKLLFN55.js.map → ask-OT3N6WUV.js.map} +0 -0
  88. /package/dist/{autoUpdater-UAC34Y6K.js.map → autoUpdater-MBTYMKZZ.js.map} +0 -0
  89. /package/dist/{chunk-ATT3HCME.js.map → chunk-2DY7NKZY.js.map} +0 -0
  90. /package/dist/{chunk-GL5OH6V4.js.map → chunk-33HCNVDW.js.map} +0 -0
  91. /package/dist/{chunk-TBZGYEDP.js.map → chunk-5TPUQEB7.js.map} +0 -0
  92. /package/dist/{chunk-KG3TWGBU.js.map → chunk-6MZDAIOV.js.map} +0 -0
  93. /package/dist/{chunk-IQV3HS22.js.map → chunk-BKG4N5U7.js.map} +0 -0
  94. /package/dist/{chunk-MBM5WCIY.js.map → chunk-BRDQQ6DH.js.map} +0 -0
  95. /package/dist/{chunk-XXDO6DFB.js.map → chunk-CXLPIXKP.js.map} +0 -0
  96. /package/dist/{chunk-MWSQEKK6.js.map → chunk-DM2LV6T7.js.map} +0 -0
  97. /package/dist/{chunk-A3NFY5TV.js.map → chunk-DTWSIMGF.js.map} +0 -0
  98. /package/dist/{chunk-U5AY65EA.js.map → chunk-FZEVFEDH.js.map} +0 -0
  99. /package/dist/{chunk-RHLNLOZP.js.map → chunk-GKFPN3PD.js.map} +0 -0
  100. /package/dist/{chunk-2HK2IYZU.js.map → chunk-GPSHYLDR.js.map} +0 -0
  101. /package/dist/{chunk-U76IVQIF.js.map → chunk-HV4AL2VG.js.map} +0 -0
  102. /package/dist/{chunk-HLFRL66T.js.map → chunk-KO6ENKTQ.js.map} +0 -0
  103. /package/dist/{chunk-6KR5MXW4.js.map → chunk-L3QFTUHN.js.map} +0 -0
  104. /package/dist/{chunk-BJHBQUXH.js.map → chunk-LMTF4FXH.js.map} +0 -0
  105. /package/dist/{chunk-PUBU44C2.js.map → chunk-MLZYATJX.js.map} +0 -0
  106. /package/dist/{chunk-TI57KY6H.js.map → chunk-NM5GLMVH.js.map} +0 -0
  107. /package/dist/{chunk-LKJJGCDP.js.map → chunk-PCSIH35L.js.map} +0 -0
  108. /package/dist/{chunk-BVJZ6435.js.map → chunk-QD4OU22C.js.map} +0 -0
  109. /package/dist/{chunk-RYALTDJI.js.map → chunk-RPIILAZ5.js.map} +0 -0
  110. /package/dist/{chunk-QJFAJORX.js.map → chunk-TN4TZY7G.js.map} +0 -0
  111. /package/dist/{chunk-H744C3MH.js.map → chunk-VDIUCVWJ.js.map} +0 -0
  112. /package/dist/{chunk-HCGBT46A.js.map → chunk-WTF7JOIQ.js.map} +0 -0
  113. /package/dist/{chunk-Q64XH2HD.js.map → chunk-X7PDG4FB.js.map} +0 -0
  114. /package/dist/{chunk-GUBKR5CU.js.map → chunk-YSZEGC2L.js.map} +0 -0
  115. /package/dist/{chunk-QMQYRYOJ.js.map → chunk-ZUWPUBWZ.js.map} +0 -0
  116. /package/dist/{chunk-SNLXXBXP.js.map → chunk-ZXUQALBB.js.map} +0 -0
  117. /package/dist/{cli-UUU72LBP.js.map → cli-F65QNC6S.js.map} +0 -0
  118. /package/dist/{commands-HN4V6NUM.js.map → commands-A6WCP2T2.js.map} +0 -0
  119. /package/dist/{config-SKKYAIQT.js.map → config-TEBSBFSO.js.map} +0 -0
  120. /package/dist/{context-VC4F6CQH.js.map → context-T5NFLTK4.js.map} +0 -0
  121. /package/dist/{conversationTracker-2PRBUDU7.js.map → conversationTracker-ZUJHBMDH.js.map} +0 -0
  122. /package/dist/{customCommands-KFSKRLOR.js.map → customCommands-TBZ5RMJ5.js.map} +0 -0
  123. /package/dist/{env-UXRNUTRY.js.map → env-3LH2POC2.js.map} +0 -0
  124. /package/dist/{file-YOLDPGAZ.js.map → file-O7PWWVFS.js.map} +0 -0
  125. /package/dist/{llm-NNPSCVNC.js.map → llm-OW7QDXPZ.js.map} +0 -0
  126. /package/dist/{llmLazy-VFQBE4VQ.js.map → llmLazy-CCD2PHFB.js.map} +0 -0
  127. /package/dist/{loader-JLKU56P4.js.map → loader-RBCHNZJW.js.map} +0 -0
  128. /package/dist/{lsp-ODCSAM2C.js.map → lsp-WAD7S2GA.js.map} +0 -0
  129. /package/dist/{lspAnchor-DRPDOTNI.js.map → lspAnchor-B5AR4FPG.js.map} +0 -0
  130. /package/dist/{mcp-YNM5F6DI.js.map → mcp-5H5KKR2C.js.map} +0 -0
  131. /package/dist/{mentionProcessor-XE5YX3QF.js.map → mentionProcessor-NK7NPMF2.js.map} +0 -0
  132. /package/dist/{messages-S6CUVFAR.js.map → messages-DHHFMED7.js.map} +0 -0
  133. /package/dist/{model-XRNLQZ4O.js.map → model-XWJ23WCS.js.map} +0 -0
  134. /package/dist/{openai-JAWY3TYO.js.map → openai-WAGWEANY.js.map} +0 -0
  135. /package/dist/{outputStyles-C2BALUUY.js.map → outputStyles-F6PPD3VU.js.map} +0 -0
  136. /package/dist/{pluginRuntime-S7J5ODQU.js.map → pluginRuntime-BFIRISID.js.map} +0 -0
  137. /package/dist/{pluginValidation-QTKM6IXY.js.map → pluginValidation-FDI5C7J7.js.map} +0 -0
  138. /package/dist/{prompts-QVC7LLMH.js.map → prompts-XIY3JRPC.js.map} +0 -0
  139. /package/dist/{pybAgentSessionLoad-QONCGHTI.js.map → pybAgentSessionLoad-Z57EVSBX.js.map} +0 -0
  140. /package/dist/{pybAgentSessionResume-2MIW4X3R.js.map → pybAgentSessionResume-74AWGCWV.js.map} +0 -0
  141. /package/dist/{pybAgentStreamJsonSession-7IBCTJCI.js.map → pybAgentStreamJsonSession-HVWGJB4Q.js.map} +0 -0
  142. /package/dist/{pybHooks-2FKUCMJD.js.map → pybHooks-FZYE52XG.js.map} +0 -0
  143. /package/dist/{query-HUTD7BSB.js.map → query-JWT6DB4G.js.map} +0 -0
  144. /package/dist/{registry-OVP3MKFX.js.map → registry-FCKOLGU5.js.map} +0 -0
  145. /package/dist/{ripgrep-KOL5M55E.js.map → ripgrep-MYG754KL.js.map} +0 -0
  146. /package/dist/{skillMarketplace-XXVBYC57.js.map → skillMarketplace-B5UZC4ES.js.map} +0 -0
  147. /package/dist/{state-CVENJNIV.js.map → state-SP4W7M4L.js.map} +0 -0
  148. /package/dist/{theme-CV36XY2J.js.map → theme-OZAWAG6W.js.map} +0 -0
  149. /package/dist/{toolPermissionSettings-MBBYIXDA.js.map → toolPermissionSettings-S2WBKN66.js.map} +0 -0
  150. /package/dist/{tools-2UQZG6N5.js.map → tools-UE2MORVX.js.map} +0 -0
  151. /package/dist/{userInput-JZQSTMJF.js.map → userInput-YJPISBP7.js.map} +0 -0
@@ -41,57 +41,57 @@ import {
41
41
  runWithTaskListEnv,
42
42
  runWithTaskListId,
43
43
  updateTask
44
- } from "./chunk-A3WIVAEQ.js";
44
+ } from "./chunk-SIE7VHSI.js";
45
45
  import {
46
46
  queryLLM
47
- } from "./chunk-RYALTDJI.js";
47
+ } from "./chunk-RPIILAZ5.js";
48
48
  import {
49
49
  FallbackToolUseRejectedMessage,
50
50
  MCPTool,
51
51
  getClients,
52
52
  getMCPTools
53
- } from "./chunk-SNLXXBXP.js";
53
+ } from "./chunk-ZXUQALBB.js";
54
54
  import {
55
55
  emitReminderEvent
56
- } from "./chunk-BJHBQUXH.js";
56
+ } from "./chunk-LMTF4FXH.js";
57
57
  import {
58
58
  getActiveAgents,
59
59
  getAgentByType,
60
60
  getAvailableAgentTypes
61
- } from "./chunk-KG3TWGBU.js";
61
+ } from "./chunk-6MZDAIOV.js";
62
62
  import {
63
63
  INTERRUPT_MESSAGE,
64
64
  createAssistantMessage,
65
65
  createUserMessage,
66
66
  getLastAssistantMessageId
67
- } from "./chunk-IQV3HS22.js";
67
+ } from "./chunk-BKG4N5U7.js";
68
68
  import {
69
69
  formatDuration,
70
70
  formatNumber
71
71
  } from "./chunk-OUXHGDLH.js";
72
72
  import {
73
73
  getAbsolutePath
74
- } from "./chunk-MBM5WCIY.js";
74
+ } from "./chunk-BRDQQ6DH.js";
75
75
  import {
76
76
  LspFacade,
77
77
  formatDiagnosticsPretty
78
- } from "./chunk-HCGBT46A.js";
78
+ } from "./chunk-WTF7JOIQ.js";
79
79
  import {
80
80
  getModelManager
81
- } from "./chunk-BVJZ6435.js";
81
+ } from "./chunk-QD4OU22C.js";
82
82
  import {
83
83
  getContext
84
- } from "./chunk-MWSQEKK6.js";
84
+ } from "./chunk-DM2LV6T7.js";
85
85
  import {
86
86
  filesToTree,
87
87
  ripGrepWithStatus
88
- } from "./chunk-QMQYRYOJ.js";
88
+ } from "./chunk-ZUWPUBWZ.js";
89
89
  import {
90
90
  getTheme
91
- } from "./chunk-TI57KY6H.js";
91
+ } from "./chunk-NM5GLMVH.js";
92
92
  import {
93
93
  debug
94
- } from "./chunk-Q64XH2HD.js";
94
+ } from "./chunk-X7PDG4FB.js";
95
95
  import {
96
96
  BunShell,
97
97
  MEMORY_DIR,
@@ -103,7 +103,7 @@ import {
103
103
  overwriteLog,
104
104
  readTaskOutput,
105
105
  resolveXdgDataPath
106
- } from "./chunk-RHLNLOZP.js";
106
+ } from "./chunk-GKFPN3PD.js";
107
107
 
108
108
  // src/tools/index.ts
109
109
  import { memoize as memoize2 } from "lodash-es";
@@ -782,7 +782,7 @@ async function analyzeOutputWithLsp(output, exitCode) {
782
782
  if (exitCode !== 0 || errorCount > 0 || warningCount > 0) {
783
783
  try {
784
784
  const { isAbsolute: isAbsolute3, resolve: resolve4 } = await import("path");
785
- const { getSessionRoot: getSessionRoot2 } = await import("./state-CVENJNIV.js");
785
+ const { getSessionRoot: getSessionRoot2 } = await import("./state-SP4W7M4L.js");
786
786
  const lines = output.split("\n");
787
787
  const uniqueFiles = /* @__PURE__ */ new Set();
788
788
  const lspSuggestions = [];
@@ -1155,7 +1155,7 @@ var DeleteTool = {
1155
1155
  }
1156
1156
  if (!force) {
1157
1157
  try {
1158
- const { LspFacade: LspFacade2 } = await import("./lsp-ODCSAM2C.js");
1158
+ const { LspFacade: LspFacade2 } = await import("./lsp-WAD7S2GA.js");
1159
1159
  const referenceDetail = await LspFacade2.checkFileReferences(fullPath);
1160
1160
  if (referenceDetail) {
1161
1161
  failedItems.push(
@@ -1327,38 +1327,110 @@ import { z as z5 } from "zod";
1327
1327
  import { minimatch } from "minimatch";
1328
1328
 
1329
1329
  // src/tools/lsTool/prompt.ts
1330
- var DESCRIPTION3 = `\u5217\u51FA\u6307\u5B9A\u76EE\u5F55\u7684\u4E00\u5C42\u5B8C\u6574\u4E14\u53EF\u9760\u7684\u6811\u5F62\u7ED3\u6784\u89C6\u56FE\u548C\u7EDF\u8BA1\u660E\u7EC6\u4FE1\u606F\u3002
1331
-
1332
- \u7528\u6CD5\uFF1A
1333
- 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
1334
- 2. **\u76EE\u5F55\u7ED3\u6784\u4FE1\u606F**\uFF1A\u8F93\u51FA\u6307\u5B9A\u76EE\u5F55\u7ED3\u6784\u5E76\u5305\u542B [\u76EE\u5F55\u7ED3\u6784\u4FE1\u606F] + [\u76EE\u5F55\u9876\u5C42\u7ED3\u6784\u89C6\u56FE]\uFF08\u4E00\u5C42\u76EE\u5F55\u4E0E\u9876\u5C42\u6587\u4EF6\uFF09\u4FE1\u606F\u3002
1335
-
1336
- ## Search Strategy
1337
- - **\u5206\u5C42\u63A2\u7D22\u6A21\u5F0F**: \u4ECE\u6839\u76EE\u5F55\u5F00\u59CB\uFF0C\u9010\u5C42\u6DF1\u5165\u3002
1338
- - Step 1: LS \u6839\u76EE\u5F55\u83B7\u53D6\u9876\u5C42\u7ED3\u6784
1339
- - Step 2: \u5206\u6790\u9876\u5C42\u7ED3\u6784\uFF0C\u8BC6\u522B\u5019\u9009\u76EE\u5F55\uFF08\u5982 src/, app/, lib/\uFF09
1340
- - Step 3: \u5BF9\u5019\u9009\u76EE\u5F55\u9010\u5C42 LS \u6216\u7528 Glob \u786E\u8BA4\u8DEF\u5F84
1341
- - **\u590D\u6742\u5EA6\u5206\u6790\u6307\u5BFC**: \u6839\u636E\u7EDF\u8BA1\u4FE1\u606F\u9009\u62E9\u7B56\u7565\u3002
1342
- - \u4F4E\u590D\u6742\u5EA6\uFF08\u76EE\u5F55/\u6587\u4EF6\u6BD4\u4F8B\u4F4E\u3001\u6DF1\u5EA6\u6D45\uFF09\u2192 \u53EF\u76F4\u63A5\u6DF1\u5165
1343
- - \u9AD8\u590D\u6742\u5EA6\uFF08\u76EE\u5F55/\u6587\u4EF6\u6BD4\u4F8B\u9AD8\u3001\u6DF1\u5EA6\u5927\uFF09\u2192 \u5206\u7247\u63A2\u7D22 + Glob \u786E\u8BA4
1344
- - **\u4E0E\u5176\u4ED6\u5DE5\u5177\u534F\u4F5C**:
1345
- - LS \u2192 \u63D0\u4F9B\u7ED3\u6784\u7EBF\u7D22
1346
- - Glob \u2192 \u786E\u8BA4\u8DEF\u5F84\u5B58\u5728\u6027\uFF08\u5982 src/* \u548C src/*/\uFF09
1347
- - Grep \u2192 \u5B9A\u4F4D\u5177\u4F53\u6587\u4EF6\u6216\u7B26\u53F7
1348
-
1349
- \u8BF4\u660E\uFF1A
1350
- - \u9ED8\u8BA4\u4EC5\u8F93\u51FA\u4E00\u5C42\u76EE\u5F55\u7ED3\u6784\u4E0E\u7EDF\u8BA1\u4FE1\u606F\u3002
1351
- - path \u53C2\u6570\u5FC5\u987B\u4E3A\u7EDD\u5BF9\u8DEF\u5F84\u3002
1352
- - \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
1353
- - \u5BF9\u5019\u9009\u5B50\u76EE\u5F55\u7EE7\u7EED LS \u6216\u7528 Glob/Grep \u6536\u655B\u3002
1354
- - \u4E0D\u7528\u4E8E\u6A21\u7CCA\u67E5\u627E\u6587\u4EF6\u540D\u6216\u5185\u5BB9\uFF0C\u76F8\u5173\u573A\u666F\u7528 Glob/Grep\u3002
1355
- - \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
1356
-
1357
- \u9002\u7528\u573A\u666F\uFF1A
1358
- - \u5FEB\u901F\u4E86\u89E3\u9879\u76EE\u6216\u6307\u5B9A\u76EE\u5F55\u7684\u4E00\u5C42\u6587\u4EF6\u76EE\u5F55\u4FE1\u606F\u4E0E\u7EDF\u8BA1\u4FE1\u606F
1359
- - \u9700\u8981\u6DF1\u5165\u5206\u6790\u4EE3\u7801\u5E93\u6216\u529F\u80FD\u65F6\uFF0C\u4F5C\u4E3A\u76EE\u5F55\u5165\u53E3\u5B9A\u4F4D\u5DE5\u5177\uFF0C\u4E0E Glob/Grep \u914D\u5408\u4F7F\u7528
1360
- - \u521D\u6B21\u63A2\u7D22\u65B0\u9879\u76EE\u65F6\u3002
1361
- - \u5728\u6587\u4EF6\u7CFB\u7EDF\u4E2D\u51FA\u73B0\u8FF7\u5931\u65B9\u5411\u6216\u4E0E\u5B9E\u9645\u8981\u6C42\u4E0D\u7B26\u65F6\u3002
1330
+ var DESCRIPTION3 = `List a single-level directory structure with statistics for the specified path.
1331
+
1332
+ **Usage:**
1333
+ 1. **Ignore Rules**: Use \`ignore\` to exclude noisy paths and reduce output. Common non-core directories/build artifacts/dependency caches (e.g., node_modules, dist) are ignored by default.
1334
+ 2. **Directory Structure Info**: Outputs the specified directory structure with [Directory Structure Info] + [Top-Level Structure View] (single-level directories and top-level files).
1335
+
1336
+ **Search Strategy:**
1337
+ 1. **Layered Exploration Mode**: Start from the root directory, drill
1338
+ down layer by layer.
1339
+ - Step 1: LS root directory to get top-level structure
1340
+ - Step 2: Analyze top-level structure, identify candidate directories(e.g., src/, app/, lib/)
1341
+ - Step 3: LS candidate directories layer by layer or use Glob to confirm paths
1342
+ 2. **Complexity-Guided Strategy**: Choose strategy based on statistics.
1343
+ - Low complexity (low directory/file ratio, shallow depth) \u2192 can drill down directly
1344
+ - High complexity (high directory/file ratio, deep depth) \u2192 segmented exploration + Glob confirmation
1345
+ 3. **Tool Collaboration**:
1346
+ - LS \u2192 Provides structural clues
1347
+ - Glob \u2192 Confirms path existence (e.g., src/* and src/*/)
1348
+ - Grep \u2192 Locates specific files or symbols
1349
+
1350
+ **Notes:**
1351
+ - Outputs only single-level directory structure and statistics by default.
1352
+ - path parameter must be an absolute path.
1353
+ - Path Source Constraint: When path is not user-provided, must first confirm parent directory exists using LS/Glob, then LS the subdirectory.
1354
+ info with statistics
1355
+ - As a directory entry point tool when deep analysis of codebase or functionality is needed, used in conjunction with Glob/Grep
1356
+ - As a directory entry point tool when exploring a new project for the first time
1357
+ - When lost in the filesystem or when results don't match expectations
1358
+
1359
+ **Applicable Scenarios:**
1360
+ - Quickly understand the single-level directory structure and file
1361
+ list information with statistics for a specified directory
1362
+ - As a directory entry point tool when deep analysis of codebase or
1363
+ functionality is needed, used in conjunction with Glob/Grep
1364
+ - As a directory entry point tool when exploring a new project for
1365
+ the first time
1366
+ - When lost in the filesystem or when results don't match actual
1367
+ requirements
1368
+
1369
+ **Typical Usage Examples:**
1370
+
1371
+ - Example 1: Deterministic - User Explicitly Requests Directory Overview
1372
+ <example>
1373
+ user: Show me the structure of src/components/
1374
+ assistant: [uses LS tool on src/components/]
1375
+ </example>
1376
+
1377
+ - Example 2: Deterministic - Confirm Path Existence
1378
+ Before Deep Search
1379
+ <example>
1380
+ user: Find all test files in src/auth/
1381
+ assistant: [uses LS tool on src/auth/ to confirm directory exists and understand structure]
1382
+ [uses Glob tool with pattern="**/*.test.ts"path="src/auth/"]
1383
+ </example>
1384
+
1385
+ - Example 3: Non-Deterministic - New Project Exploration (LS as Entry Point)
1386
+ <example>
1387
+ user: I'm new to this project, help me understand its structure
1388
+ assistant: [uses LS tool on project root to get top-level structure and complexity stats]
1389
+ [analyzes stats: low ratio \u2192 direct deep dive; high ratio \u2192 layered exploration with Glob]
1390
+ [uses LS on candidate directories (e.g., src/, app/,lib/) to identify modules]
1391
+ [uses Grep or Glob to locate specific files based on discovered structure]
1392
+ </example>
1393
+
1394
+ - Example 4: Non-Deterministic - Complexity-Guided Strategy Selection
1395
+ <example>
1396
+ user: Where is the main business logic?
1397
+ assistant: [uses LS tool on project root]
1398
+ [reads stats: totalDirectories/totalFiles ratio=0.8,maxDepth=5 \u2192 high complexity]
1399
+ [decision: use layered Glob instead of broad Grep]
1400
+ [uses Glob tool with pattern="src/**/*.ts" to narrow to source area]
1401
+ [uses Grep tool with pattern="class.*Service" path="src/" semantic: true]
1402
+ </example>
1403
+
1404
+ - Example 5: Collaboration - LS Confirms Scope for Grep
1405
+ <example>
1406
+ user: Search for "authenticate" in the API module
1407
+ assistant: [uses LS tool on src/ to identify if "api" directory exists]
1408
+ [uses LS tool on src/api/ to confirm subdirectory structure]
1409
+ [uses Grep tool with pattern="authenticate"path="src/api/"]
1410
+ </example>
1411
+
1412
+ - Example 6: Recovery - "Lost in Filesystem" Scenario
1413
+ <example>
1414
+ user: I searched but couldn't find the config files mentioned in docs
1415
+ assistant: [uses LS tool on current working directory to reorient]
1416
+ [uses LS tool on likely parent directories to trace expected path]
1417
+ [uses Glob tool with pattern="**/config*" based on LS-discovered structure]
1418
+ </example>
1419
+
1420
+ - Example 7: Parallel Confirmation for Multiple
1421
+ Candidates
1422
+ <example>
1423
+ user: Which directory contains the database layer?
1424
+ assistant: [uses LS tool on src/ to list top-level modules]
1425
+ [uses LS tool in parallel on src/db/, src/database/,src/data/ to identify which exists]
1426
+ [uses Grep tool with pattern="connection|pool" on the confirmed directory]
1427
+ </example>
1428
+
1429
+ **When NOT to Use LS:**
1430
+ - User provides exact file path \u2192 Use Read directly
1431
+ - User provides exact search pattern \u2192 Use Grep directly
1432
+ - User requests specific file type \u2192 Use Glob directly
1433
+ - Need to find files by content \u2192 Use Grep, not LS
1362
1434
  `.trim();
1363
1435
 
1364
1436
  // src/tools/lsTool/lsTool.tsx
@@ -1671,8 +1743,7 @@ import { z as z6 } from "zod";
1671
1743
 
1672
1744
  // src/tools/search/LspTool/prompt.ts
1673
1745
  var TOOL_NAME_FOR_PROMPT2 = "LSP";
1674
- var PROMPT4 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.
1675
- Supports 29+ languages including Python, Go, Rust, TypeScript, JavaScript, Bash, Java, C++, PHP, and more.
1746
+ var PROMPT4 = `Interact with Language Server Protocol (LSP) servers to get code intelligence features.Supports all languages.
1676
1747
 
1677
1748
  ## Capabilities & Scenarios
1678
1749
  This tool acts as your "Code Analyst". Use it to understand the codebase semantically, rather than just matching text.
@@ -1708,32 +1779,61 @@ This tool acts as your "Code Analyst". Use it to understand the codebase semanti
1708
1779
  - **Why**: It waits for the language server to re-analyze the file and returns fresh errors/warnings. This is your "Self-Correction" mechanism.
1709
1780
 
1710
1781
  ## Supported Operations
1711
- - goToDefinition: Find where a symbol is defined
1712
- - findReferences: Find all references to a symbol
1713
- - hover: Get hover information (documentation, type info) for a symbol
1714
- - documentSymbol: Get all symbols (functions, classes, variables) in a document
1715
- - workspaceSymbol: Search for symbols across the entire workspace
1716
- - goToImplementation: Find implementations of an interface or abstract method
1717
- - prepareCallHierarchy: Get call hierarchy item at a position (functions/methods)
1718
- - incomingCalls: Find all functions/methods that call the function at a position
1719
- - outgoingCalls: Find all functions/methods called by the function at a position
1720
- - getScope: Get local variables and closure captures at a position
1721
- - diagnostics: Get validation errors and warnings for a file (supports waiting for fresh results)
1782
+
1783
+ ### Location-Based Operations (require line + character)
1784
+ These 8 operations require precise symbol position:
1785
+ - \`goToDefinition\`: Find where a symbol is defined
1786
+ - \`findReferences\`: Find all references to a symbol
1787
+ - \`hover\`: Get hover information (documentation, type info) for a symbol
1788
+ - \`goToImplementation\`: Find implementations of an interface or abstract method
1789
+ - \`prepareCallHierarchy\`: Get call hierarchy item at a position (functions/methods)
1790
+ - \`incomingCalls\`: Find all functions/methods that call the function at a position
1791
+ - \`outgoingCalls\`: Find all functions/methods called by the function at a position
1792
+ - \`getScope\`: Get local variables and closure captures at a position
1793
+
1794
+ ### Document-Level Operations (no position required)
1795
+ - \`documentSymbol\`: Get all symbols (functions, classes, variables) in a document
1796
+ - \`diagnostics\`: Get validation errors and warnings for a file (supports waiting for fresh results)
1797
+
1798
+ ### Workspace-Level Operations
1799
+ - \`workspaceSymbol\`: Search for symbols across the entire workspace (requires query + scoped filePath)
1800
+
1801
+ ## Parameters
1722
1802
 
1723
1803
  All operations require:
1724
- - filePath: The file or directory to operate on
1804
+ - \`filePath\`: The file or directory to operate on
1725
1805
 
1726
1806
  Location-based operations require:
1727
- - line: The line number (1-based, as shown in editors)
1728
- - character: The character offset (1-based, as shown in editors)
1729
- Do not pass a symbol name. LSPTool works on positions, not names. Use Read to locate the symbol and derive line + character first.
1730
- workspaceSymbol requires:
1731
- - query: The symbol name or keyword to search for
1732
-
1733
- ## LSP \u540E\u7F6E\u4E0E\u8303\u56F4\u9650\u5236
1734
- - \u4F18\u5148\u987A\u5E8F\uFF1A\u7ED3\u6784\u6811 -> \u70ED\u70B9\u5B9A\u4F4D -> Read -> LSP\uFF08\u786E\u4FDD\u62FF\u5230 line + character\uFF09
1735
- - 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
1736
- - documentSymbol \u7684\u4F18\u5148\u7EA7\u7531 LspFacade \u51B3\u5B9A\uFF08\u9ED8\u8BA4 LSP \u4F18\u5148\uFF0CTree-Sitter \u515C\u5E95\uFF09
1807
+ - \`line\`: The line number (1-based, as shown in editors)
1808
+ - \`character\`: The character offset (1-based, as shown in editors)
1809
+
1810
+ \`workspaceSymbol\` requires:
1811
+ - \`query\`: The symbol name or keyword to search for
1812
+
1813
+ Optional:
1814
+ - \`waitForDiagnostics\`: If true, wait for fresh diagnostics (used with "diagnostics" operation)
1815
+ - \`timeout\`: Timeout in milliseconds for waiting operations (default: 5000)
1816
+
1817
+ ## Intelligent Position Handling
1818
+
1819
+ **Do not pass a symbol name.** LSPTool works on positions, not names. Use Read to locate the symbol and derive line + character first.
1820
+
1821
+ ### Auto-Adjustment Mechanism
1822
+ If the specified position is not on a valid symbol, the tool automatically searches for the nearest valid token:
1823
+ - **Search scope**: Current line, then previous line, then next line
1824
+ - **Priority**: Current line tokens are preferred (lower score)
1825
+ - **If no valid token found**: Returns an error message
1826
+
1827
+ ### Best Practice for Position
1828
+ 1. Use Read to open the file and locate the symbol
1829
+ 2. Provide accurate 1-based line and character offset
1830
+ 3. Position should be on the symbol name itself, not on keywords/operators
1831
+ 4. If unsure, position at the start of the symbol name
1832
+
1833
+ ## Workflow & Scope Guidelines
1834
+ - **Priority order**: documentSymbol \u2192 hotspot detection \u2192 Read \u2192 LSP (ensure line + character)
1835
+ - **workspaceSymbol**: Must provide scoped filePath (module or directory), avoid unbounded full-repo queries
1836
+ - **documentSymbol**: Uses LspFacade policy (LSP-first for accuracy, Tree-Sitter fallback for speed)
1737
1837
 
1738
1838
  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.`;
1739
1839
  var DESCRIPTION4 = PROMPT4;