Implement agent node functionality in canvas, including connection policies and UI updates. Add support for agent node type in node catalog, templates, and connection validation. Update documentation to reflect new agent capabilities and ensure proper handling of input sources. Enhance adjustment preview to include crop node. Add tests for agent connection policies.
This commit is contained in:
@@ -159,4 +159,42 @@ describe("canvas connection policy", () => {
|
||||
getCanvasConnectionValidationMessage("ai-video-source-invalid"),
|
||||
).toBe("KI-Video-Ausgabe akzeptiert nur Eingaben von KI-Video.");
|
||||
});
|
||||
|
||||
it("allows render to agent", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "render",
|
||||
targetType: "agent",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("allows compare to agent", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "compare",
|
||||
targetType: "agent",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBeNull();
|
||||
});
|
||||
|
||||
it("blocks prompt to agent", () => {
|
||||
expect(
|
||||
validateCanvasConnectionPolicy({
|
||||
sourceType: "prompt",
|
||||
targetType: "agent",
|
||||
targetIncomingCount: 0,
|
||||
}),
|
||||
).toBe("agent-source-invalid");
|
||||
});
|
||||
|
||||
it("describes invalid agent source message", () => {
|
||||
expect(
|
||||
getCanvasConnectionValidationMessage("agent-source-invalid"),
|
||||
).toBe(
|
||||
"Agent-Nodes akzeptieren nur Content- und Kontext-Inputs, keine Generierungs-Steuerknoten wie Prompt.",
|
||||
);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user