create-loopengine 0.1.68 → 0.1.69
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
CHANGED
|
@@ -2316,7 +2316,12 @@ async function resolvePendingApproval(res: ServerResponse, pendingId: string, bo
|
|
|
2316
2316
|
sessionId: checkpoint.sessionId,
|
|
2317
2317
|
env: createAgentEnv(entry.config.name, agentDirFor(entry.config)),
|
|
2318
2318
|
})
|
|
2319
|
-
|
|
2319
|
+
// The agent's own history still shows the arguments it asked
|
|
2320
|
+
// for, so say when the approver changed them; otherwise its
|
|
2321
|
+
// reply describes what it asked for, not what ran.
|
|
2322
|
+
const changed = editedArgs && JSON.stringify(editedArgs) !== JSON.stringify(item.args)
|
|
2323
|
+
const content = changed ? `The approver changed the arguments before it ran: ${JSON.stringify(editedArgs)}. Result: ${JSON.stringify(output)}` : JSON.stringify(output)
|
|
2324
|
+
resultBlock = { type: 'tool_result', tool_use_id: item.toolUseId, content, is_error: false }
|
|
2320
2325
|
} catch (err) {
|
|
2321
2326
|
resultBlock = { type: 'tool_result', tool_use_id: item.toolUseId, content: `ERROR: ${err}`, is_error: true }
|
|
2322
2327
|
}
|