accept ai_fallback for new workflows (#3358)
This commit is contained in:
@@ -48,6 +48,7 @@ import {
|
||||
MAX_SCREENSHOT_SCROLLS_DEFAULT,
|
||||
MAX_STEPS_DEFAULT,
|
||||
} from "@/routes/workflows/editor/nodes/Taskv2Node/types";
|
||||
import { OrgWalled } from "@/components/Orgwalled";
|
||||
|
||||
function createTemplateTaskFromTaskGenerationParameters(
|
||||
values: TaskGenerationApiResponse,
|
||||
@@ -470,7 +471,7 @@ function PromptBox() {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<OrgWalled className="p-0">
|
||||
<div className="flex gap-16">
|
||||
<div className="w-48 shrink-0">
|
||||
<div className="text-sm">Generate Script</div>
|
||||
@@ -486,6 +487,7 @@ function PromptBox() {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
</OrgWalled>
|
||||
<div className="flex gap-16">
|
||||
<div className="w-48 shrink-0">
|
||||
<div className="text-sm">Publish Workflow</div>
|
||||
|
||||
@@ -30,6 +30,7 @@ import { useWorkflowHasChangesStore } from "@/store/WorkflowHasChangesStore";
|
||||
import { cn } from "@/util/utils";
|
||||
import { WorkflowApiResponse } from "../types/workflowTypes";
|
||||
import { CacheKeyValuesResponse } from "@/routes/workflows/types/scriptTypes";
|
||||
import { OrgWalled } from "@/components/Orgwalled";
|
||||
|
||||
interface Dom {
|
||||
input: React.MutableRefObject<HTMLInputElement | null>;
|
||||
@@ -125,6 +126,7 @@ function WorkflowHeader({
|
||||
<div className="flex h-full items-center justify-end gap-4">
|
||||
{user && workflow.generate_script && (
|
||||
// (cacheKeyValues?.total_count ?? 0) > 0 && (
|
||||
<OrgWalled className="p-0">
|
||||
<div
|
||||
tabIndex={1}
|
||||
className="flex max-w-[15rem] items-center justify-center gap-1 rounded-md border border-input pr-1 focus-within:ring-1 focus-within:ring-ring"
|
||||
@@ -181,6 +183,7 @@ function WorkflowHeader({
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
</OrgWalled>
|
||||
)}
|
||||
{isGlobalWorkflow ? (
|
||||
<Button
|
||||
|
||||
@@ -7,6 +7,7 @@ import {
|
||||
DropdownMenuTrigger,
|
||||
} from "@/components/ui/dropdown-menu";
|
||||
import { DotsHorizontalIcon } from "@radix-ui/react-icons";
|
||||
import { OrgWalled } from "@/components/Orgwalled";
|
||||
|
||||
type Props = {
|
||||
isDeletable?: boolean;
|
||||
@@ -44,7 +45,9 @@ function NodeActionMenu({
|
||||
Delete Block
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
{isScriptable && onShowScript && (
|
||||
{isScriptable && (
|
||||
<OrgWalled className="p-0">
|
||||
{onShowScript && (
|
||||
<DropdownMenuItem
|
||||
onSelect={() => {
|
||||
onShowScript();
|
||||
@@ -53,6 +56,8 @@ function NodeActionMenu({
|
||||
{showScriptText ?? "Show Code"}
|
||||
</DropdownMenuItem>
|
||||
)}
|
||||
</OrgWalled>
|
||||
)}
|
||||
</DropdownMenuContent>
|
||||
</DropdownMenu>
|
||||
);
|
||||
|
||||
@@ -30,6 +30,7 @@ import { ModelSelector } from "@/components/ModelSelector";
|
||||
import { WorkflowModel } from "@/routes/workflows/types/workflowTypes";
|
||||
import { MAX_SCREENSHOT_SCROLLS_DEFAULT } from "../Taskv2Node/types";
|
||||
import { KeyValueInput } from "@/components/KeyValueInput";
|
||||
import { OrgWalled } from "@/components/Orgwalled";
|
||||
import { placeholders } from "@/routes/workflows/editor/helpContent";
|
||||
import { useToggleScriptForNodeCallback } from "@/routes/workflows/hooks/useToggleScriptForNodeCallback";
|
||||
import { useWorkflowSettingsStore } from "@/store/WorkflowSettingsStore";
|
||||
@@ -162,6 +163,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
|
||||
<div className="relative">
|
||||
<div className="absolute right-[-0.5rem] top-[-0.25rem]">
|
||||
<div>
|
||||
<OrgWalled className="p-0">
|
||||
<Button variant="link" size="icon" onClick={showAllScripts}>
|
||||
<TooltipProvider>
|
||||
<Tooltip>
|
||||
@@ -172,6 +174,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
|
||||
</Tooltip>
|
||||
</TooltipProvider>
|
||||
</Button>
|
||||
</OrgWalled>
|
||||
</div>
|
||||
</div>
|
||||
<header className="mb-6 mt-2">Start</header>
|
||||
@@ -224,7 +227,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
|
||||
}}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<OrgWalled className="p-0 hover:p-0">
|
||||
<div className="flex flex-col gap-4">
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
@@ -275,6 +278,7 @@ function StartNode({ id, data }: NodeProps<StartNode>) {
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
</OrgWalled>
|
||||
<div className="space-y-2">
|
||||
<div className="flex items-center gap-2">
|
||||
<Label>Save & Reuse Session</Label>
|
||||
|
||||
@@ -1701,6 +1701,7 @@ class WorkflowService:
|
||||
status=request.status,
|
||||
generate_script=request.generate_script,
|
||||
cache_key=request.cache_key,
|
||||
ai_fallback=request.ai_fallback,
|
||||
)
|
||||
# Keeping track of the new workflow id to delete it if an error occurs during the creation process
|
||||
new_workflow_id = workflow.workflow_id
|
||||
|
||||
Reference in New Issue
Block a user