suchintan.vibe code user goal check (#2349)

Co-authored-by: lawyzheng <lawyzheng1106@gmail.com>
This commit is contained in:
Shuchang Zheng
2025-05-15 08:18:24 -07:00
committed by GitHub
parent 847ddacebd
commit ed4280153f
30 changed files with 251 additions and 9 deletions

View File

@@ -24,6 +24,8 @@ export const baseHelpTooltipContent = {
continueOnFailure:
"Allow the workflow to continue if it encounters a failure.",
cacheActions: "Cache the actions of this block.",
includeActionHistoryInVerification:
"Include the action history in the completion verification.",
} as const;
export const basePlaceholderContent = {

View File

@@ -56,6 +56,7 @@ function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
totpIdentifier: data.totpIdentifier,
completeCriterion: data.completeCriterion,
terminateCriterion: data.terminateCriterion,
includeActionHistoryInVerification: data.includeActionHistoryInVerification,
});
const deleteNodeCallback = useDeleteNodeCallback();
@@ -257,6 +258,31 @@ function NavigationNode({ id, data }: NodeProps<NavigationNode>) {
)}
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">
Include Action History
</Label>
<HelpTooltip
content={
helpTooltips["navigation"][
"includeActionHistoryInVerification"
]
}
/>
</div>
<div className="w-52">
<Switch
checked={inputs.includeActionHistoryInVerification}
onCheckedChange={(checked) => {
handleChange(
"includeActionHistoryInVerification",
checked,
);
}}
/>
</div>
</div>
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">

View File

@@ -15,6 +15,7 @@ export type NavigationNodeData = NodeBaseData & {
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
includeActionHistoryInVerification: boolean;
};
export type NavigationNode = Node<NavigationNodeData, "navigation">;
@@ -36,6 +37,7 @@ export const navigationNodeDefaultData: NavigationNodeData = {
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
includeActionHistoryInVerification: false,
} as const;
export function isNavigationNode(node: Node): node is NavigationNode {

View File

@@ -66,6 +66,7 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
errorCodeMapping: data.errorCodeMapping,
totpVerificationUrl: data.totpVerificationUrl,
totpIdentifier: data.totpIdentifier,
includeActionHistoryInVerification: data.includeActionHistoryInVerification,
});
function handleChange(key: string, value: unknown) {
@@ -290,6 +291,31 @@ function TaskNode({ id, data }: NodeProps<TaskNode>) {
)}
</div>
<Separator />
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">
Include Action History
</Label>
<HelpTooltip
content={
helpTooltips["task"][
"includeActionHistoryInVerification"
]
}
/>
</div>
<div className="w-52">
<Switch
checked={inputs.includeActionHistoryInVerification}
onCheckedChange={(checked) => {
handleChange(
"includeActionHistoryInVerification",
checked,
);
}}
/>
</div>
</div>
<div className="flex items-center justify-between">
<div className="flex gap-2">
<Label className="text-xs font-normal text-slate-300">

View File

@@ -17,6 +17,7 @@ export type TaskNodeData = NodeBaseData & {
totpVerificationUrl: string | null;
totpIdentifier: string | null;
cacheActions: boolean;
includeActionHistoryInVerification: boolean;
};
export type TaskNode = Node<TaskNodeData, "task">;
@@ -40,6 +41,7 @@ export const taskNodeDefaultData: TaskNodeData = {
totpIdentifier: null,
continueOnFailure: false,
cacheActions: false,
includeActionHistoryInVerification: false,
} as const;
export function isTaskNode(node: Node): node is TaskNode {

View File

@@ -232,6 +232,8 @@ function convertToNode(
cacheActions: block.cache_actions,
completeCriterion: block.complete_criterion ?? "",
terminateCriterion: block.terminate_criterion ?? "",
includeActionHistoryInVerification:
block.include_action_history_in_verification ?? false,
},
};
}
@@ -304,6 +306,8 @@ function convertToNode(
maxStepsOverride: block.max_steps_per_run ?? null,
completeCriterion: block.complete_criterion ?? "",
terminateCriterion: block.terminate_criterion ?? "",
includeActionHistoryInVerification:
block.include_action_history_in_verification ?? false,
},
};
}
@@ -975,6 +979,8 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
totp_identifier: node.data.totpIdentifier,
totp_verification_url: node.data.totpVerificationUrl,
cache_actions: node.data.cacheActions,
include_action_history_in_verification:
node.data.includeActionHistoryInVerification,
};
}
case "taskv2": {
@@ -1046,6 +1052,8 @@ function getWorkflowBlock(node: WorkflowBlockNode): BlockYAML {
cache_actions: node.data.cacheActions,
complete_criterion: node.data.completeCriterion,
terminate_criterion: node.data.terminateCriterion,
include_action_history_in_verification:
node.data.includeActionHistoryInVerification,
};
}
case "extraction": {
@@ -1703,6 +1711,8 @@ function convertBlocksToBlockYAML(
totp_identifier: block.totp_identifier,
totp_verification_url: block.totp_verification_url,
cache_actions: block.cache_actions,
include_action_history_in_verification:
block.include_action_history_in_verification,
};
return blockYaml;
}
@@ -1765,6 +1775,8 @@ function convertBlocksToBlockYAML(
cache_actions: block.cache_actions,
complete_criterion: block.complete_criterion,
terminate_criterion: block.terminate_criterion,
include_action_history_in_verification:
block.include_action_history_in_verification,
};
return blockYaml;
}