refactor: update global image model and configuration messages for clarity and consistency across components

This commit is contained in:
Anish Sarkar 2026-03-29 17:16:40 +05:30
parent 430372a4ff
commit f4adfb54fc
7 changed files with 8 additions and 23 deletions

View file

@ -196,11 +196,7 @@ export function ImageModelManager({ searchSpaceId }: ImageModelManagerProps) {
<Alert className="bg-muted/50 py-3"> <Alert className="bg-muted/50 py-3">
<Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" /> <Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" />
<AlertDescription className="text-xs md:text-sm"> <AlertDescription className="text-xs md:text-sm">
<span className="font-medium"> <p><span className="font-medium">{globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length} global image {globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length === 1 ? "model" : "models"}</span> available from your administrator. Use the model selector to view and select them.</p>
{globalConfigs.filter((g) => !("is_auto_mode" in g && g.is_auto_mode)).length} global
image model(s)
</span>{" "}
available from your administrator.
</AlertDescription> </AlertDescription>
</Alert> </Alert>
)} )}

View file

@ -196,7 +196,7 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
onClick={openNewDialog} onClick={openNewDialog}
className="gap-2 bg-white text-black hover:bg-neutral-100 dark:bg-white dark:text-black dark:hover:bg-neutral-200" className="gap-2 bg-white text-black hover:bg-neutral-100 dark:bg-white dark:text-black dark:hover:bg-neutral-200"
> >
Add Configuration Add LLM Model
</Button> </Button>
)} )}
</div> </div>
@ -243,18 +243,12 @@ export function ModelConfigManager({ searchSpaceId }: ModelConfigManagerProps) {
{/* Global Configs Info */} {/* Global Configs Info */}
{globalConfigs.length > 0 && ( {globalConfigs.length > 0 && (
<div> <Alert className="bg-muted/50 py-3">
<Alert className="bg-muted/50 py-3 md:py-4"> <Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" />
<Info className="h-3 w-3 md:h-4 md:w-4 shrink-0" /> <AlertDescription className="text-xs md:text-sm">
<AlertDescription className="text-xs md:text-sm"> <p><span className="font-medium">{globalConfigs.length} global {globalConfigs.length === 1 ? "model" : "models"}</span> available from your administrator. Use the model selector to view and select them.</p>
<span className="font-medium">{globalConfigs.length} global configuration(s)</span>{" "} </AlertDescription>
available from your administrator. These are pre-configured and ready to use.{" "} </Alert>
<span className="text-muted-foreground">
Global configs: {globalConfigs.map((g) => g.name).join(", ")}
</span>
</AlertDescription>
</Alert>
</div>
)} )}
{/* Loading Skeleton */} {/* Loading Skeleton */}

View file

@ -640,7 +640,6 @@
"active": "Active", "active": "Active",
"your_configs": "Your Configurations", "your_configs": "Your Configurations",
"manage_configs": "Manage and configure your LLM providers", "manage_configs": "Manage and configure your LLM providers",
"add_config": "Add Configuration",
"no_configs": "No Configurations Yet", "no_configs": "No Configurations Yet",
"no_configs_desc": "Add your own LLM provider configurations.", "no_configs_desc": "Add your own LLM provider configurations.",
"add_first_config": "Add First Configuration", "add_first_config": "Add First Configuration",

View file

@ -640,7 +640,6 @@
"active": "Activo", "active": "Activo",
"your_configs": "Tus configuraciones", "your_configs": "Tus configuraciones",
"manage_configs": "Administra y configura tus proveedores de LLM", "manage_configs": "Administra y configura tus proveedores de LLM",
"add_config": "Agregar configuración",
"no_configs": "Aún no hay configuraciones", "no_configs": "Aún no hay configuraciones",
"no_configs_desc": "Agrega tus propias configuraciones de proveedor de LLM.", "no_configs_desc": "Agrega tus propias configuraciones de proveedor de LLM.",
"add_first_config": "Agregar primera configuración", "add_first_config": "Agregar primera configuración",

View file

@ -640,7 +640,6 @@
"active": "सक्रिय", "active": "सक्रिय",
"your_configs": "आपकी कॉन्फ़िगरेशन", "your_configs": "आपकी कॉन्फ़िगरेशन",
"manage_configs": "अपने LLM प्रदाता प्रबंधित और कॉन्फ़िगर करें", "manage_configs": "अपने LLM प्रदाता प्रबंधित और कॉन्फ़िगर करें",
"add_config": "कॉन्फ़िगरेशन जोड़ें",
"no_configs": "अभी तक कोई कॉन्फ़िगरेशन नहीं", "no_configs": "अभी तक कोई कॉन्फ़िगरेशन नहीं",
"no_configs_desc": "अपनी LLM प्रदाता कॉन्फ़िगरेशन जोड़ें।", "no_configs_desc": "अपनी LLM प्रदाता कॉन्फ़िगरेशन जोड़ें।",
"add_first_config": "पहली कॉन्फ़िगरेशन जोड़ें", "add_first_config": "पहली कॉन्फ़िगरेशन जोड़ें",

View file

@ -640,7 +640,6 @@
"active": "Ativo", "active": "Ativo",
"your_configs": "Suas configurações", "your_configs": "Suas configurações",
"manage_configs": "Gerencie e configure seus provedores de LLM", "manage_configs": "Gerencie e configure seus provedores de LLM",
"add_config": "Adicionar configuração",
"no_configs": "Nenhuma configuração ainda", "no_configs": "Nenhuma configuração ainda",
"no_configs_desc": "Adicione suas próprias configurações de provedor de LLM.", "no_configs_desc": "Adicione suas próprias configurações de provedor de LLM.",
"add_first_config": "Adicionar primeira configuração", "add_first_config": "Adicionar primeira configuração",

View file

@ -624,7 +624,6 @@
"active": "活跃", "active": "活跃",
"your_configs": "您的配置", "your_configs": "您的配置",
"manage_configs": "管理和配置您的 LLM 提供商", "manage_configs": "管理和配置您的 LLM 提供商",
"add_config": "添加配置",
"no_configs": "暂无配置", "no_configs": "暂无配置",
"no_configs_desc": "添加您自己的 LLM 提供商配置。", "no_configs_desc": "添加您自己的 LLM 提供商配置。",
"add_first_config": "添加首个配置", "add_first_config": "添加首个配置",