netheriteai-code 0.3.4 → 0.3.5
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/package.json +1 -1
- package/src/agent.js +5 -3
- package/src/cli.js +1 -1
package/package.json
CHANGED
package/src/agent.js
CHANGED
|
@@ -255,15 +255,17 @@ export async function runAgentTurn({ workspaceRoot, model, history, userPrompt,
|
|
|
255
255
|
});
|
|
256
256
|
},
|
|
257
257
|
});
|
|
258
|
+
|
|
258
259
|
onEvent?.({
|
|
259
260
|
type: "tool_result",
|
|
260
261
|
name: toolCall.function.name,
|
|
261
262
|
result,
|
|
262
263
|
});
|
|
264
|
+
|
|
265
|
+
// Workaround: Use 'user' role instead of 'tool' because the remote server rejects 'tool' role.
|
|
263
266
|
messages.push({
|
|
264
|
-
role: "
|
|
265
|
-
|
|
266
|
-
content: JSON.stringify(result),
|
|
267
|
+
role: "user",
|
|
268
|
+
content: `Observation from ${toolCall.function.name}:\n${JSON.stringify(result, null, 2)}`,
|
|
267
269
|
});
|
|
268
270
|
} catch (error) {
|
|
269
271
|
onEvent?.({
|