feat: add Agent Model Manager component for managing LLM configurations and enhance UI in related components

This commit is contained in:
Anish Sarkar 2026-04-14 01:30:30 +05:30
parent f22d7434ce
commit 2b40592f0b
9 changed files with 31 additions and 31 deletions

View file

@ -271,7 +271,7 @@ export function VisionModelManager({ searchSpaceId }: VisionModelManagerProps) {
</div>
</div>
{(canUpdate || canDelete) && (
<div className="flex items-center gap-0 shrink-0 sm:w-0 sm:overflow-hidden sm:group-hover:w-auto sm:opacity-0 sm:group-hover:opacity-100 transition-all duration-150">
<div className="flex items-center gap-1 shrink-0 sm:w-0 sm:overflow-hidden sm:group-hover:w-auto sm:opacity-0 sm:group-hover:opacity-100 transition-all duration-150">
{canUpdate && (
<TooltipProvider>
<Tooltip open={isDesktop ? undefined : false}>
@ -297,7 +297,7 @@ export function VisionModelManager({ searchSpaceId }: VisionModelManagerProps) {
variant="ghost"
size="icon"
onClick={() => setConfigToDelete(config)}
className="h-6 w-6 text-muted-foreground hover:text-destructive"
className="h-7 w-7 rounded-lg text-muted-foreground hover:text-destructive"
>
<Trash2 className="h-3 w-3" />
</Button>
@ -312,7 +312,7 @@ export function VisionModelManager({ searchSpaceId }: VisionModelManagerProps) {
{/* Footer: Date + Creator */}
<div className="flex items-center pt-2 border-t border-border/40 mt-auto">
<span className="flex-1 min-w-0 text-[11px] text-muted-foreground/60 truncate">
<span className="shrink-0 text-[11px] text-muted-foreground/60 whitespace-nowrap">
{new Date(config.created_at).toLocaleDateString(undefined, {
year: "numeric",
month: "short",
@ -325,7 +325,7 @@ export function VisionModelManager({ searchSpaceId }: VisionModelManagerProps) {
<TooltipProvider>
<Tooltip open={isDesktop ? undefined : false}>
<TooltipTrigger asChild>
<div className="flex-1 min-w-0 flex items-center justify-end gap-1.5 cursor-default">
<div className="min-w-0 flex items-center gap-1.5 cursor-default">
<Avatar className="size-4.5 shrink-0">
{member.avatarUrl && (
<AvatarImage src={member.avatarUrl} alt={member.name} />