Add new workflow parameter type in UI, credential (#1897)

This commit is contained in:
Shuchang Zheng
2025-03-06 12:12:13 -08:00
committed by GitHub
parent 67e50e0d0e
commit 38eb14ad42
8 changed files with 109 additions and 24 deletions

View File

@@ -5,6 +5,7 @@ import { CodeEditor } from "./components/CodeEditor";
import { AutoResizingTextarea } from "@/components/AutoResizingTextarea/AutoResizingTextarea";
import { Label } from "@/components/ui/label";
import { WorkflowParameterValueType } from "./types/workflowTypes";
import { CredentialSelector } from "./components/CredentialSelector";
type Props = {
type: WorkflowParameterValueType;
@@ -80,6 +81,16 @@ function WorkflowParameterInput({ type, value, onChange }: Props) {
/>
);
}
if (type === "credential_id") {
const credentialId = value as string | null;
return (
<CredentialSelector
value={credentialId ?? ""}
onChange={(value) => onChange(value)}
/>
);
}
}
export { WorkflowParameterInput };