have a feature flag to decide if we should disable user_goal_check (#1192)
This commit is contained in:
@@ -0,0 +1,45 @@
|
|||||||
|
import { MultiSelect } from "@/components/ui/multi-select";
|
||||||
|
import { useWorkflowParametersState } from "../../useWorkflowParametersState";
|
||||||
|
import { HelpTooltip } from "@/components/HelpTooltip";
|
||||||
|
import { helpTooltipContent } from "./types";
|
||||||
|
|
||||||
|
type Props = {
|
||||||
|
availableOutputParameters: Array<string>;
|
||||||
|
parameters: Array<string>;
|
||||||
|
onParametersChange: (parameters: Array<string>) => void;
|
||||||
|
};
|
||||||
|
|
||||||
|
function TaskNodeParametersPanel({
|
||||||
|
availableOutputParameters,
|
||||||
|
parameters,
|
||||||
|
onParametersChange,
|
||||||
|
}: Props) {
|
||||||
|
const [workflowParameters] = useWorkflowParametersState();
|
||||||
|
const keys = workflowParameters
|
||||||
|
.map((parameter) => parameter.key)
|
||||||
|
.concat(availableOutputParameters);
|
||||||
|
|
||||||
|
const options = keys.map((key) => {
|
||||||
|
return {
|
||||||
|
label: key,
|
||||||
|
value: key,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
return (
|
||||||
|
<div className="space-y-2">
|
||||||
|
<header className="flex gap-2">
|
||||||
|
<h1 className="text-xs text-slate-300">Parameters</h1>
|
||||||
|
<HelpTooltip content={helpTooltipContent["parameters"]} />
|
||||||
|
</header>
|
||||||
|
<MultiSelect
|
||||||
|
value={parameters}
|
||||||
|
onValueChange={onParametersChange}
|
||||||
|
options={options}
|
||||||
|
maxCount={50}
|
||||||
|
/>
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export { TaskNodeParametersPanel };
|
||||||
@@ -859,6 +859,12 @@ class ForgeAgent:
|
|||||||
|
|
||||||
task_completes_on_download = task_block and task_block.complete_on_download and task.workflow_run_id
|
task_completes_on_download = task_block and task_block.complete_on_download and task.workflow_run_id
|
||||||
if not has_decisive_action and not task_completes_on_download:
|
if not has_decisive_action and not task_completes_on_download:
|
||||||
|
disable_user_goal_check = app.EXPERIMENTATION_PROVIDER.is_feature_enabled_cached(
|
||||||
|
"DISABLE_USER_GOAL_CHECK",
|
||||||
|
task.task_id,
|
||||||
|
properties={"task_url": task.url, "organization_id": task.organization_id},
|
||||||
|
)
|
||||||
|
if not disable_user_goal_check:
|
||||||
working_page = await browser_state.must_get_working_page()
|
working_page = await browser_state.must_get_working_page()
|
||||||
complete_action = await self.check_user_goal_complete(
|
complete_action = await self.check_user_goal_complete(
|
||||||
page=working_page,
|
page=working_page,
|
||||||
|
|||||||
Reference in New Issue
Block a user