chore: intitial commit, starting seperating concerns for plan editor.

This commit is contained in:
Björn Otgaar
2026-01-28 11:35:34 +01:00
parent 60f7bad5d1
commit 5930e24bf4

View File

@@ -12,6 +12,32 @@ type PlanEditorDialogProps = {
description? : string;
};
/**
* Creates an action, as a step for a plan.
* @param type the type of action to build
* @param value the value of this action to build
* @param isGestureTag whether or not this action, restricted to gestures, is a tag.
* @returns An action
*/
function createAction(
type: ActionTypes,
value: string,
isGestureTag: boolean
): Action {
const id = crypto.randomUUID();
switch (type) {
case "speech":
return { id, text: value, type: "speech" };
case "gesture":
return { id, gesture: value, isTag: isGestureTag, type: "gesture" };
case "llm":
return { id, goal: value, type: "llm" };
}
}
export default function PlanEditorDialog({
plan,
onSave,