mirror of
https://github.com/BerriAI/litellm.git
synced 2026-10-04 02:31:27 +00:00
fix(mcp/ui): clarify per-user env var field as a hint, not a value
The per-user value column rendered as a plain input, so it read like a static value shared by every user, defeating the purpose of per-user variables. Add a persistent "Hint" addon with an explanatory tooltip, lighten the typed text, and align the row to the top so the addon group no longer sits lower than its neighbours and the layout stays put when the name field shows a validation error.
This commit is contained in:
parent
8852c0df95
commit
ba7cab2c34
1 changed files with 12 additions and 4 deletions
|
|
@ -65,7 +65,7 @@ const EnvVarsSection: React.FC = () => {
|
|||
</div>
|
||||
)}
|
||||
{fields.map(({ key, name, ...restField }) => (
|
||||
<div key={key} className="flex gap-3 items-baseline">
|
||||
<div key={key} className="flex gap-3 items-start">
|
||||
<Form.Item
|
||||
{...restField}
|
||||
name={[name, "name"]}
|
||||
|
|
@ -97,7 +97,7 @@ const EnvVarsSection: React.FC = () => {
|
|||
<Select options={SCOPE_OPTIONS} />
|
||||
</Form.Item>
|
||||
<div
|
||||
style={{ width: 24 }}
|
||||
style={{ width: 24, height: 32 }}
|
||||
className="flex items-center justify-center"
|
||||
>
|
||||
<MinusCircleOutlined
|
||||
|
|
@ -134,8 +134,16 @@ const ScopedValueOrDescription: React.FC<{
|
|||
return (
|
||||
<Form.Item {...restField} name={[name, "description"]} className="mb-0">
|
||||
<Input
|
||||
placeholder="Description shown to users, e.g. Your DB username"
|
||||
className="rounded-md"
|
||||
addonBefore={
|
||||
<Tooltip title="Per-user variables have no shared value. This text is only a hint shown to each user when they fill in their own value.">
|
||||
<span className="text-xs text-gray-500 cursor-help whitespace-nowrap">
|
||||
<InfoCircleOutlined className="mr-1" />
|
||||
Hint
|
||||
</span>
|
||||
</Tooltip>
|
||||
}
|
||||
placeholder="e.g. Your DB username"
|
||||
styles={{ input: { color: "#9ca3af" } }}
|
||||
/>
|
||||
</Form.Item>
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue