mirror of
https://github.com/BerriAI/litellm.git
synced 2026-09-26 01:12:21 +00:00
fix(UserFieldsModal): distinguish 'all configured' from 'no defs' in preview
This commit is contained in:
parent
515023d1f0
commit
d5529467e4
1 changed files with 8 additions and 1 deletions
|
|
@ -75,9 +75,16 @@ const UserFieldsModal: React.FC<UserFieldsModalProps> = ({
|
|||
return `${window.location.origin}${window.location.pathname}?${params.toString()}`;
|
||||
};
|
||||
|
||||
const previewStatusLine =
|
||||
defs.length === 0
|
||||
? "No fields defined."
|
||||
: missing.length === 0
|
||||
? "All fields configured."
|
||||
: `Missing field${missing.length === 1 ? "" : "s"}:`;
|
||||
|
||||
const errorPreview = `Error: MCP server "${serverDisplayName}" requires user configuration before use.
|
||||
|
||||
${missing.length > 0 ? `Missing field${missing.length === 1 ? "" : "s"}:` : "No fields defined."}
|
||||
${previewStatusLine}
|
||||
${missing.map((f) => ` • ${f.label || f.name}${f.description ? ` — ${f.description}` : ""}`).join("\n")}
|
||||
|
||||
Please configure your fields at:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue