mirror of
https://github.com/danny-avila/LibreChat.git
synced 2025-12-23 03:40:14 +01:00
⚙️ feat: Add configurable trust checkbox labels for MCP Server Dialog (#10820)
Co-authored-by: Atef Bellaaj <slalom.bellaaj@external.daimlertruck.com>
This commit is contained in:
parent
394bb6242b
commit
9400148175
5 changed files with 91 additions and 4 deletions
|
|
@ -516,12 +516,22 @@ const termsOfServiceSchema = z.object({
|
|||
|
||||
export type TTermsOfService = z.infer<typeof termsOfServiceSchema>;
|
||||
|
||||
// Schema for localized string (either simple string or language-keyed object)
|
||||
const localizedStringSchema = z.union([z.string(), z.record(z.string())]);
|
||||
export type LocalizedString = z.infer<typeof localizedStringSchema>;
|
||||
|
||||
const mcpServersSchema = z
|
||||
.object({
|
||||
placeholder: z.string().optional(),
|
||||
use: z.boolean().optional(),
|
||||
create: z.boolean().optional(),
|
||||
share: z.boolean().optional(),
|
||||
trustCheckbox: z
|
||||
.object({
|
||||
label: localizedStringSchema.optional(),
|
||||
subLabel: localizedStringSchema.optional(),
|
||||
})
|
||||
.optional(),
|
||||
})
|
||||
.optional();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue