@kenkaiiii/gg-agent 5.74.3 → 5.75.1
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.cjs +6 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +5 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.js +6 -1
- package/dist/index.js.map +1 -1
- package/package.json +5 -2
package/dist/index.cjs
CHANGED
|
@@ -1537,6 +1537,7 @@ async function* agentLoop(messages, options) {
|
|
|
1537
1537
|
maxToolResultChars: options.maxToolResultChars,
|
|
1538
1538
|
maxTurnToolResultChars: options.maxTurnToolResultChars,
|
|
1539
1539
|
transformToolResult: options.transformToolResult,
|
|
1540
|
+
resolveTool: options.resolveTool,
|
|
1540
1541
|
toolMap,
|
|
1541
1542
|
invalidToolArgumentCounts,
|
|
1542
1543
|
markFatalToolArgumentError,
|
|
@@ -1695,7 +1696,11 @@ async function executeSingleToolCall(toolCall, options, pushEvent) {
|
|
|
1695
1696
|
let isError = false;
|
|
1696
1697
|
let endRun = false;
|
|
1697
1698
|
let invalidArgAttempt;
|
|
1698
|
-
|
|
1699
|
+
let tool = options.toolMap.get(toolCall.name);
|
|
1700
|
+
if (!tool && options.resolveTool) {
|
|
1701
|
+
tool = options.resolveTool(toolCall.name);
|
|
1702
|
+
if (tool) options.toolMap.set(tool.name, tool);
|
|
1703
|
+
}
|
|
1699
1704
|
if (tool) {
|
|
1700
1705
|
const signature = JSON.stringify([toolCall.name, canonicalToolArgs(toolCall.args)]);
|
|
1701
1706
|
if (options.seenToolCalls.has(signature)) {
|