style(ui): família visual de IA local

This commit is contained in:
evandro committed 2026-11-16 00:42:44 -03:00
1 parent f0b7db8c12
commit 07b0eaadca
62 files changed
+918 -853

No files matched your search

+26 -25
View File
@@ -32,21 +32,21 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
switch (metadata.stepType) {
case 'preprocessing':
return <Brain className={cn("w-4 h-4 text-muted-foreground/80", isSpinning && "animate-spin")} />;
return <Brain className={cn("w-4 h-4 text-muted-foreground", isSpinning && "animate-spin")} />;
case 'web-research':
return <Globe className={cn("w-4 h-4 text-muted-foreground/80", isSpinning && "animate-spin")} />;
return <Globe className={cn("w-4 h-4 text-muted-foreground", isSpinning && "animate-spin")} />;
case 'sources-found':
return <Package className={cn("w-4 h-4 text-muted-foreground/80", isSpinning && "animate-spin")} />;
return <Package className={cn("w-4 h-4 text-muted-foreground", isSpinning && "animate-spin")} />;
case 'processing':
return <Brain className={cn("w-4 h-4 text-muted-foreground/80", isSpinning && "animate-spin")} />;
return <Brain className={cn("w-4 h-4 text-muted-foreground", isSpinning && "animate-spin")} />;
case 'response-generation':
return <Loader2 className={cn("w-4 h-4 text-muted-foreground/80", isSpinning && "animate-spin")} />;
return <Loader2 className={cn("w-4 h-4 text-muted-foreground", isSpinning && "animate-spin text-primary")} />;
case 'fallback':
return <AlertCircle className="w-4 h-4 text-muted-foreground/80" />;
return <AlertCircle className="w-4 h-4 text-warning" />;
case 'error':
return <XCircle className="w-4 h-4 text-destructive/80" />;
return <XCircle className="w-4 h-4 text-destructive" />;
default:
return <Search className="w-4 h-4 text-muted-foreground/80" />;
return <Search className="w-4 h-4 text-muted-foreground" />;
}
};
@@ -61,33 +61,34 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
};
return (
<div className="mb-4 ml-10 animate-in fade-in slide-in-from-bottom-2 duration-300">
<div className="flex items-center gap-3 p-2 transition-all w-fit max-w-full">
<div className="mb-4 ml-10 animate-in fade-in duration-200 ease-out">
<div className="flex items-center gap-3 p-2 w-fit max-w-full">
<div className="flex items-center gap-2">
{getStepIcon()}
<span className={cn(
"text-sm font-medium",
metadata.status === 'error'
? "text-destructive/80"
: "text-muted-foreground/80"
? "text-destructive"
: "text-muted-foreground"
)}>
{metadata.label}
</span>
</div>
{metadata.status === 'running' && (
<Loader2 className="w-3 h-3 animate-spin text-muted-foreground/50" />
<Loader2 className="w-3 h-3 animate-spin text-primary" />
)}
{(metadata.details || metadata.sources || metadata.error) && (
<button
onClick={() => setIsExpanded(!isExpanded)}
className="p-1 hover:bg-black/5 dark:hover:bg-white/10 rounded-full transition-colors"
className="p-1 rounded-sm text-muted-foreground hover:bg-hover hover:text-foreground transition-colors duration-150"
aria-expanded={isExpanded}
>
{isExpanded ? (
<ChevronUp className="w-3.5 h-3.5 opacity-50" />
<ChevronUp className="w-4 h-4" />
) : (
<ChevronDown className="w-3.5 h-3.5 opacity-50" />
<ChevronDown className="w-4 h-4" />
)}
</button>
)}
@@ -95,9 +96,9 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
{/* Progress Bar Compacta */}
{metadata.progress !== undefined && metadata.progress < 100 && (
<div className="ml-1 mt-1 w-32 h-1 bg-muted/50 rounded-full overflow-hidden">
<div className="ml-1 mt-1 w-32 h-1 bg-hover rounded-full overflow-hidden">
<div
className="h-full bg-primary/50 transition-all duration-300"
className="h-full bg-primary"
style={{ width: `${metadata.progress}%` }}
/>
</div>
@@ -105,7 +106,7 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
{/* Conteúdo Expandido */}
{isExpanded && (
<div className="mt-2 ml-1 p-3 border-l-2 border-muted/30 space-y-2 text-sm text-muted-foreground animate-in fade-in">
<div className="mt-2 ml-1 p-3 border-l border-border space-y-2 text-sm text-muted-foreground animate-in fade-in duration-150">
{metadata.details && (
<div className="whitespace-pre-wrap">{metadata.details}</div>
)}
@@ -113,11 +114,11 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
{metadata.sources && metadata.sources.length > 0 && (
<div className="flex flex-wrap gap-2 pt-1">
{metadata.sources.map((source, idx) => (
<div key={idx} className="flex items-center gap-1 bg-background/50 border border-muted/50 px-2 py-1 rounded text-xs max-w-[200px]">
<ExternalLink className="w-3 h-3 opacity-50" />
<a href={source.url} target="_blank" className="truncate hover:underline flex-1">{source.title || source.url}</a>
<button onClick={() => copyToClipboard(source.url, idx)} className="ml-1 opacity-50 hover:opacity-100">
{copiedIndex === idx ? <Check className="w-3 h-3 text-green-500" /> : <Copy className="w-3 h-3" />}
<div key={idx} className="flex items-center gap-1 bg-surface border px-2 py-1 rounded-sm text-xs max-w-[200px]">
<ExternalLink className="w-3 h-3 shrink-0" />
<a href={source.url} target="_blank" className="truncate text-foreground hover:underline flex-1">{source.title || source.url}</a>
<button onClick={() => copyToClipboard(source.url, idx)} className="ml-1 rounded-sm hover:text-foreground transition-colors duration-150" aria-label="Copiar URL">
{copiedIndex === idx ? <Check className="w-3 h-3 text-success" /> : <Copy className="w-3 h-3" />}
</button>
</div>
))}
@@ -125,7 +126,7 @@ export function MessageStepThinking({ metadata }: MessageStepThinkingProps) {
)}
{metadata.error && (
<div className="text-red-500 font-medium flex items-center gap-2">
<div className="text-destructive font-medium flex items-center gap-2">
<XCircle className="w-4 h-4" />
{metadata.error}
</div>