pybao-cli 1.5.6 → 1.5.8
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-AHBTBEED.js +49 -0
- package/dist/{acp-3KRM4YMC.js → acp-53E7A6L4.js} +30 -30
- package/dist/{agentsValidate-T6E3S4SD.js → agentsValidate-VSDRHIJQ.js} +7 -7
- package/dist/{ask-OT3N6WUV.js → ask-XUXTH3EI.js} +29 -29
- package/dist/{autoUpdater-MBTYMKZZ.js → autoUpdater-GAWZB7YO.js} +3 -3
- package/dist/{chunk-DM2LV6T7.js → chunk-46Z3GAE4.js} +4 -4
- package/dist/{chunk-L3QFTUHN.js → chunk-4I2M26LO.js} +3 -3
- package/dist/{chunk-GPSHYLDR.js → chunk-4QTASHFO.js} +1 -1
- package/dist/{chunk-2DY7NKZY.js → chunk-543LWZDY.js} +3 -3
- package/dist/{chunk-63RVOHFS.js → chunk-5PSLFGDF.js} +1 -1
- package/dist/{chunk-63RVOHFS.js.map → chunk-5PSLFGDF.js.map} +1 -1
- package/dist/{chunk-PCSIH35L.js → chunk-62CZOFWT.js} +1 -1
- package/dist/{chunk-CXLPIXKP.js → chunk-AQXOZUAV.js} +2 -2
- package/dist/{chunk-BKG4N5U7.js → chunk-B62BK4YK.js} +1 -1
- package/dist/{chunk-GKFPN3PD.js → chunk-DRP66QHJ.js} +1 -1
- package/dist/{chunk-TN4TZY7G.js → chunk-FKDSZPS4.js} +2 -2
- package/dist/{chunk-LMTF4FXH.js → chunk-FQMMZCOL.js} +2 -2
- package/dist/{chunk-WTF7JOIQ.js → chunk-H67PQDUM.js} +4 -4
- package/dist/{chunk-X7PDG4FB.js → chunk-HOBCGAUT.js} +1 -1
- package/dist/{chunk-5TPUQEB7.js → chunk-IWKEQNWI.js} +3 -3
- package/dist/{chunk-FZEVFEDH.js → chunk-IZ6NAVRD.js} +1 -1
- package/dist/{chunk-BRDQQ6DH.js → chunk-JFIH5LIP.js} +2 -2
- package/dist/{chunk-KO6ENKTQ.js → chunk-JZPXOQK3.js} +3 -3
- package/dist/{chunk-6MZDAIOV.js → chunk-KRTFCQTN.js} +2 -2
- package/dist/{chunk-YSZEGC2L.js → chunk-LNE2PRIU.js} +3 -3
- package/dist/{chunk-MLZYATJX.js → chunk-LNPUQ3UL.js} +1 -1
- package/dist/{chunk-DTWSIMGF.js → chunk-MHFWCK5F.js} +2 -2
- package/dist/{chunk-33HCNVDW.js → chunk-RAOXUYK3.js} +2 -2
- package/dist/{chunk-VDIUCVWJ.js → chunk-RFY3YUHB.js} +3 -3
- package/dist/{chunk-SIE7VHSI.js → chunk-TJUTH3WH.js} +59 -62
- package/dist/chunk-TJUTH3WH.js.map +7 -0
- package/dist/{chunk-HV4AL2VG.js → chunk-VBJ6J63U.js} +1 -1
- package/dist/{chunk-QD4OU22C.js → chunk-VRWY6YIJ.js} +3 -3
- package/dist/{chunk-RPIILAZ5.js → chunk-VW7ZPH5U.js} +4 -4
- package/dist/{chunk-ZXUQALBB.js → chunk-WBAZ4MMW.js} +4 -4
- package/dist/{chunk-AKLGEOKM.js → chunk-WQVP2232.js} +21 -22
- package/dist/chunk-WQVP2232.js.map +7 -0
- package/dist/{chunk-NM5GLMVH.js → chunk-YABL4JYT.js} +1 -1
- package/dist/{chunk-ZUWPUBWZ.js → chunk-Z35GPUWK.js} +1 -1
- package/dist/{cli-F65QNC6S.js → cli-3QFWTKDS.js} +89 -89
- package/dist/commands-ITOHDPPP.js +53 -0
- package/dist/{config-TEBSBFSO.js → config-DFRB2SLO.js} +4 -4
- package/dist/{context-T5NFLTK4.js → context-V62FBZVF.js} +6 -6
- package/dist/{conversationTracker-ZUJHBMDH.js → conversationTracker-DZR2N3FQ.js} +3 -3
- package/dist/{customCommands-TBZ5RMJ5.js → customCommands-3ZIVHLTU.js} +4 -4
- package/dist/{env-3LH2POC2.js → env-BMFEDWPX.js} +2 -2
- package/dist/{file-O7PWWVFS.js → file-SD5NRUTD.js} +4 -4
- package/dist/index.js +3 -3
- package/dist/{llm-OW7QDXPZ.js → llm-466UDKVG.js} +30 -30
- package/dist/{llmLazy-CCD2PHFB.js → llmLazy-7R7P5A3P.js} +1 -1
- package/dist/{loader-RBCHNZJW.js → loader-X7RIUXJB.js} +4 -4
- package/dist/{lsp-WAD7S2GA.js → lsp-2FPBS2M3.js} +6 -6
- package/dist/{lspAnchor-B5AR4FPG.js → lspAnchor-KQNSWWL3.js} +6 -6
- package/dist/{mcp-5H5KKR2C.js → mcp-3SV4TZYL.js} +7 -7
- package/dist/{mentionProcessor-NK7NPMF2.js → mentionProcessor-KJP4IYVF.js} +5 -5
- package/dist/{messages-DHHFMED7.js → messages-BXF7LJIV.js} +1 -1
- package/dist/{model-XWJ23WCS.js → model-F6VCUHDL.js} +5 -5
- package/dist/{openai-WAGWEANY.js → openai-QTTJIB6O.js} +5 -5
- package/dist/{outputStyles-F6PPD3VU.js → outputStyles-SJ57QG7S.js} +4 -4
- package/dist/{pluginRuntime-BFIRISID.js → pluginRuntime-4SDXCK4Q.js} +6 -6
- package/dist/{pluginValidation-FDI5C7J7.js → pluginValidation-YJ4W3MX4.js} +6 -6
- package/dist/prompts-5RPQRZ3L.js +55 -0
- package/dist/{pybAgentSessionLoad-Z57EVSBX.js → pybAgentSessionLoad-IZULLNUL.js} +4 -4
- package/dist/{pybAgentSessionResume-74AWGCWV.js → pybAgentSessionResume-QRNTC3A3.js} +4 -4
- package/dist/{pybAgentStreamJsonSession-HVWGJB4Q.js → pybAgentStreamJsonSession-RUHPYCTJ.js} +1 -1
- package/dist/{pybHooks-FZYE52XG.js → pybHooks-GX3AIY4U.js} +4 -4
- package/dist/query-YLKPJVHB.js +57 -0
- package/dist/{registry-FCKOLGU5.js → registry-JNPRNIFB.js} +5 -5
- package/dist/{ripgrep-MYG754KL.js → ripgrep-ZKWM7RMS.js} +3 -3
- package/dist/{skillMarketplace-B5UZC4ES.js → skillMarketplace-4LJAYRMX.js} +3 -3
- package/dist/{state-SP4W7M4L.js → state-I6BQR2T5.js} +2 -2
- package/dist/{theme-OZAWAG6W.js → theme-GL7HKKCQ.js} +5 -5
- package/dist/{toolPermissionSettings-S2WBKN66.js → toolPermissionSettings-ZRTSQVQ2.js} +6 -6
- package/dist/tools-4GEB2BRR.js +54 -0
- package/dist/{userInput-YJPISBP7.js → userInput-M6JYKQCU.js} +31 -31
- package/package.json +1 -1
- package/dist/REPL-S2UEVXWF.js +0 -49
- package/dist/chunk-AKLGEOKM.js.map +0 -7
- package/dist/chunk-SIE7VHSI.js.map +0 -7
- package/dist/commands-A6WCP2T2.js +0 -53
- package/dist/prompts-XIY3JRPC.js +0 -55
- package/dist/query-JWT6DB4G.js +0 -57
- package/dist/tools-UE2MORVX.js +0 -54
- /package/dist/{REPL-S2UEVXWF.js.map → REPL-AHBTBEED.js.map} +0 -0
- /package/dist/{acp-3KRM4YMC.js.map → acp-53E7A6L4.js.map} +0 -0
- /package/dist/{agentsValidate-T6E3S4SD.js.map → agentsValidate-VSDRHIJQ.js.map} +0 -0
- /package/dist/{ask-OT3N6WUV.js.map → ask-XUXTH3EI.js.map} +0 -0
- /package/dist/{autoUpdater-MBTYMKZZ.js.map → autoUpdater-GAWZB7YO.js.map} +0 -0
- /package/dist/{chunk-DM2LV6T7.js.map → chunk-46Z3GAE4.js.map} +0 -0
- /package/dist/{chunk-L3QFTUHN.js.map → chunk-4I2M26LO.js.map} +0 -0
- /package/dist/{chunk-GPSHYLDR.js.map → chunk-4QTASHFO.js.map} +0 -0
- /package/dist/{chunk-2DY7NKZY.js.map → chunk-543LWZDY.js.map} +0 -0
- /package/dist/{chunk-PCSIH35L.js.map → chunk-62CZOFWT.js.map} +0 -0
- /package/dist/{chunk-CXLPIXKP.js.map → chunk-AQXOZUAV.js.map} +0 -0
- /package/dist/{chunk-BKG4N5U7.js.map → chunk-B62BK4YK.js.map} +0 -0
- /package/dist/{chunk-GKFPN3PD.js.map → chunk-DRP66QHJ.js.map} +0 -0
- /package/dist/{chunk-TN4TZY7G.js.map → chunk-FKDSZPS4.js.map} +0 -0
- /package/dist/{chunk-LMTF4FXH.js.map → chunk-FQMMZCOL.js.map} +0 -0
- /package/dist/{chunk-WTF7JOIQ.js.map → chunk-H67PQDUM.js.map} +0 -0
- /package/dist/{chunk-X7PDG4FB.js.map → chunk-HOBCGAUT.js.map} +0 -0
- /package/dist/{chunk-5TPUQEB7.js.map → chunk-IWKEQNWI.js.map} +0 -0
- /package/dist/{chunk-FZEVFEDH.js.map → chunk-IZ6NAVRD.js.map} +0 -0
- /package/dist/{chunk-BRDQQ6DH.js.map → chunk-JFIH5LIP.js.map} +0 -0
- /package/dist/{chunk-KO6ENKTQ.js.map → chunk-JZPXOQK3.js.map} +0 -0
- /package/dist/{chunk-6MZDAIOV.js.map → chunk-KRTFCQTN.js.map} +0 -0
- /package/dist/{chunk-YSZEGC2L.js.map → chunk-LNE2PRIU.js.map} +0 -0
- /package/dist/{chunk-MLZYATJX.js.map → chunk-LNPUQ3UL.js.map} +0 -0
- /package/dist/{chunk-DTWSIMGF.js.map → chunk-MHFWCK5F.js.map} +0 -0
- /package/dist/{chunk-33HCNVDW.js.map → chunk-RAOXUYK3.js.map} +0 -0
- /package/dist/{chunk-VDIUCVWJ.js.map → chunk-RFY3YUHB.js.map} +0 -0
- /package/dist/{chunk-HV4AL2VG.js.map → chunk-VBJ6J63U.js.map} +0 -0
- /package/dist/{chunk-QD4OU22C.js.map → chunk-VRWY6YIJ.js.map} +0 -0
- /package/dist/{chunk-RPIILAZ5.js.map → chunk-VW7ZPH5U.js.map} +0 -0
- /package/dist/{chunk-ZXUQALBB.js.map → chunk-WBAZ4MMW.js.map} +0 -0
- /package/dist/{chunk-NM5GLMVH.js.map → chunk-YABL4JYT.js.map} +0 -0
- /package/dist/{chunk-ZUWPUBWZ.js.map → chunk-Z35GPUWK.js.map} +0 -0
- /package/dist/{cli-F65QNC6S.js.map → cli-3QFWTKDS.js.map} +0 -0
- /package/dist/{commands-A6WCP2T2.js.map → commands-ITOHDPPP.js.map} +0 -0
- /package/dist/{config-TEBSBFSO.js.map → config-DFRB2SLO.js.map} +0 -0
- /package/dist/{context-T5NFLTK4.js.map → context-V62FBZVF.js.map} +0 -0
- /package/dist/{conversationTracker-ZUJHBMDH.js.map → conversationTracker-DZR2N3FQ.js.map} +0 -0
- /package/dist/{customCommands-TBZ5RMJ5.js.map → customCommands-3ZIVHLTU.js.map} +0 -0
- /package/dist/{env-3LH2POC2.js.map → env-BMFEDWPX.js.map} +0 -0
- /package/dist/{file-O7PWWVFS.js.map → file-SD5NRUTD.js.map} +0 -0
- /package/dist/{llm-OW7QDXPZ.js.map → llm-466UDKVG.js.map} +0 -0
- /package/dist/{llmLazy-CCD2PHFB.js.map → llmLazy-7R7P5A3P.js.map} +0 -0
- /package/dist/{loader-RBCHNZJW.js.map → loader-X7RIUXJB.js.map} +0 -0
- /package/dist/{lsp-WAD7S2GA.js.map → lsp-2FPBS2M3.js.map} +0 -0
- /package/dist/{lspAnchor-B5AR4FPG.js.map → lspAnchor-KQNSWWL3.js.map} +0 -0
- /package/dist/{mcp-5H5KKR2C.js.map → mcp-3SV4TZYL.js.map} +0 -0
- /package/dist/{mentionProcessor-NK7NPMF2.js.map → mentionProcessor-KJP4IYVF.js.map} +0 -0
- /package/dist/{messages-DHHFMED7.js.map → messages-BXF7LJIV.js.map} +0 -0
- /package/dist/{model-XWJ23WCS.js.map → model-F6VCUHDL.js.map} +0 -0
- /package/dist/{openai-WAGWEANY.js.map → openai-QTTJIB6O.js.map} +0 -0
- /package/dist/{outputStyles-F6PPD3VU.js.map → outputStyles-SJ57QG7S.js.map} +0 -0
- /package/dist/{pluginRuntime-BFIRISID.js.map → pluginRuntime-4SDXCK4Q.js.map} +0 -0
- /package/dist/{pluginValidation-FDI5C7J7.js.map → pluginValidation-YJ4W3MX4.js.map} +0 -0
- /package/dist/{prompts-XIY3JRPC.js.map → prompts-5RPQRZ3L.js.map} +0 -0
- /package/dist/{pybAgentSessionLoad-Z57EVSBX.js.map → pybAgentSessionLoad-IZULLNUL.js.map} +0 -0
- /package/dist/{pybAgentSessionResume-74AWGCWV.js.map → pybAgentSessionResume-QRNTC3A3.js.map} +0 -0
- /package/dist/{pybAgentStreamJsonSession-HVWGJB4Q.js.map → pybAgentStreamJsonSession-RUHPYCTJ.js.map} +0 -0
- /package/dist/{pybHooks-FZYE52XG.js.map → pybHooks-GX3AIY4U.js.map} +0 -0
- /package/dist/{query-JWT6DB4G.js.map → query-YLKPJVHB.js.map} +0 -0
- /package/dist/{registry-FCKOLGU5.js.map → registry-JNPRNIFB.js.map} +0 -0
- /package/dist/{ripgrep-MYG754KL.js.map → ripgrep-ZKWM7RMS.js.map} +0 -0
- /package/dist/{skillMarketplace-B5UZC4ES.js.map → skillMarketplace-4LJAYRMX.js.map} +0 -0
- /package/dist/{state-SP4W7M4L.js.map → state-I6BQR2T5.js.map} +0 -0
- /package/dist/{theme-OZAWAG6W.js.map → theme-GL7HKKCQ.js.map} +0 -0
- /package/dist/{toolPermissionSettings-S2WBKN66.js.map → toolPermissionSettings-ZRTSQVQ2.js.map} +0 -0
- /package/dist/{tools-UE2MORVX.js.map → tools-4GEB2BRR.js.map} +0 -0
- /package/dist/{userInput-YJPISBP7.js.map → userInput-M6JYKQCU.js.map} +0 -0
|
@@ -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-4QTASHFO.js";
|
|
6
6
|
import {
|
|
7
7
|
parseFrontmatter
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-RAOXUYK3.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-DRP66QHJ.js";
|
|
12
12
|
|
|
13
13
|
// src/services/plugins/pluginValidation.ts
|
|
14
14
|
import { existsSync, lstatSync, readFileSync } from "node:fs";
|
|
@@ -8,12 +8,12 @@ import {
|
|
|
8
8
|
} from "./chunk-BJSWTHRM.js";
|
|
9
9
|
import {
|
|
10
10
|
debug
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-HOBCGAUT.js";
|
|
12
12
|
import {
|
|
13
13
|
getCwd,
|
|
14
14
|
getXdgConfigDir,
|
|
15
15
|
logError
|
|
16
|
-
} from "./chunk-
|
|
16
|
+
} from "./chunk-DRP66QHJ.js";
|
|
17
17
|
|
|
18
18
|
// src/utils/agent/loader.ts
|
|
19
19
|
import {
|
|
@@ -5,13 +5,13 @@ import {
|
|
|
5
5
|
} from "./chunk-RQVLBMP7.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HOBCGAUT.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd,
|
|
11
11
|
getGlobalConfigFilePath,
|
|
12
12
|
getLegacyGlobalConfigFilePath,
|
|
13
13
|
logError
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-DRP66QHJ.js";
|
|
15
15
|
|
|
16
16
|
// src/core/config/schema.ts
|
|
17
17
|
function isAutoUpdaterStatus(value) {
|
|
@@ -688,7 +688,7 @@ function setModelPointer(pointer, modelName) {
|
|
|
688
688
|
}
|
|
689
689
|
};
|
|
690
690
|
saveGlobalConfig(updatedConfig);
|
|
691
|
-
import("./model-
|
|
691
|
+
import("./model-F6VCUHDL.js").then(({ reloadModelManager }) => {
|
|
692
692
|
reloadModelManager();
|
|
693
693
|
});
|
|
694
694
|
}
|
|
@@ -9,10 +9,10 @@ import {
|
|
|
9
9
|
PLAN_SLUG_VERBS,
|
|
10
10
|
getCwd,
|
|
11
11
|
resolveXdgDataPath
|
|
12
|
-
} from "./chunk-
|
|
12
|
+
} from "./chunk-DRP66QHJ.js";
|
|
13
13
|
import {
|
|
14
14
|
MACRO
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-5PSLFGDF.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/protocol/pybAgentSessionLog.ts
|
|
18
18
|
import { execFileSync } from "child_process";
|
|
@@ -5,12 +5,12 @@ import {
|
|
|
5
5
|
} from "./chunk-BJSWTHRM.js";
|
|
6
6
|
import {
|
|
7
7
|
debug
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-HOBCGAUT.js";
|
|
9
9
|
import {
|
|
10
10
|
getCwd,
|
|
11
11
|
logError,
|
|
12
12
|
resolveXdgDataPath
|
|
13
|
-
} from "./chunk-
|
|
13
|
+
} from "./chunk-DRP66QHJ.js";
|
|
14
14
|
|
|
15
15
|
// src/services/plugins/customCommands.ts
|
|
16
16
|
import { existsSync, readFileSync, readdirSync, statSync } from "fs";
|
|
@@ -5,14 +5,14 @@ import {
|
|
|
5
5
|
} from "./chunk-B6IMQJZM.js";
|
|
6
6
|
import {
|
|
7
7
|
loadSettingsWithLegacyFallback
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-62CZOFWT.js";
|
|
9
9
|
import {
|
|
10
10
|
getSessionPlugins
|
|
11
11
|
} from "./chunk-BJSWTHRM.js";
|
|
12
12
|
import {
|
|
13
13
|
getCwd,
|
|
14
14
|
logError
|
|
15
|
-
} from "./chunk-
|
|
15
|
+
} from "./chunk-DRP66QHJ.js";
|
|
16
16
|
|
|
17
17
|
// src/utils/session/pybHooks.ts
|
|
18
18
|
import { spawn } from "child_process";
|
|
@@ -496,7 +496,7 @@ async function runPromptHook(args) {
|
|
|
496
496
|
fallbackTimeoutMs: args.fallbackTimeoutMs
|
|
497
497
|
});
|
|
498
498
|
try {
|
|
499
|
-
const { queryQuick } = await import("./llmLazy-
|
|
499
|
+
const { queryQuick } = await import("./llmLazy-7R7P5A3P.js");
|
|
500
500
|
const systemPrompt = [
|
|
501
501
|
"You are executing a Pyb prompt hook.",
|
|
502
502
|
"Return a single JSON object only (no markdown, no prose).",
|
|
@@ -2,11 +2,11 @@ import { createRequire as __pybCreateRequire } from "node:module";
|
|
|
2
2
|
const require = __pybCreateRequire(import.meta.url);
|
|
3
3
|
import {
|
|
4
4
|
listPybAgentSessions
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-LNPUQ3UL.js";
|
|
6
6
|
import {
|
|
7
7
|
formatValidationResult,
|
|
8
8
|
validatePluginOrMarketplacePath
|
|
9
|
-
} from "./chunk-
|
|
9
|
+
} from "./chunk-JZPXOQK3.js";
|
|
10
10
|
import {
|
|
11
11
|
ConversationTracker,
|
|
12
12
|
appendFinishState,
|
|
@@ -14,18 +14,18 @@ import {
|
|
|
14
14
|
getConversationTrackerForContext,
|
|
15
15
|
isFinishComplete,
|
|
16
16
|
mapFinishReason
|
|
17
|
-
} from "./chunk-
|
|
17
|
+
} from "./chunk-VBJ6J63U.js";
|
|
18
18
|
import {
|
|
19
19
|
beginReplSessionScope
|
|
20
20
|
} from "./chunk-F4AXICO7.js";
|
|
21
21
|
import {
|
|
22
22
|
loadPybAgentSessionMessages
|
|
23
|
-
} from "./chunk-
|
|
23
|
+
} from "./chunk-IZ6NAVRD.js";
|
|
24
24
|
import {
|
|
25
25
|
appendSessionCustomTitleRecord,
|
|
26
26
|
appendSessionJsonlFromMessage,
|
|
27
27
|
appendSessionTagRecord
|
|
28
|
-
} from "./chunk-
|
|
28
|
+
} from "./chunk-MHFWCK5F.js";
|
|
29
29
|
import {
|
|
30
30
|
drainHookSystemPromptAdditions,
|
|
31
31
|
getHookTranscriptPath,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
runStopHooks,
|
|
38
38
|
runUserPromptSubmitHooks,
|
|
39
39
|
updateHookTranscriptForMessages
|
|
40
|
-
} from "./chunk-
|
|
40
|
+
} from "./chunk-RFY3YUHB.js";
|
|
41
41
|
import {
|
|
42
42
|
DEFAULT_OUTPUT_STYLE,
|
|
43
43
|
getAvailableOutputStyles,
|
|
@@ -46,11 +46,11 @@ import {
|
|
|
46
46
|
getOutputStyleSystemPromptAdditions,
|
|
47
47
|
resolveOutputStyleName,
|
|
48
48
|
setCurrentOutputStyle
|
|
49
|
-
} from "./chunk-
|
|
49
|
+
} from "./chunk-FKDSZPS4.js";
|
|
50
50
|
import {
|
|
51
51
|
fetchCustomModels,
|
|
52
52
|
getModelFeatures
|
|
53
|
-
} from "./chunk-
|
|
53
|
+
} from "./chunk-AQXOZUAV.js";
|
|
54
54
|
import {
|
|
55
55
|
getSessionState
|
|
56
56
|
} from "./chunk-XKYHFZEC.js";
|
|
@@ -58,7 +58,7 @@ import {
|
|
|
58
58
|
queryLLM,
|
|
59
59
|
queryQuick,
|
|
60
60
|
verifyApiKey
|
|
61
|
-
} from "./chunk-
|
|
61
|
+
} from "./chunk-VW7ZPH5U.js";
|
|
62
62
|
import {
|
|
63
63
|
DEFAULT_TIMEOUT_MS,
|
|
64
64
|
FallbackToolUseRejectedMessage,
|
|
@@ -72,7 +72,7 @@ import {
|
|
|
72
72
|
listMCPServers,
|
|
73
73
|
loadMergedSettings,
|
|
74
74
|
normalizeSandboxRuntimeConfigFromSettings
|
|
75
|
-
} from "./chunk-
|
|
75
|
+
} from "./chunk-WBAZ4MMW.js";
|
|
76
76
|
import {
|
|
77
77
|
addMarketplace,
|
|
78
78
|
disableSkillPlugin,
|
|
@@ -85,11 +85,11 @@ import {
|
|
|
85
85
|
refreshMarketplaceAsync,
|
|
86
86
|
removeMarketplace,
|
|
87
87
|
uninstallSkillPlugin
|
|
88
|
-
} from "./chunk-
|
|
88
|
+
} from "./chunk-4QTASHFO.js";
|
|
89
89
|
import {
|
|
90
90
|
loadToolPermissionContextFromDisk,
|
|
91
91
|
persistToolPermissionUpdateToDisk
|
|
92
|
-
} from "./chunk-
|
|
92
|
+
} from "./chunk-4I2M26LO.js";
|
|
93
93
|
import {
|
|
94
94
|
applyToolPermissionContextUpdate,
|
|
95
95
|
applyToolPermissionContextUpdates,
|
|
@@ -100,13 +100,13 @@ import {
|
|
|
100
100
|
generateSystemReminders,
|
|
101
101
|
resetReminderSession,
|
|
102
102
|
systemReminderService
|
|
103
|
-
} from "./chunk-
|
|
103
|
+
} from "./chunk-FQMMZCOL.js";
|
|
104
104
|
import {
|
|
105
105
|
clearAgentCache,
|
|
106
106
|
getActiveAgents,
|
|
107
107
|
getAgentByType,
|
|
108
108
|
getAllAgents
|
|
109
|
-
} from "./chunk-
|
|
109
|
+
} from "./chunk-KRTFCQTN.js";
|
|
110
110
|
import {
|
|
111
111
|
API_ERROR_MESSAGE_PREFIX,
|
|
112
112
|
CANCEL_MESSAGE,
|
|
@@ -137,7 +137,7 @@ import {
|
|
|
137
137
|
processUserInput,
|
|
138
138
|
reorderMessages,
|
|
139
139
|
stripSystemMessages
|
|
140
|
-
} from "./chunk-
|
|
140
|
+
} from "./chunk-B62BK4YK.js";
|
|
141
141
|
import {
|
|
142
142
|
getRequestStatus,
|
|
143
143
|
setRequestStatus,
|
|
@@ -167,7 +167,7 @@ import {
|
|
|
167
167
|
normalizeFilePath,
|
|
168
168
|
readTextContent,
|
|
169
169
|
writeTextContent
|
|
170
|
-
} from "./chunk-
|
|
170
|
+
} from "./chunk-JFIH5LIP.js";
|
|
171
171
|
import {
|
|
172
172
|
parseBlockEdits
|
|
173
173
|
} from "./chunk-QWIBSCDN.js";
|
|
@@ -177,18 +177,18 @@ import {
|
|
|
177
177
|
ParserRegistry,
|
|
178
178
|
initParser,
|
|
179
179
|
loadLanguage
|
|
180
|
-
} from "./chunk-
|
|
180
|
+
} from "./chunk-H67PQDUM.js";
|
|
181
181
|
import {
|
|
182
182
|
getSettingsFileCandidates,
|
|
183
183
|
loadSettingsWithLegacyFallback,
|
|
184
184
|
readSettingsFile
|
|
185
|
-
} from "./chunk-
|
|
185
|
+
} from "./chunk-62CZOFWT.js";
|
|
186
186
|
import {
|
|
187
187
|
getCustomCommandDirectories,
|
|
188
188
|
hasCustomCommands,
|
|
189
189
|
loadCustomCommands,
|
|
190
190
|
reloadCustomCommands
|
|
191
|
-
} from "./chunk-
|
|
191
|
+
} from "./chunk-RAOXUYK3.js";
|
|
192
192
|
import {
|
|
193
193
|
getSessionPlugins
|
|
194
194
|
} from "./chunk-BJSWTHRM.js";
|
|
@@ -197,7 +197,7 @@ import {
|
|
|
197
197
|
buildModelProfileKey,
|
|
198
198
|
getModelManager,
|
|
199
199
|
isDefaultSlowAndCapableModel
|
|
200
|
-
} from "./chunk-
|
|
200
|
+
} from "./chunk-VRWY6YIJ.js";
|
|
201
201
|
import {
|
|
202
202
|
getCodeStyle,
|
|
203
203
|
getContext,
|
|
@@ -205,16 +205,16 @@ import {
|
|
|
205
205
|
getIsGit,
|
|
206
206
|
getProjectDocs,
|
|
207
207
|
getProjectStructureStatisticsBlock
|
|
208
|
-
} from "./chunk-
|
|
208
|
+
} from "./chunk-46Z3GAE4.js";
|
|
209
209
|
import {
|
|
210
210
|
getRipgrepPath,
|
|
211
211
|
getRipgrepPolicyMode,
|
|
212
212
|
resolveRipgrepPolicy,
|
|
213
213
|
ripGrep
|
|
214
|
-
} from "./chunk-
|
|
214
|
+
} from "./chunk-Z35GPUWK.js";
|
|
215
215
|
import {
|
|
216
216
|
getTheme
|
|
217
|
-
} from "./chunk-
|
|
217
|
+
} from "./chunk-YABL4JYT.js";
|
|
218
218
|
import {
|
|
219
219
|
DEFAULT_GLOBAL_CONFIG,
|
|
220
220
|
enableConfigs,
|
|
@@ -227,7 +227,7 @@ import {
|
|
|
227
227
|
saveGlobalConfig,
|
|
228
228
|
setAllPointersToModel,
|
|
229
229
|
setModelPointer
|
|
230
|
-
} from "./chunk-
|
|
230
|
+
} from "./chunk-LNE2PRIU.js";
|
|
231
231
|
import {
|
|
232
232
|
AbortError
|
|
233
233
|
} from "./chunk-RQVLBMP7.js";
|
|
@@ -236,7 +236,7 @@ import {
|
|
|
236
236
|
getCurrentRequest,
|
|
237
237
|
logUserFriendly,
|
|
238
238
|
markPhase
|
|
239
|
-
} from "./chunk-
|
|
239
|
+
} from "./chunk-HOBCGAUT.js";
|
|
240
240
|
import {
|
|
241
241
|
ASCII_LOGO,
|
|
242
242
|
BunShell,
|
|
@@ -277,10 +277,10 @@ import {
|
|
|
277
277
|
setCwd,
|
|
278
278
|
shouldApplyToolOutputTruncation,
|
|
279
279
|
truncateToolOutput
|
|
280
|
-
} from "./chunk-
|
|
280
|
+
} from "./chunk-DRP66QHJ.js";
|
|
281
281
|
import {
|
|
282
282
|
MACRO
|
|
283
|
-
} from "./chunk-
|
|
283
|
+
} from "./chunk-5PSLFGDF.js";
|
|
284
284
|
import {
|
|
285
285
|
__export
|
|
286
286
|
} from "./chunk-I3J4JYES.js";
|
|
@@ -461,7 +461,7 @@ var getCommandSubcommandPrefix = memoize(
|
|
|
461
461
|
var getCommandPrefix = memoize(
|
|
462
462
|
async (command4, abortSignal) => {
|
|
463
463
|
const { systemPrompt, userPrompt } = buildBashCommandPrefixDetectionPrompt(command4);
|
|
464
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-
|
|
464
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryQuick: queryQuick2 } = await import("./llm-466UDKVG.js");
|
|
465
465
|
const response = await queryQuick2({
|
|
466
466
|
systemPrompt,
|
|
467
467
|
userPrompt,
|
|
@@ -4263,7 +4263,7 @@ function formatParseError(error) {
|
|
|
4263
4263
|
return error instanceof Error ? error.message : String(error);
|
|
4264
4264
|
}
|
|
4265
4265
|
async function defaultGateQuery(args) {
|
|
4266
|
-
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-
|
|
4266
|
+
const { API_ERROR_MESSAGE_PREFIX: API_ERROR_MESSAGE_PREFIX2, queryLLM: queryLLM2 } = await import("./llm-466UDKVG.js");
|
|
4267
4267
|
const queryLLMFn = args.queryLLMOverride ?? queryLLM2;
|
|
4268
4268
|
const messages = [
|
|
4269
4269
|
{
|
|
@@ -6070,7 +6070,8 @@ function HighlightedCode({ code, language }) {
|
|
|
6070
6070
|
|
|
6071
6071
|
// src/tools/filesystem/NotebookEditTool/prompt.ts
|
|
6072
6072
|
var DESCRIPTION = "Replace the contents of a specific cell in a Jupyter notebook.";
|
|
6073
|
-
var PROMPT2 = `Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number
|
|
6073
|
+
var PROMPT2 = `Completely replaces the contents of a specific cell in a Jupyter notebook (.ipynb file) with new source. Jupyter notebooks are interactive documents that combine code, text, and visualizations, commonly used for data analysis and scientific computing. The notebook_path parameter must be an absolute path, not a relative path. The cell_number is 0-indexed. Use edit_mode=insert to add a new cell at the index specified by cell_number. Use edit_mode=delete to delete the cell at the index specified by cell_number.
|
|
6074
|
+
`.trim();
|
|
6074
6075
|
|
|
6075
6076
|
// src/utils/permissions/filesystem.ts
|
|
6076
6077
|
import { dirname, isAbsolute, resolve, relative as relative2 } from "path";
|
|
@@ -6421,12 +6422,16 @@ Usage:
|
|
|
6421
6422
|
5. **Indentation**: Preserve the exact indentation (tabs/spaces) of the original file in your SEARCH block.
|
|
6422
6423
|
6. **Smart Matching**: The tool uses a fuzzy matching engine and LSP anchoring. It can locate code even if there are minor differences in whitespace or indentation.
|
|
6423
6424
|
7. **Verification (Recommended)**: Set \`verify: true\` to enable atomic verification. The tool will check for syntax errors after editing and automatically ROLLBACK if errors are detected. Use this for complex edits or when ensuring stability.
|
|
6424
|
-
8. **
|
|
6425
|
+
8. **Conditional Edit**: Use \`if_not_contains\` to skip the edit if the
|
|
6426
|
+
file already contains a specific string.
|
|
6427
|
+
9. **Thinking**: You can include "thinking" text between blocks; the tool will ignore it.
|
|
6425
6428
|
|
|
6426
6429
|
Notes:
|
|
6427
|
-
- The edit will FAIL if the SEARCH block matches multiple locations
|
|
6430
|
+
- The edit will FAIL if the SEARCH block matches multiple locations(ambiguous). Provide more context.
|
|
6428
6431
|
- To delete code, leave the REPLACE section empty.
|
|
6432
|
+
- To create a new file, use an empty SEARCH block with the desired content in REPLACE.
|
|
6429
6433
|
- ALWAYS prefer editing existing files. NEVER write new files unless explicitly required.
|
|
6434
|
+
- For Jupyter Notebooks (.ipynb), use the NotebookEditTool instead.
|
|
6430
6435
|
- If LSP verification is unavailable, rerun without \`verify\` and validate via diagnostics or build.
|
|
6431
6436
|
`.trim();
|
|
6432
6437
|
|
|
@@ -6624,7 +6629,7 @@ var FileEditTool = {
|
|
|
6624
6629
|
const originalFileContent = currentFileContent;
|
|
6625
6630
|
let totalPatch = [];
|
|
6626
6631
|
const { SmartEdit } = await import("./smart-edit-AWHJDSU6.js");
|
|
6627
|
-
const { findLspAnchor } = await import("./lspAnchor-
|
|
6632
|
+
const { findLspAnchor } = await import("./lspAnchor-KQNSWWL3.js");
|
|
6628
6633
|
for (const op of editOperations) {
|
|
6629
6634
|
const normalizedSearch = normalizeLineEndings(op.search);
|
|
6630
6635
|
const normalizedReplace = normalizeLineEndings(op.replace);
|
|
@@ -6770,7 +6775,8 @@ Assume this tool is able to read all files on the machine. If the User provides
|
|
|
6770
6775
|
- This tool can only read files, not directories. To list files in a directory, use the 'Glob' or 'LS' tool.
|
|
6771
6776
|
- You can call multiple tools in a single response. It is always better to speculatively read multiple potentially useful files in parallel.
|
|
6772
6777
|
- You will regularly be asked to read screenshots. If the user provides a path to a screenshot, ALWAYS use this tool to view the file at the path. This tool will work with all temporary file paths.
|
|
6773
|
-
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents
|
|
6778
|
+
- If you read a file that exists but has empty contents you will receive a system reminder warning in place of file contents.
|
|
6779
|
+
`.trim();
|
|
6774
6780
|
|
|
6775
6781
|
// src/utils/fs/secureFile.ts
|
|
6776
6782
|
import {
|
|
@@ -7912,7 +7918,8 @@ Usage:
|
|
|
7912
7918
|
- If this is an existing file, you MUST use the ${FileReadTool.name} tool first to read the file's contents. This tool will fail if you did not read the file first.
|
|
7913
7919
|
- ALWAYS prefer editing existing files in the codebase. NEVER write new files unless explicitly required.
|
|
7914
7920
|
- NEVER proactively create documentation files (*.md) or README files. Only create documentation files if explicitly requested by the User.
|
|
7915
|
-
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked
|
|
7921
|
+
- Only use emojis if the user explicitly requests it. Avoid writing emojis to files unless asked.
|
|
7922
|
+
`.trim();
|
|
7916
7923
|
|
|
7917
7924
|
// src/tools/filesystem/FileWriteTool/FileWriteTool.tsx
|
|
7918
7925
|
var MAX_LINES_TO_RENDER2 = 5;
|
|
@@ -8197,7 +8204,7 @@ var DESCRIPTION4 = `Fast file pattern matching tool that works with any codebase
|
|
|
8197
8204
|
[uses Glob tool with pattern="src/**/*.ts" to focus on source code]
|
|
8198
8205
|
[uses Glob tool with pattern="src/core/**/*.ts" to narrow further if needed]
|
|
8199
8206
|
</example>
|
|
8200
|
-
|
|
8207
|
+
`.trim();
|
|
8201
8208
|
|
|
8202
8209
|
// src/tools/filesystem/GlobTool/GlobTool.tsx
|
|
8203
8210
|
import { existsSync as existsSync6, statSync as statSync9 } from "fs";
|
|
@@ -8471,7 +8478,8 @@ var DESCRIPTION5 = `A powerful fast content search tool that works with any code
|
|
|
8471
8478
|
user: Where is the database host configured?
|
|
8472
8479
|
assistant: [uses Grep tool with pattern="database.*host|db_host|DB_HOST" -i: true]
|
|
8473
8480
|
[uses Read tool to examine configuration files]
|
|
8474
|
-
</example
|
|
8481
|
+
</example>
|
|
8482
|
+
`.trim();
|
|
8475
8483
|
|
|
8476
8484
|
// src/tools/search/GrepTool/GrepTool.tsx
|
|
8477
8485
|
import { isAbsolute as isAbsolute7, relative as relative9, resolve as resolve7 } from "path";
|
|
@@ -12058,7 +12066,7 @@ async function createAndStoreApiKey(accessToken) {
|
|
|
12058
12066
|
}
|
|
12059
12067
|
saveGlobalConfig(config2);
|
|
12060
12068
|
try {
|
|
12061
|
-
const { resetAnthropicClient } = await import("./llm-
|
|
12069
|
+
const { resetAnthropicClient } = await import("./llm-466UDKVG.js");
|
|
12062
12070
|
resetAnthropicClient();
|
|
12063
12071
|
} catch {
|
|
12064
12072
|
}
|
|
@@ -16482,7 +16490,7 @@ async function refreshPluginRuntimeFromInstalls() {
|
|
|
16482
16490
|
const existingRoots = getSessionPlugins().map((p) => p.rootDir);
|
|
16483
16491
|
const dirs = Array.from(/* @__PURE__ */ new Set([...existingRoots, ...installedRoots]));
|
|
16484
16492
|
if (dirs.length === 0) return [];
|
|
16485
|
-
const { configureSessionPlugins } = await import("./pluginRuntime-
|
|
16493
|
+
const { configureSessionPlugins } = await import("./pluginRuntime-4SDXCK4Q.js");
|
|
16486
16494
|
const { errors } = await configureSessionPlugins({ pluginDirs: dirs });
|
|
16487
16495
|
return errors;
|
|
16488
16496
|
}
|
|
@@ -17157,7 +17165,7 @@ async function call(onDone, context) {
|
|
|
17157
17165
|
ModelConfig,
|
|
17158
17166
|
{
|
|
17159
17167
|
onClose: () => {
|
|
17160
|
-
import("./model-
|
|
17168
|
+
import("./model-F6VCUHDL.js").then(({ reloadModelManager: reloadModelManager2 }) => {
|
|
17161
17169
|
reloadModelManager2();
|
|
17162
17170
|
triggerModelConfigChange();
|
|
17163
17171
|
onDone();
|
|
@@ -25361,7 +25369,7 @@ function useStatusLine() {
|
|
|
25361
25369
|
// src/ui/components/PromptInput.tsx
|
|
25362
25370
|
async function interpretHashCommand(input) {
|
|
25363
25371
|
try {
|
|
25364
|
-
const { queryQuick: queryQuick2 } = await import("./llm-
|
|
25372
|
+
const { queryQuick: queryQuick2 } = await import("./llm-466UDKVG.js");
|
|
25365
25373
|
const systemPrompt = [
|
|
25366
25374
|
"You're helping the user structure notes that will be added to their PYB.md file.",
|
|
25367
25375
|
"Format the user's input into a well-structured note that will be useful for later reference.",
|
|
@@ -25674,7 +25682,7 @@ function PromptInput({
|
|
|
25674
25682
|
if (messages2.length) {
|
|
25675
25683
|
if (mode === "bash") {
|
|
25676
25684
|
onQuery(messages2, newAbortController).then(async () => {
|
|
25677
|
-
const { getCwd: getCwd2 } = await import("./state-
|
|
25685
|
+
const { getCwd: getCwd2 } = await import("./state-I6BQR2T5.js");
|
|
25678
25686
|
setCurrentPwd(getCwd2());
|
|
25679
25687
|
});
|
|
25680
25688
|
} else {
|
|
@@ -32060,7 +32068,7 @@ import { homedir as homedir8 } from "os";
|
|
|
32060
32068
|
// src/commands/agents/generation.ts
|
|
32061
32069
|
import { randomUUID as randomUUID6 } from "crypto";
|
|
32062
32070
|
async function generateAgentWithClaude(prompt) {
|
|
32063
|
-
const { queryModel } = await import("./llm-
|
|
32071
|
+
const { queryModel } = await import("./llm-466UDKVG.js");
|
|
32064
32072
|
const systemPrompt = `You are an expert at creating AI agent configurations. Based on the user's description, generate a specialized agent configuration.
|
|
32065
32073
|
|
|
32066
32074
|
Return your response as a JSON object with exactly these fields:
|
|
@@ -35671,7 +35679,7 @@ It is critical that you mark tasks as completed as soon as you are done with a t
|
|
|
35671
35679
|
# Cognitive Safety & Sensing
|
|
35672
35680
|
1. **Modification Check**: Before editing, you MUST verify if the change is already present (e.g. use \`grep\` or \`read\`). Do not rely on memory from previous turns.
|
|
35673
35681
|
2. **Precise Targeting**: For code injection, prefer using LSP to find exact function boundaries, or Read the file to get unique context.
|
|
35674
|
-
3. **Artifact Verification**: After completing a complex task, verify the artifacts (e.g. check if files exist using \`ls\`).
|
|
35682
|
+
3. **Artifact Verification**: After completing a complex task, verify the artifacts (e.g. check if files exist using \`ls\` or \`glob\`).
|
|
35675
35683
|
4. **LSP Instinct**: Before modifying any code, you MUST first build structure context (structure tree \u2192 hotspot \u2192 Read). Use \`LSP documentSymbol\` or \`LSP goToDefinition\` only when you have a precise position and need to confirm exact range. Do NOT rely on line numbers from \`read_file\` alone as they may be outdated.
|
|
35676
35684
|
5. **Atomic Verification**: When editing code, especially in critical or complex files, you should strongly consider setting \`verify: true\` in the \`FileEditTool\`. This enables the tool to automatically detect syntax errors and ROLLBACK changes if they are invalid, preventing you from breaking the build.
|
|
35677
35685
|
6. **Semantic Search**: When searching for code concepts (e.g. "AuthLogic", "UserHandler") rather than exact filenames, prefer using \`GlobTool\` with \`semantic: true\`. This leverages LSP to find files by their content definitions.
|
|
@@ -35708,14 +35716,6 @@ user: is 11 a prime number?
|
|
|
35708
35716
|
assistant: Yes
|
|
35709
35717
|
</example>
|
|
35710
35718
|
|
|
35711
|
-
<example>
|
|
35712
|
-
user: locate where auth token refresh is implemented in a large repo
|
|
35713
|
-
assistant: [uses the LS tool to scan top-level structure]
|
|
35714
|
-
[uses the Glob tool to find candidate auth-related files]
|
|
35715
|
-
[uses the Grep tool to search for token refresh patterns]
|
|
35716
|
-
[uses the Read tool to inspect the most likely file]
|
|
35717
|
-
</example>
|
|
35718
|
-
|
|
35719
35719
|
<example>
|
|
35720
35720
|
user: find all .ts and .tsx files under src/
|
|
35721
35721
|
assistant: [uses the Glob tool to match files under src/]
|
|
@@ -35726,11 +35726,6 @@ user: How many golf balls fit inside a jetta?
|
|
|
35726
35726
|
assistant: 150000
|
|
35727
35727
|
</example>
|
|
35728
35728
|
|
|
35729
|
-
<example>
|
|
35730
|
-
user: delete the temp directory and all logs
|
|
35731
|
-
assistant: [uses Delete tool to remove 'temp' directory and all '*.log' files in one call]
|
|
35732
|
-
</example>
|
|
35733
|
-
|
|
35734
35729
|
<example>
|
|
35735
35730
|
user: list files in the directory src/
|
|
35736
35731
|
assistant: [uses the LS tool to list files and sees foo.c, bar.c, baz.c]
|
|
@@ -35768,8 +35763,8 @@ When making changes to files, first understand the file's code conventions. Mimi
|
|
|
35768
35763
|
|
|
35769
35764
|
${includeCodingInstructions ? `# Doing tasks
|
|
35770
35765
|
The user will primarily request you perform software engineering tasks. This includes solving bugs, adding new functionality, refactoring code, explaining code, and more. For these tasks the following steps are recommended:
|
|
35771
|
-
- Use TaskCreate to plan multi-step work and TaskUpdate to track progress; use TaskList/TaskGet to review
|
|
35772
|
-
- Use the available search tools to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.
|
|
35766
|
+
- Use TaskCreate VERY frequently to plan multi-step work required 2 or more distinct steps and TaskUpdate to track progress; use TaskList/TaskGet to review
|
|
35767
|
+
- Use the available search tools\uFF08e.g., Glob\u3001Grep\u3001LSP\u3001LS\uFF09 to understand the codebase and the user's query. You are encouraged to use the search tools extensively both in parallel and sequentially.
|
|
35773
35768
|
- Implement the solution using all tools available to you
|
|
35774
35769
|
- Verify the solution if possible with tests. NEVER assume specific test framework or test script. Check the README or search codebase to determine the testing approach.
|
|
35775
35770
|
- VERY IMPORTANT: When you have completed a task, you MUST run the lint and typecheck commands (eg. npm run lint, npm run typecheck, ruff, etc.) if they were provided to you to ensure your code is correct. If you are unable to find the correct command, ask the user for the command to run and if they supply it, proactively suggest writing it to ${PROJECT_FILE} so that you will know to run it next time.
|
|
@@ -35779,20 +35774,22 @@ NEVER commit changes unless the user explicitly asks you to. It is VERY IMPORTAN
|
|
|
35779
35774
|
` : ""}
|
|
35780
35775
|
|
|
35781
35776
|
# Tool usage policy
|
|
35782
|
-
- **Code Analysis & Exploration Priority**:For **complex** codebase exploration tasks (e.g., searching across 3+ directories, requiring multiple search iterations, or investigating cross-module patterns), prefer using the Task tool with Explore subagent. This isolates exploration context in a separate transcript.For simple tasks (reading known files, single-pattern searches), use Ls/Read/Glob/Grep directly for faster results.
|
|
35783
|
-
- **File Search Priority**:When doing file search, prefer to use the Task tool for open-ended, multi-step exploration to reduce context usage. For known paths or small scopes, prefer Ls/Lsp/Read/Glob/Grep directly.
|
|
35784
|
-
- **File System Exploration Priority**:For file system exploration, decide based on intent: if you need global structure/entry points, prefer LS first; if you have keywords or fuzzy paths, prefer Glob first. If results are too broad, use LS to narrow structure or combine with Grep/LSP. Only use Bash for executing scripts or binaries.
|
|
35785
35777
|
- You can call multiple tools in a single response. If you intend to call multiple tools and there are no dependencies between them, make all independent tool calls in parallel. Maximize use of parallel tool calls where possible to increase efficiency. However, if some tool calls depend on previous calls to inform dependent values, do NOT call these tools in parallel and instead call them sequentially. For instance, if one operation must complete before another starts, run these operations sequentially instead. Never use placeholders or guess missing parameters in tool calls.
|
|
35778
|
+
- **LS vs Glob "dir/*"**: LS provides complexity stats (directory/file ratio, max depth) to guide strategy; Glob "dir/*" is faster but no stats. Use LS when you need structural insights; use Glob for quick one-level checks.
|
|
35786
35779
|
- If the user specifies that they want you to run tools "in parallel", you MUST send a single message with multiple tool use content blocks.
|
|
35787
35780
|
- It is always better to speculatively read multiple files as a batch that are potentially useful.
|
|
35788
35781
|
- It is always better to speculatively perform multiple searches as a batch that are potentially useful.
|
|
35789
35782
|
|
|
35783
|
+
|
|
35790
35784
|
# Cognitive Search Strategy
|
|
35791
35785
|
1. **Concept Search**: WHEN searching for high-level concepts (e.g., "Auth Logic", "Payment Flow") OR when you are uncertain about exact naming, you MUST use \`semantic: true\` in Grep/Glob tools. This activates the LSP Workspace Symbol search which is resilient to typos and fuzzy matches.
|
|
35792
35786
|
- Example: \`GrepTool(pattern: "AuthFeatr", semantic: true)\` will find "AuthFeature".
|
|
35793
35787
|
- Example: \`GlobTool(pattern: "tests", semantic: true)\` will find test files based on project structure.
|
|
35794
35788
|
2. **Exact Identifier**: WHEN you know the precise class/function name (e.g., "UserProfile", "initDatabase"), use standard Grep/Glob without \`semantic\` flag.
|
|
35795
35789
|
3. **Exploration**: If standard search returns 0 results, AUTOMATICALLY retry with \`semantic: true\`.
|
|
35790
|
+
4. **File System Exploration Priority**:For file system exploration, decide based on intent: if you need global structure/entry points, prefer LS or Glob "dir/*" first; if you have keywords or fuzzy paths, prefer Glob first. If results are too broad, use LS or Glob "dir/*" to narrow structure or combine with Grep/LSP. Only use Bash for executing scripts or binaries.
|
|
35791
|
+
5. **Code Analysis & Exploration Priority**:For codebase exploration tasks (e.g., searching across 2 or more directories, requiring multiple search iterations, or investigating cross-module patterns), prefer using the Task tool with Explore subagent. This isolates exploration context in a separate transcript.For simple tasks (reading known files, single-pattern searches), use Glob/Grep/Ls/Read/Lsp directly for faster results.
|
|
35792
|
+
6. **File Search Priority**:When doing file search, prefer to use the Task tool for open-ended, multi-step exploration to reduce context usage. For known paths or small scopes, prefer Ls/Lsp/Read/Glob/Grep directly.
|
|
35796
35793
|
|
|
35797
35794
|
# Path Fragmentation Strategy
|
|
35798
35795
|
- Root -> Core Directory -> Secondary Modules
|