diff --git a/client/src/components/Agents/AgentCard.tsx b/client/src/components/Agents/AgentCard.tsx index 01925e99eb..24d6b83834 100644 --- a/client/src/components/Agents/AgentCard.tsx +++ b/client/src/components/Agents/AgentCard.tsx @@ -1,7 +1,8 @@ import React from 'react'; +import { Label } from '@librechat/client'; import type t from 'librechat-data-provider'; -import useLocalize from '~/hooks/useLocalize'; import { cn, renderAgentAvatar, getContactDisplayName } from '~/utils'; +import { useLocalize } from '~/hooks'; interface AgentCardProps { agent: t.Agent; // The agent data to display @@ -18,10 +19,10 @@ const AgentCard: React.FC = ({ agent, onClick, className = '' }) return (
= ({ agent, onClick, className = '' }) } }} > -
- {/* Agent avatar section - left side, responsive */} -
- {renderAgentAvatar(agent, { size: 'md' })} + {/* Two column layout */} +
+ {/* Left column: Avatar and Category */} +
+
{renderAgentAvatar(agent, { size: 'sm' })}
+ + {/* Category tag */} +
+ {agent.category && ( + + )} +
- {/* Agent info section - right side, responsive */} -
- {/* Agent name - responsive text sizing */} -

- {agent.name} -

+ {/* Right column: Name, description, and other content */} +
+
+ {/* Agent name */} + - {/* Agent description - responsive text sizing and spacing */} + {/* Owner info */} + {(() => { + const displayName = getContactDisplayName(agent); + if (displayName) { + return ( +
+ + +
+ ); + } + return null; + })()} +
+ + {/* Agent description */}

{agent.description || ( - + + )}

- - {/* Owner info - responsive text sizing */} - {(() => { - const displayName = getContactDisplayName(agent); - - if (displayName) { - return ( -
- {localize('com_agents_created_by')} - {displayName} -
- ); - } - - return null; - })()}
diff --git a/client/src/components/Agents/AgentGrid.tsx b/client/src/components/Agents/AgentGrid.tsx index 26406504fb..df7b208da9 100644 --- a/client/src/components/Agents/AgentGrid.tsx +++ b/client/src/components/Agents/AgentGrid.tsx @@ -179,19 +179,6 @@ const AgentGrid: React.FC = ({ category, searchQuery, onSelectAg aria-live="polite" aria-busy={isLoading && !hasData} > - {/* Grid title - only show for search results */} - {searchQuery && ( -
-

- {getGridTitle()} -

-
- )} - {/* Handle empty results with enhanced accessibility */} {(!currentAgents || currentAgents.length === 0) && !isLoading && !isFetching ? (
= ({ category, searchQuery, onSelectAg : localize('com_agents_empty_state_heading') } > -

- {searchQuery - ? localize('com_agents_search_empty_heading') - : localize('com_agents_empty_state_heading')} -

-

- {searchQuery - ? localize('com_agents_no_results') - : localize('com_agents_none_in_category')} -

+

{localize('com_agents_empty_state_heading')}

) : ( <> diff --git a/client/src/components/Agents/CategoryTabs.tsx b/client/src/components/Agents/CategoryTabs.tsx index 2dcb19ff1a..cefa7c14ad 100644 --- a/client/src/components/Agents/CategoryTabs.tsx +++ b/client/src/components/Agents/CategoryTabs.tsx @@ -132,10 +132,10 @@ const CategoryTabs: React.FC = ({ onClick={() => onChange(category.value)} onKeyDown={(e) => handleKeyDown(e, category.value)} className={cn( - 'relative cursor-pointer select-none whitespace-nowrap rounded-lg px-3 py-2 transition-colors', + 'relative cursor-pointer select-none whitespace-nowrap px-3 py-2 transition-colors', activeTab === category.value - ? 'bg-surface-hover text-text-primary' - : 'bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary', + ? 'rounded-t-lg bg-surface-hover text-text-primary' + : 'rounded-lg bg-surface-secondary text-text-secondary hover:bg-surface-hover hover:text-text-primary', )} role="tab" aria-selected={activeTab === category.value} diff --git a/client/src/components/Agents/SearchBar.tsx b/client/src/components/Agents/SearchBar.tsx index b4b4e53d77..b261bc90ed 100644 --- a/client/src/components/Agents/SearchBar.tsx +++ b/client/src/components/Agents/SearchBar.tsx @@ -73,7 +73,7 @@ const SearchBar: React.FC = ({ value, onSearch, className = '' } value={searchTerm} onChange={handleChange} placeholder={localize('com_agents_search_placeholder')} - className="h-14 rounded-2xl border-border-medium bg-transparent pl-12 pr-12 text-lg text-text-primary shadow-md transition-[border-color,box-shadow] duration-200 placeholder:text-text-tertiary focus:border-border-heavy focus:shadow-lg focus:ring-0" + className="h-14 rounded-2xl border-border-medium bg-transparent pl-12 pr-12 text-lg text-text-primary shadow-md transition-[border-color,box-shadow] duration-200 placeholder:text-text-secondary focus:border-border-heavy focus:shadow-lg focus:ring-0" aria-label={localize('com_agents_search_aria')} aria-describedby="search-instructions search-results-count" autoComplete="off" diff --git a/client/src/components/Agents/tests/AgentGrid.integration.spec.tsx b/client/src/components/Agents/tests/AgentGrid.integration.spec.tsx index 722c6edfb7..c429bf769e 100644 --- a/client/src/components/Agents/tests/AgentGrid.integration.spec.tsx +++ b/client/src/components/Agents/tests/AgentGrid.integration.spec.tsx @@ -33,8 +33,6 @@ jest.mock('~/hooks/useLocalize', () => () => (key: string, options?: any) => { com_agents_see_more: 'See more', com_agents_error_loading: 'Error loading agents', com_agents_error_searching: 'Error searching agents', - com_agents_no_results: 'No agents found. Try another search term.', - com_agents_none_in_category: 'No agents found in this category', com_agents_search_empty_heading: 'No results found', com_agents_empty_state_heading: 'No agents available', com_agents_loading: 'Loading...', diff --git a/client/src/locales/en/translation.json b/client/src/locales/en/translation.json index 210cb40185..8529748ea5 100644 --- a/client/src/locales/en/translation.json +++ b/client/src/locales/en/translation.json @@ -1238,8 +1238,6 @@ "com_agents_empty_state_heading": "No agents found", "com_agents_search_empty_heading": "No search results", "com_agents_no_description": "No description available", - "com_agents_none_in_category": "No agents found in this category", - "com_agents_no_results": "No agents found. Try another search term.", "com_agents_results_for": "Results for '{{query}}'", "com_agents_marketplace_subtitle": "Discover and use powerful AI agents to enhance your workflows and productivity", "com_ui_agent_name_is_required": "Agent name is required", diff --git a/client/src/utils/agents.tsx b/client/src/utils/agents.tsx index 043a70e5e2..abea8b7fe9 100644 --- a/client/src/utils/agents.tsx +++ b/client/src/utils/agents.tsx @@ -60,7 +60,7 @@ export const renderAgentAvatar = ( xl: 'h-20 w-20', }; - const borderClasses = showBorder ? 'border-2 border-white dark:border-gray-800' : ''; + const borderClasses = showBorder ? 'border-1 border-border-medium' : ''; if (avatarUrl) { return ( @@ -79,14 +79,11 @@ export const renderAgentAvatar = ( return (
{/* Subtle minimalistic placeholder */} -
+
- +
);