@polka-codes/core 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
|
@@ -1042,7 +1042,7 @@ var getArray = (args, name, defaultValue) => {
|
|
|
1042
1042
|
|
|
1043
1043
|
// src/tools/utils/replaceInFile.ts
|
|
1044
1044
|
var replaceInFile = async (fileContent, diff) => {
|
|
1045
|
-
const blockPattern = /<<<<<+ SEARCH
|
|
1045
|
+
const blockPattern = /<<<<<+ SEARCH>?\s*\r?\n([\s\S]*?)\r?\n=======[ \t]*\r?\n([\s\S]*?)\r?\n?>>>>>+ REPLACE/g;
|
|
1046
1046
|
const blocks = [];
|
|
1047
1047
|
for (let match = blockPattern.exec(diff); match !== null; match = blockPattern.exec(diff)) {
|
|
1048
1048
|
blocks.push({ search: match[1], replace: match[2] });
|
|
@@ -2674,18 +2674,14 @@ ${tools.map((tool) => {
|
|
|
2674
2674
|
}).join("")}
|
|
2675
2675
|
# Tool Use Guidelines
|
|
2676
2676
|
|
|
2677
|
-
1. **
|
|
2678
|
-
- Before using a tool, wrap your reasoning inside \`<thinking>\` tags. Be concise\u2014just enough to clarify your plan and the rationale behind selecting a specific tool.
|
|
2679
|
-
2. **Wait for Feedback**
|
|
2677
|
+
1. **Wait for Feedback**
|
|
2680
2678
|
- 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.
|
|
2681
|
-
|
|
2679
|
+
2. **Error Handling**
|
|
2682
2680
|
- If a tool fails or produces an unexpected result, analyze the error, decide on an alternative approach or tool, and proceed carefully.
|
|
2683
|
-
|
|
2681
|
+
3. **Avoid Repetition**
|
|
2684
2682
|
- Do not quote or repeat previous commands or prompts verbatim. Move the conversation forward by focusing on the latest required action.
|
|
2685
|
-
|
|
2686
|
-
-
|
|
2687
|
-
6. **Tool Call Limit**
|
|
2688
|
-
- Do not make more than 5 tool calls in a single message.`;
|
|
2683
|
+
4. **Tool Call Limit**
|
|
2684
|
+
- It is **STRIGHTLY FORBIDDEN** to make more than 5 tool calls in a single message.`;
|
|
2689
2685
|
};
|
|
2690
2686
|
var agentsPrompt = (agents, name) => `
|
|
2691
2687
|
====
|