@polka-codes/cli 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 +7 -11
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -38447,7 +38447,7 @@ var {
|
|
|
38447
38447
|
Help
|
|
38448
38448
|
} = import__.default;
|
|
38449
38449
|
// package.json
|
|
38450
|
-
var version = "0.8.
|
|
38450
|
+
var version = "0.8.20";
|
|
38451
38451
|
|
|
38452
38452
|
// ../core/src/AiService/AiServiceBase.ts
|
|
38453
38453
|
class AiServiceBase {
|
|
@@ -47884,7 +47884,7 @@ var getArray = (args, name, defaultValue) => {
|
|
|
47884
47884
|
};
|
|
47885
47885
|
// ../core/src/tools/utils/replaceInFile.ts
|
|
47886
47886
|
var replaceInFile = async (fileContent, diff) => {
|
|
47887
|
-
const blockPattern = /<<<<<+ SEARCH
|
|
47887
|
+
const blockPattern = /<<<<<+ SEARCH>?\s*\r?\n([\s\S]*?)\r?\n=======[ \t]*\r?\n([\s\S]*?)\r?\n?>>>>>+ REPLACE/g;
|
|
47888
47888
|
const blocks = [];
|
|
47889
47889
|
for (let match = blockPattern.exec(diff);match !== null; match = blockPattern.exec(diff)) {
|
|
47890
47890
|
blocks.push({ search: match[1], replace: match[2] });
|
|
@@ -49523,18 +49523,14 @@ ${tools.map((tool) => {
|
|
|
49523
49523
|
}).join("")}
|
|
49524
49524
|
# Tool Use Guidelines
|
|
49525
49525
|
|
|
49526
|
-
1. **
|
|
49527
|
-
- 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.
|
|
49528
|
-
2. **Wait for Feedback**
|
|
49526
|
+
1. **Wait for Feedback**
|
|
49529
49527
|
- 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.
|
|
49530
|
-
|
|
49528
|
+
2. **Error Handling**
|
|
49531
49529
|
- If a tool fails or produces an unexpected result, analyze the error, decide on an alternative approach or tool, and proceed carefully.
|
|
49532
|
-
|
|
49530
|
+
3. **Avoid Repetition**
|
|
49533
49531
|
- Do not quote or repeat previous commands or prompts verbatim. Move the conversation forward by focusing on the latest required action.
|
|
49534
|
-
|
|
49535
|
-
-
|
|
49536
|
-
6. **Tool Call Limit**
|
|
49537
|
-
- Do not make more than 5 tool calls in a single message.`;
|
|
49532
|
+
4. **Tool Call Limit**
|
|
49533
|
+
- It is **STRIGHTLY FORBIDDEN** to make more than 5 tool calls in a single message.`;
|
|
49538
49534
|
};
|
|
49539
49535
|
var agentsPrompt = (agents, name) => `
|
|
49540
49536
|
====
|