;
addToast: (message: string, type?: "error" | "success" | "info" | "warning") => void;
+ onPlanningMode?: (initialPlan: string, workflowId?: string | null) => void;
+ onSubtaskBreakdown?: (description: string, workflowId?: string | null) => void;
+ workflowId?: string | null;
}) => {
const [value, setValue] = useState("");
const [expanded, setExpanded] = useState(false);
@@ -65,6 +72,16 @@ vi.mock("../QuickEntryBox", () => ({
}
};
+ const handoff = (callback?: (description: string, workflowId?: string | null) => void) => {
+ const description = value.trim();
+ if (!description || !callback) return;
+ if (workflowId !== undefined) {
+ callback(description, workflowId);
+ return;
+ }
+ callback(description);
+ };
+
return (