feat(workflow): render a PRD's generated view on the plan approval card
agent.run gains views: the agent may return an OpenUI Lang view of its answer through an optional view tool, read as steps.<id>.view. human.approve stores it as the task's plan_view, and the approval card renders it with the dashboard's own components, falling back to the plan text when there is no view or it does not parse. The feasibility prd step uses it.
This commit is contained in:
1 parent
cae19ca42e
commit
54a78175b4
34 files changed
+1035
-153
No files matched your search
@@ -0,0 +1,14 @@
|
||||
// Writes the agent prompt for the dashboard's view components to the path
|
||||
// given, from the same schemas the renderer uses.
|
||||
import { writeFileSync } from "node:fs";
|
||||
|
||||
import { viewLibrary, viewPromptOptions } from "../src/genui/view-library.ts";
|
||||
|
||||
const out = process.argv[2];
|
||||
if (!out) throw new Error("usage: genui-prompt.ts <output path>");
|
||||
const r = null;
|
||||
const library = viewLibrary({
|
||||
Stack: r, Section: r, Columns: r, Heading: r, Text: r, Callout: r, Facts: r,
|
||||
Fact: r, Files: r, File: r, Checklist: r, Table: r, Code: r,
|
||||
});
|
||||
writeFileSync(out, library.prompt(viewPromptOptions).trim() + "\n");
|
||||
Reference in new issue
Block a user