Skip to content

AutoGPT is the vision of accessible AI for everyone, to use and to build on. Our mission is to provide the tools, so that you can focus on what matters.

fix(frontend/library): Support number values in empty input check (#10308)

Reinier van der Leer6de1e470d984
diff --git a/autogpt_platform/frontend/src/components/agents/agent-run-draft-view.tsx b/autogpt_platform/frontend/src/components/agents/agent-run-draft-view.tsx
index 23628f0a31..2f71451647 100644
--- a/autogpt_platform/frontend/src/components/agents/agent-run-draft-view.tsx
+++ b/autogpt_platform/frontend/src/components/agents/agent-run-draft-view.tsx
@@ -104,7 +104,14 @@ export default function AgentRunDraftView({
const [allRequiredInputsAreSet, missingInputs] = useMemo(() => {
const nonEmptyInputs = new Set(
- Object.keys(inputValues).filter((k) => !isEmpty(inputValues[k])),
+ Object.keys(inputValues).filter((k) => {
+ const value = inputValues[k];
+ return (
+ value !== undefined &&
+ value !== "" &&
+ (typeof value !== "object" || !isEmpty(value))
+ );
+ }),
);
const requiredInputs = new Set(
agentInputSchema.required as string[] | undefined,