mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-14 23:21:35 +00:00
fix(ui): label explicit empty tool selections
This commit is contained in:
parent
0587e3b8f8
commit
dea10d4fdb
2 changed files with 4 additions and 1 deletions
|
|
@ -307,5 +307,6 @@ it("should distinguish an unset enum from empty string and retain explicit false
|
|||
await expect(submit(ref)).resolves.toEqual({ active: false });
|
||||
await user.click(screen.getByRole("combobox", { name: "mode" }));
|
||||
await user.click(await screen.findByRole("option", { name: "Empty string" }));
|
||||
expect(screen.getByRole("combobox", { name: "mode" })).toHaveTextContent("Empty string");
|
||||
await expect(submit(ref)).resolves.toEqual({ mode: "", active: false });
|
||||
});
|
||||
|
|
|
|||
|
|
@ -358,7 +358,9 @@ const MCPToolArgumentsForm = forwardRef<MCPToolArgumentsFormRef, MCPToolArgument
|
|||
aria-invalid={field["aria-invalid"]}
|
||||
className="w-full"
|
||||
>
|
||||
<SelectValue placeholder={`Select ${key}`} />
|
||||
<SelectValue placeholder={`Select ${key}`}>
|
||||
{field.value === "" ? "Empty string" : undefined}
|
||||
</SelectValue>
|
||||
</SelectTrigger>
|
||||
<SelectContent>
|
||||
{!required && <SelectItem value={null}>Select {key}</SelectItem>}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue