@polka-codes/cli-shared 0.8.19 → 0.8.20
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/index.js +6 -10
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -36909,7 +36909,7 @@ var getArray = (args, name, defaultValue) => {
|
|
|
36909
36909
|
};
|
|
36910
36910
|
// ../core/src/tools/utils/replaceInFile.ts
|
|
36911
36911
|
var replaceInFile = async (fileContent, diff) => {
|
|
36912
|
-
const blockPattern = /<<<<<+ SEARCH
|
|
36912
|
+
const blockPattern = /<<<<<+ SEARCH>?\s*\r?\n([\s\S]*?)\r?\n=======[ \t]*\r?\n([\s\S]*?)\r?\n?>>>>>+ REPLACE/g;
|
|
36913
36913
|
const blocks = [];
|
|
36914
36914
|
for (let match = blockPattern.exec(diff);match !== null; match = blockPattern.exec(diff)) {
|
|
36915
36915
|
blocks.push({ search: match[1], replace: match[2] });
|
|
@@ -38548,18 +38548,14 @@ ${tools.map((tool) => {
|
|
|
38548
38548
|
}).join("")}
|
|
38549
38549
|
# Tool Use Guidelines
|
|
38550
38550
|
|
|
38551
|
-
1. **
|
|
38552
|
-
- Before using a tool, wrap your reasoning inside \`<thinking>\` tags. Be concise—just enough to clarify your plan and the rationale behind selecting a specific tool.
|
|
38553
|
-
2. **Wait for Feedback**
|
|
38551
|
+
1. **Wait for Feedback**
|
|
38554
38552
|
- After using a tool, wait for the user's response indicating success/failure or any output logs. Do not assume the result of a tool without explicit confirmation.
|
|
38555
|
-
|
|
38553
|
+
2. **Error Handling**
|
|
38556
38554
|
- If a tool fails or produces an unexpected result, analyze the error, decide on an alternative approach or tool, and proceed carefully.
|
|
38557
|
-
|
|
38555
|
+
3. **Avoid Repetition**
|
|
38558
38556
|
- Do not quote or repeat previous commands or prompts verbatim. Move the conversation forward by focusing on the latest required action.
|
|
38559
|
-
|
|
38560
|
-
-
|
|
38561
|
-
6. **Tool Call Limit**
|
|
38562
|
-
- Do not make more than 5 tool calls in a single message.`;
|
|
38557
|
+
4. **Tool Call Limit**
|
|
38558
|
+
- It is **STRIGHTLY FORBIDDEN** to make more than 5 tool calls in a single message.`;
|
|
38563
38559
|
};
|
|
38564
38560
|
var agentsPrompt = (agents, name) => `
|
|
38565
38561
|
====
|