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:
2026-04-09 10:06:53 +02:00
parent b7f24223f2
commit 6d0c7b1ff6
18 changed files with 749 additions and 5 deletions

View File

@@ -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.",
);
});
});