fix: patch HITL bug (#107)

This commit is contained in:
Charles Packer
2025-11-19 20:49:24 -08:00
committed by GitHub
parent fa883d66db
commit 1a30c153c6

View File

@@ -1428,7 +1428,12 @@ export default function App({
// Dev-only validation: ensure outgoing IDs match expected IDs
if (process.env.NODE_ENV !== "production") {
const expectedIds = new Set(pendingApprovals.map((a) => a.toolCallId));
// Include ALL tool call IDs: auto-handled, auto-denied, and pending approvals
const expectedIds = new Set([
...autoHandledResults.map((ar) => ar.toolCallId),
...autoDeniedApprovals.map((ad) => ad.approval.toolCallId),
...pendingApprovals.map((a) => a.toolCallId),
]);
const sendingIds = new Set(
allResults.map((r) => r.tool_call_id).filter(Boolean),
);