Skip to content

Commit 325dd78

Browse files
HITL improvements
1 parent f86e98a commit 325dd78

File tree

6 files changed

+453
-531
lines changed

6 files changed

+453
-531
lines changed

libs/langchain/src/agents/middlewareAgent/annotation.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,11 @@ export function createAgentAnnotationConditional<
3737
default: () => [],
3838
}),
3939
jumpTo: Annotation<"model_request" | "tools" | undefined>({
40-
reducer: (x: any, y: any) => y ?? x,
40+
/**
41+
* Since `jumpTo` acts as a control command, we only want
42+
* to apply it if explicitly set.
43+
*/
44+
reducer: (_x: any, y: any) => y,
4145
default: () => undefined,
4246
}),
4347
};

0 commit comments

Comments
 (0)