feat: flow for multiple files - pipeline, tools

This commit is contained in:
2026-10-09 20:23:14 +05:00
parent 0cb94d06c2
commit bac82f8442
15 changed files with 648 additions and 193 deletions
+4 -6
View File
@@ -14,14 +14,12 @@ function uid(): string {
return crypto.randomUUID();
}
/** Tool can be inserted mid-chain: it accepts and returns an image. */
/** Tool can be inserted mid-chain: image in, one or many images out. */
export function isChainable(toolId: string): boolean {
const tool = getTool(toolId);
return (
tool !== undefined &&
tool.input === "image" &&
(tool.result ?? "image") === "image"
);
if (!tool || tool.input !== "image") return false;
const kind = tool.result ?? "image";
return kind === "image" || kind === "files";
}
/** Pages whose tools can be added as steps (for the picker). */