Log http block request body, make azure blob key parameterizable (#3300)

Co-authored-by: Suchintan Singh <suchintan@skyvern.com>
This commit is contained in:
Suchintan
2025-08-25 17:36:29 -04:00
committed by GitHub
parent e64c47279f
commit 1167765867
8 changed files with 69 additions and 61 deletions

View File

@@ -1,4 +1,5 @@
import { PlusIcon } from "@radix-ui/react-icons";
import { PlusIcon, EyeOpenIcon, EyeClosedIcon } from "@radix-ui/react-icons";
import { useState } from "react";
import { cn } from "@/util/utils";
import { Input } from "./ui/input";
import { Popover, PopoverContent, PopoverTrigger } from "./ui/popover";
@@ -10,33 +11,54 @@ type Props = Omit<React.ComponentProps<typeof Input>, "onChange"> & {
};
function WorkflowBlockInput(props: Props) {
const { nodeId, onChange, ...inputProps } = props;
const { nodeId, onChange, type, ...inputProps } = props;
const [showPassword, setShowPassword] = useState(false);
const isPasswordField = type === "password";
const actualType = isPasswordField && showPassword ? "text" : type;
return (
<div className="relative">
<Input
{...inputProps}
className={cn("pr-9", props.className)}
type={actualType}
className={cn(isPasswordField ? "pr-18" : "pr-9", props.className)}
onChange={(event) => {
onChange(event.target.value);
}}
/>
<div className="absolute right-0 top-0 flex size-9 cursor-pointer items-center justify-center">
<Popover>
<PopoverTrigger asChild>
<div className="rounded p-1 hover:bg-muted">
<PlusIcon className="size-4" />
<div className="absolute right-0 top-0 flex cursor-pointer items-center justify-center">
{isPasswordField && (
<div className="flex size-9 items-center justify-center">
<div
className="rounded p-1 hover:bg-muted"
onClick={() => setShowPassword(!showPassword)}
>
{showPassword ? (
<EyeClosedIcon className="size-4" />
) : (
<EyeOpenIcon className="size-4" />
)}
</div>
</PopoverTrigger>
<PopoverContent className="w-[22rem]">
<WorkflowBlockParameterSelect
nodeId={nodeId}
onAdd={(parameterKey) => {
onChange(`${props.value ?? ""}{{${parameterKey}}}`);
}}
/>
</PopoverContent>
</Popover>
</div>
)}
<div className="flex size-9 items-center justify-center">
<Popover>
<PopoverTrigger asChild>
<div className="rounded p-1 hover:bg-muted">
<PlusIcon className="size-4" />
</div>
</PopoverTrigger>
<PopoverContent className="w-[22rem]">
<WorkflowBlockParameterSelect
nodeId={nodeId}
onAdd={(parameterKey) => {
onChange(`${props.value ?? ""}{{${parameterKey}}}`);
}}
/>
</PopoverContent>
</Popover>
</div>
</div>
</div>
);