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

+35 -33
View File
@@ -1051,12 +1051,12 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
defaultSize={4}
minSize={4}
maxSize={4}
className="border-r flex flex-col items-center py-4 gap-4 bg-muted/20 w-[60px] min-w-[60px] max-w-[60px] flex-shrink-0"
className="border-r flex flex-col items-center py-4 gap-2 bg-surface w-[60px] min-w-[60px] max-w-[60px] flex-shrink-0"
>
<Button variant="ghost" size="icon" className="rounded-lg bg-primary/10 text-primary">
<Button variant="ghost" size="icon" className="bg-accent-soft text-foreground hover:bg-accent-soft" aria-label="Chat" aria-current="page">
<MessageSquare className="w-5 h-5" />
</Button>
<Button variant="ghost" size="icon" className="rounded-lg text-muted-foreground hover:text-foreground">
<Button variant="ghost" size="icon" className="text-muted-foreground hover:text-foreground" aria-label="Servidor">
<Server className="w-5 h-5" />
</Button>
<div className="flex-1" />
@@ -1064,14 +1064,16 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
variant="ghost"
size="icon"
onClick={() => setTheme(theme === "dark" ? "light" : "dark")}
className="rounded-lg text-muted-foreground hover:text-foreground"
className="text-muted-foreground hover:text-foreground"
aria-label="Alternar tema"
>
{mounted ? (theme === "dark" ? <Sun className="w-5 h-5" /> : <Moon className="w-5 h-5" />) : null}
</Button>
<Button
variant="ghost"
size="icon"
className="rounded-lg text-muted-foreground hover:text-foreground"
className="text-muted-foreground hover:text-foreground"
aria-label="Configurações"
onClick={() => router.push('/settings')}
>
<Settings className="w-5 h-5" />
@@ -1119,10 +1121,10 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
<ResizableHandle className="hidden md:block" />
{/* Main Chat Area */}
<ResizablePanel defaultSize={100} minSize={75} className="transition-all duration-300">
<ResizablePanel defaultSize={100} minSize={75}>
<div className="h-full flex flex-col">
{/* Header */}
<div className="h-14 border-b flex items-center px-3 sm:px-4 justify-between bg-background/50 backdrop-blur gap-2 sm:gap-4 flex-shrink-0" style={{ paddingLeft: 'clamp(12px, 2vw, 16px)', paddingRight: 'clamp(12px, 2vw, 16px)' }}>
<div className="h-14 border-b flex items-center px-3 sm:px-4 justify-between bg-background gap-2 sm:gap-4 flex-shrink-0">
<div className="flex items-center gap-2">
<Button
variant="ghost"
@@ -1137,13 +1139,13 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
<PanelLeftClose className="w-4 h-4" />
)}
</Button>
<div className="font-semibold flex items-center gap-2 text-sm sm:text-base">
<div className="font-semibold flex items-center gap-2 text-sm">
<span className="hidden sm:inline">Chat</span>
{isGeneratingTitle && <Loader2 className="w-3 h-3 animate-spin text-muted-foreground" />}
{isGeneratingTitle && <Loader2 className="w-3 h-3 animate-spin text-primary" />}
{isDownloading && (
<span className="text-xs text-muted-foreground flex items-center gap-1">
<Loader2 className="w-3 h-3 animate-spin" />
{progress}
<Loader2 className="w-3 h-3 animate-spin text-primary" />
<span className="font-mono">{progress}</span>
</span>
)}
</div>
@@ -1197,7 +1199,7 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
)}
</Tooltip>
))}
<SelectItem value="__add_model__" className="text-primary font-medium">
<SelectItem value="__add_model__" className="font-medium">
<span className="flex items-center gap-2">
<Plus className="h-4 w-4" />
Adicionar modelo...
@@ -1221,7 +1223,7 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
className="flex-1 overflow-y-auto scroll-smooth w-full min-h-0"
onScroll={handleScroll}
>
<div className="max-w-3xl mx-auto w-full px-3 sm:px-4 md:px-6 pt-4 sm:pt-6 pb-4 transition-all duration-300" style={{ paddingLeft: 'clamp(12px, 4vw, 24px)', paddingRight: 'clamp(12px, 4vw, 24px)' }}>
<div className="max-w-3xl mx-auto w-full px-3 sm:px-4 md:px-6 pt-4 sm:pt-6 pb-4">
{/* Indicador de carregamento de mensagens antigas */}
{paginationState.isLoadingMore && (
<div className="flex items-center justify-center py-4 mb-4">
@@ -1233,19 +1235,19 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
{/* Indicador de que há mais mensagens para carregar */}
{paginationState.hasMore && !paginationState.isLoadingMore && messages.length > 0 && (
<div className="flex items-center justify-center py-2 mb-4">
<span className="text-xs text-muted-foreground/60">
<span className="text-xs text-muted-foreground">
Role para cima para ver mensagens anteriores ({paginationState.totalCount - messages.length} restantes)
</span>
</div>
)}
{messages.length === 0 ? (
<div className="min-h-[50vh] flex flex-col items-center justify-center text-muted-foreground space-y-6">
<div className="p-6 rounded-2xl bg-muted/30 ring-1 ring-border/50 shadow-sm">
<MessageSquare className="w-8 h-8 text-primary/60" />
<div className="min-h-[50vh] flex flex-col items-center justify-center text-muted-foreground gap-6">
<div className="p-4 rounded-lg border bg-surface">
<MessageSquare className="w-8 h-8 text-muted-foreground" />
</div>
<div className="text-center space-y-2">
<p className="text-lg font-medium text-primary/80">Como posso ajudar você hoje?</p>
<p className="text-lg font-medium text-foreground">Como posso ajudar você hoje?</p>
<p className="text-sm text-muted-foreground">Selecione um modelo e comece uma conversa.</p>
</div>
</div>
@@ -1392,7 +1394,7 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
{/* Debug Info (Moved inside scroll) */}
{(deepResearch.state.logs.length > 0 || lastWebContext) && (
<div className="mt-12 pt-6 border-t border-dashed border-muted/50 opacity-70 hover:opacity-100 transition-opacity">
<div className="mt-12 pt-6 border-t border-dashed border-border">
<div className="space-y-4">
{/* Process Log Toggle */}
{deepResearch.state.logs.length > 0 && (
@@ -1400,22 +1402,22 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
<button
type="button"
onClick={() => setShowProcessDebug((prev) => !prev)}
className="flex items-center gap-2 text-xs font-medium text-muted-foreground hover:text-primary transition-colors"
className="flex items-center gap-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors duration-150"
>
<ScrollText className="w-3 h-3" />
Debug: Processo de Pensamento
<ChevronDown className={`w-3 h-3 transition-transform ${showProcessDebug ? 'rotate-180' : ''}`} />
</button>
{showProcessDebug && (
<div className="mt-2 space-y-2 p-4 rounded-lg bg-muted/30 text-xs border border-muted/50 max-h-60 overflow-y-auto">
<div className="mt-2 space-y-2 p-4 rounded-lg bg-surface text-xs border max-h-60 overflow-y-auto">
<div className="flex justify-end mb-2">
<Button variant="ghost" size="sm" onClick={handleCopyLogs} className="h-6 px-2 text-[10px]">
<Button variant="ghost" size="sm" onClick={handleCopyLogs} className="h-8 px-2 text-xs">
{logsCopied ? <Check className="w-3 h-3 mr-1" /> : <Copy className="w-3 h-3 mr-1" />} Copiar Logs
</Button>
</div>
{deepResearch.state.logs.map((log, idx) => (
<div key={idx} className="grid grid-cols-[60px_1fr] gap-2 border-b border-muted/20 pb-2 last:border-0">
<span className="text-muted-foreground uppercase text-[10px]">{log.stage}</span>
<div key={idx} className="grid grid-cols-[60px_1fr] gap-2 border-b border-border/60 pb-2 last:border-0">
<span className="font-mono text-muted-foreground text-xs">{log.stage}</span>
<span>{log.input ? (log.input.length > 50 ? log.input.substring(0, 50) + '...' : log.input) : '-'}</span>
</div>
))}
@@ -1430,22 +1432,22 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
<button
type="button"
onClick={() => setShowContextDebug((prev) => !prev)}
className="flex items-center gap-2 text-xs font-medium text-muted-foreground hover:text-primary transition-colors"
className="flex items-center gap-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors duration-150"
>
<Globe className="w-3 h-3" />
Debug: Contexto Web ({lastContextSources.length} fontes)
<ChevronDown className={`w-3 h-3 transition-transform ${showContextDebug ? 'rotate-180' : ''}`} />
</button>
{showContextDebug && (
<div className="mt-2 p-4 rounded-lg bg-muted/30 text-xs border border-muted/50 space-y-3">
<div className="mt-2 p-4 rounded-lg bg-surface text-xs border space-y-3">
<div className="max-h-32 overflow-y-auto space-y-1">
{lastContextSources.map((s, i) => (
<a key={i} href={s.url} target="_blank" className="block hover:underline text-primary truncate">{s.title || s.url}</a>
<a key={i} href={s.url} target="_blank" className="block underline-offset-2 hover:underline text-foreground truncate">{s.title || s.url}</a>
))}
</div>
<div className="border-t border-muted/20 pt-2">
<div className="border-t border-border pt-2">
<p className="mb-1 font-semibold">Preview Contexto:</p>
<pre className="max-h-32 overflow-y-auto p-2 bg-background rounded border text-[10px]">{lastWebContext.substring(0, 500)}...</pre>
<pre className="max-h-32 overflow-y-auto p-2 bg-background rounded-sm border text-xs">{lastWebContext.substring(0, 500)}...</pre>
</div>
</div>
)}
@@ -1466,7 +1468,7 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
<div className="absolute inset-0 -top-20 bg-gradient-to-t from-background via-background/90 to-transparent pointer-events-none" />
{/* Input Wrapper */}
<div className="relative max-w-3xl mx-auto px-3 sm:px-4 md:px-6 pb-4 sm:pb-6 pt-4 pointer-events-auto transition-all duration-300" style={{ paddingLeft: 'clamp(12px, 4vw, 24px)', paddingRight: 'clamp(12px, 4vw, 24px)' }}>
<div className="relative max-w-3xl mx-auto px-3 sm:px-4 md:px-6 pb-4 sm:pb-6 pt-4 pointer-events-auto">
<ChatInput
onSend={handleSend}
onStop={stop}
@@ -1481,7 +1483,7 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
}}
/>
<div className="text-center mt-2">
<p className="text-[10px] text-muted-foreground/60">OllaHub pode cometer erros. Verifique informações importantes.</p>
<p className="text-xs text-muted-foreground">OllaHub pode cometer erros. Verifique informações importantes.</p>
</div>
</div>
</div>
@@ -1495,13 +1497,13 @@ Ao responder sobre fatos atuais ou notícias, inicie mencionando explicitamente
{!isChatsSidebarCollapsed && (
<>
<div
className="fixed inset-0 bg-black/50 z-40 md:hidden transition-opacity"
className="fixed inset-0 bg-scrim z-40 md:hidden"
onClick={() => {
setIsChatsSidebarCollapsed(true);
chatsSidebarRef.current?.collapse();
}}
/>
<div className="fixed left-0 top-0 bottom-0 w-[280px] min-w-[220px] max-w-[85vw] bg-background border-r z-50 md:hidden shadow-xl animate-in slide-in-from-left duration-300 overflow-y-auto">
<div className="fixed left-0 top-0 bottom-0 w-[280px] min-w-[220px] max-w-[85vw] bg-surface border-r z-50 md:hidden shadow-float animate-in slide-in-from-left duration-200 ease-out overflow-y-auto">
<SidebarList
sessions={sessions}
currentSessionId={currentSessionId}
+171 -195
View File
@@ -4,33 +4,27 @@
@custom-variant dark (&:is(.dark *));
@custom-variant hc (&:is([data-high-contrast=true] *));
/* Família visual de IA local: ver DESIGN.md. Os tokens do shadcn apontam para os papéis da família. */
@theme inline {
--color-background: var(--background);
--color-foreground: var(--foreground);
--font-sans: var(--font-geist-sans);
--font-mono: var(--font-geist-mono);
--color-sidebar-ring: var(--sidebar-ring);
--color-sidebar-border: var(--sidebar-border);
--color-sidebar-accent-foreground: var(--sidebar-accent-foreground);
--color-sidebar-accent: var(--sidebar-accent);
--color-sidebar-primary-foreground: var(--sidebar-primary-foreground);
--color-sidebar-primary: var(--sidebar-primary);
--color-sidebar-foreground: var(--sidebar-foreground);
--color-sidebar: var(--sidebar);
--color-chart-5: var(--chart-5);
--color-chart-4: var(--chart-4);
--color-chart-3: var(--chart-3);
--color-chart-2: var(--chart-2);
--color-chart-1: var(--chart-1);
--color-surface: var(--surface);
--color-elevated: var(--elevated);
--color-hover: var(--hover);
--color-text-2: var(--text-2);
--color-success: var(--success);
--color-warning: var(--warning);
--color-accent: var(--accent);
--color-accent-fg: var(--accent-fg);
--color-accent-soft: var(--accent-soft);
--color-ring: var(--ring);
--color-input: var(--input);
--color-border: var(--border);
--color-destructive: var(--destructive);
--color-accent-foreground: var(--accent-foreground);
--color-accent: var(--accent);
--color-muted-foreground: var(--muted-foreground);
--color-muted: var(--muted);
--color-secondary-foreground: var(--secondary-foreground);
--color-scrim: oklch(0.10 0.01 265 / 0.6);
--color-secondary: var(--secondary);
--color-primary-foreground: var(--primary-foreground);
--color-primary: var(--primary);
@@ -38,160 +32,167 @@
--color-popover: var(--popover);
--color-card-foreground: var(--card-foreground);
--color-card: var(--card);
--color-message-user: var(--message-user);
--color-message-assistant: var(--message-assistant);
--color-message-highlight: var(--message-highlight);
--color-message-selected: var(--message-selected);
--color-message-high-contrast: var(--message-high-contrast);
--radius-sm: calc(var(--radius) - 4px);
--radius-md: calc(var(--radius) - 2px);
--radius-lg: var(--radius);
--radius-xl: calc(var(--radius) + 4px);
--space-1: 8px;
--space-2: 16px;
--space-3: 24px;
--space-4: 32px;
--space-5: 40px;
--space-6: 48px;
--space-7: 56px;
--space-8: 64px;
--font-sans: var(--font-geist-sans), system-ui, sans-serif;
--font-mono: var(--font-geist-mono), ui-monospace, monospace;
/* Escala 1,2 com base 14: 12 · 14 · 17 · 20 · 24 · 29. Os nomes do Tailwind encaixam no passo mais próximo. */
--text-xs: 0.75rem;
--text-xs--line-height: 1.5;
--text-sm: 0.875rem;
--text-sm--line-height: 1.5;
--text-base: 1.0625rem;
--text-base--line-height: 1.5;
--text-lg: 1.0625rem;
--text-lg--line-height: 1.5;
--text-xl: 1.25rem;
--text-xl--line-height: 1.25;
--text-2xl: 1.5rem;
--text-2xl--line-height: 1.25;
--text-3xl: 1.8125rem;
--text-3xl--line-height: 1.25;
/* Raio por hierarquia: 6 chip/badge, 8 botão/input, 12 painel/card/diálogo. */
--radius-xs: 6px;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 12px;
--radius-xl: 12px;
/* Sombra só no que flutua (menu, popover, modal). */
--shadow-float: 0 1px 2px oklch(0.10 0.01 265 / 0.30), 0 8px 24px oklch(0.10 0.01 265 / 0.35);
--ease-out: cubic-bezier(0.16, 1, 0.3, 1);
--default-transition-duration: 150ms;
--default-transition-timing-function: cubic-bezier(0.16, 1, 0.3, 1);
}
:root {
--radius: 0.625rem;
--background: oklch(1 0 0);
--foreground: oklch(0.141 0.005 285.823);
--card: oklch(1 0 0);
--card-foreground: oklch(0.141 0.005 285.823);
--popover: oklch(1 0 0);
--popover-foreground: oklch(0.141 0.005 285.823);
--primary: oklch(0.21 0.006 285.885);
--primary-foreground: oklch(0.985 0 0);
--secondary: oklch(0.967 0.001 286.375);
--secondary-foreground: oklch(0.21 0.006 285.885);
--muted: oklch(0.967 0.001 286.375);
--muted-foreground: oklch(0.552 0.016 285.938);
--accent: oklch(0.967 0.001 286.375);
--accent-foreground: oklch(0.21 0.006 285.885);
--destructive: oklch(0.577 0.245 27.325);
--border: oklch(0.92 0.004 286.32);
--input: oklch(0.92 0.004 286.32);
--ring: oklch(0.705 0.015 286.067);
--chart-1: oklch(0.646 0.222 41.116);
--chart-2: oklch(0.6 0.118 184.704);
--chart-3: oklch(0.398 0.07 227.392);
--chart-4: oklch(0.828 0.189 84.429);
--chart-5: oklch(0.769 0.188 70.08);
--sidebar: oklch(0.985 0 0);
--sidebar-foreground: oklch(0.141 0.005 285.823);
--sidebar-primary: oklch(0.21 0.006 285.885);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.967 0.001 286.375);
--sidebar-accent-foreground: oklch(0.21 0.006 285.885);
--sidebar-border: oklch(0.92 0.004 286.32);
--sidebar-ring: oklch(0.705 0.015 286.067);
--message-user: oklch(0.965 0.02 245);
--message-assistant: oklch(0.972 0.012 300);
--message-highlight: oklch(0.94 0.02 250);
--message-selected: oklch(0.92 0.02 285);
--message-high-contrast: oklch(0.99 0 0);
--bg: oklch(0.99 0.003 265);
--surface: oklch(0.97 0.004 265);
--elevated: oklch(1 0 0);
--hover: oklch(0.94 0.005 265);
--border: oklch(0.90 0.006 265);
--text: oklch(0.20 0.010 265);
--text-2: oklch(0.42 0.010 265);
--text-3: oklch(0.54 0.010 265);
--success: oklch(0.52 0.14 150);
--warning: oklch(0.60 0.13 75);
--danger: oklch(0.55 0.20 25);
--accent: oklch(0.62 0.15 60);
--accent-fg: oklch(0.20 0.04 60);
--accent-soft: color-mix(in oklab, var(--accent) 14%, var(--bg));
--background: var(--bg);
--foreground: var(--text);
--card: var(--surface);
--card-foreground: var(--text);
--popover: var(--elevated);
--popover-foreground: var(--text);
--primary: var(--accent);
--primary-foreground: var(--accent-fg);
--secondary: var(--hover);
--secondary-foreground: var(--text);
--muted: var(--surface);
--muted-foreground: var(--text-3);
--destructive: var(--danger);
--input: var(--border);
--ring: var(--accent);
--message-high-contrast: oklch(1 0 0);
}
.dark {
--background: oklch(0.141 0.005 285.823);
--foreground: oklch(0.985 0 0);
--card: oklch(0.21 0.006 285.885);
--card-foreground: oklch(0.985 0 0);
--popover: oklch(0.21 0.006 285.885);
--popover-foreground: oklch(0.985 0 0);
--primary: oklch(0.92 0.004 286.32);
--primary-foreground: oklch(0.21 0.006 285.885);
--secondary: oklch(0.274 0.006 286.033);
--secondary-foreground: oklch(0.985 0 0);
--muted: oklch(0.274 0.006 286.033);
--muted-foreground: oklch(0.705 0.015 286.067);
--accent: oklch(0.274 0.006 286.033);
--accent-foreground: oklch(0.985 0 0);
--destructive: oklch(0.704 0.191 22.216);
--border: oklch(1 0 0 / 10%);
--input: oklch(1 0 0 / 15%);
--ring: oklch(0.552 0.016 285.938);
--chart-1: oklch(0.488 0.243 264.376);
--chart-2: oklch(0.696 0.17 162.48);
--chart-3: oklch(0.769 0.188 70.08);
--chart-4: oklch(0.627 0.265 303.9);
--chart-5: oklch(0.645 0.246 16.439);
--sidebar: oklch(0.21 0.006 285.885);
--sidebar-foreground: oklch(0.985 0 0);
--sidebar-primary: oklch(0.488 0.243 264.376);
--sidebar-primary-foreground: oklch(0.985 0 0);
--sidebar-accent: oklch(0.274 0.006 286.033);
--sidebar-accent-foreground: oklch(0.985 0 0);
--sidebar-border: oklch(1 0 0 / 10%);
--sidebar-ring: oklch(0.552 0.016 285.938);
--message-user: oklch(0.23 0.02 245);
--message-assistant: oklch(0.24 0.015 300);
--message-highlight: oklch(0.34 0.02 250);
--message-selected: oklch(0.25 0.02 285);
--message-high-contrast: oklch(0.18 0.005 286);
}
:root[data-high-contrast="true"] {
--message-user: oklch(0.9 0 0);
--message-assistant: oklch(0.9 0 0);
--message-highlight: oklch(0.8 0 0);
--message-selected: oklch(0.7 0 0);
--message-high-contrast: oklch(0.99 0 0);
--bg: oklch(0.16 0.008 265);
--surface: oklch(0.20 0.009 265);
--elevated: oklch(0.24 0.010 265);
--hover: oklch(0.28 0.010 265);
--border: oklch(0.32 0.010 265);
--text: oklch(0.96 0.004 265);
--text-2: oklch(0.76 0.008 265);
--text-3: oklch(0.64 0.010 265);
--success: oklch(0.74 0.15 150);
--warning: oklch(0.82 0.15 85);
--danger: oklch(0.68 0.19 25);
--accent: oklch(0.80 0.16 70);
--accent-fg: oklch(0.20 0.04 60);
--message-high-contrast: oklch(0.12 0.008 265);
color-scheme: dark;
}
@layer base {
*,
*::before,
*::after {
@apply border-border outline-ring/50;
@apply border-border;
box-sizing: border-box;
}
html {
overflow-x: hidden;
}
body {
@apply bg-background text-foreground;
@apply bg-background text-foreground font-sans text-sm;
overflow-x: hidden;
width: 100%;
max-width: 100vw;
caret-color: var(--accent);
font-variant-numeric: tabular-nums;
}
h1,
h2,
h3,
h4 {
line-height: 1.25;
text-wrap: balance;
}
::selection {
background: var(--accent-soft);
color: var(--text);
}
/* Foco visível: anel de 2 px no acento com 2 px de offset. */
:focus-visible {
outline: 2px solid var(--ring);
outline-offset: 2px;
}
a {
text-underline-offset: 3px;
}
:disabled {
cursor: not-allowed;
}
}
/* Custom Scrollbar Styles - Padronizado para toda interface */
/* Barras de rolagem no neutro da família */
::-webkit-scrollbar {
width: 8px;
height: 8px;
}
::-webkit-scrollbar-track {
background: hsl(var(--muted));
border-radius: 4px;
background: transparent;
}
::-webkit-scrollbar-thumb {
background: hsl(var(--primary));
border-radius: 4px;
transition: background 0.2s ease;
background: var(--border);
border-radius: 999px;
}
::-webkit-scrollbar-thumb:hover {
background: hsl(var(--primary) / 0.8);
background: var(--text-3);
}
/* Firefox scrollbar */
* {
scrollbar-width: thin;
scrollbar-color: hsl(var(--primary)) hsl(var(--muted));
scrollbar-color: var(--border) transparent;
}
/* Responsive adjustments */
@media (max-width: 640px) {
::-webkit-scrollbar {
width: 6px;
@@ -205,7 +206,7 @@
.sidebar-compact .sidebar-label {
display: none;
}
.sidebar-compact .sidebar-icon {
font-size: 24px;
}
@@ -218,7 +219,7 @@
min-width: 320px;
max-width: 100vw;
}
.message-container {
padding-left: clamp(12px, 4vw, 24px);
padding-right: clamp(12px, 4vw, 24px);
@@ -247,7 +248,7 @@
.sidebar-chat-item-content {
display: flex;
align-items: flex-start;
gap: 0.625rem;
gap: 0.75rem;
width: 100%;
min-width: 0;
}
@@ -274,13 +275,6 @@
display: block;
}
/* Responsive font sizes */
@media (max-width: 640px) {
.responsive-text {
font-size: clamp(14px, 4vw, 16px);
}
}
/* Model name truncation - ensure long model names don't break layout */
.model-name {
white-space: nowrap;
@@ -294,7 +288,6 @@
@media (max-width: 600px) {
.model-name {
max-width: 54vw;
font-size: 15px;
}
}
@@ -320,76 +313,29 @@
display: block;
}
/* Scrollbar específico para lista de chats - mais fino e discreto */
.sidebar-chat-list::-webkit-scrollbar {
width: 6px;
}
.sidebar-chat-list::-webkit-scrollbar-track {
background: transparent;
border-radius: 3px;
}
.sidebar-chat-list::-webkit-scrollbar-thumb {
background: hsl(var(--muted-foreground) / 0.3);
border-radius: 3px;
transition: background 0.2s ease;
}
.sidebar-chat-list::-webkit-scrollbar-thumb:hover {
background: hsl(var(--primary) / 0.6);
}
/* Firefox scrollbar para lista de chats */
.sidebar-chat-list {
scrollbar-width: thin;
scrollbar-color: hsl(var(--muted-foreground) / 0.3) transparent;
}
/* Minimalista scrollbar para sources */
.sources-scrollbar {
scrollbar-width: thin;
scrollbar-color: hsl(var(--muted-foreground) / 0.2) transparent;
}
/* Scrollbar horizontal mínima para sources, some quando não há hover */
.sources-scrollbar::-webkit-scrollbar {
height: 4px;
}
.sources-scrollbar::-webkit-scrollbar-track {
background: transparent;
border-radius: 2px;
}
.sources-scrollbar::-webkit-scrollbar-thumb {
background: hsl(var(--muted-foreground) / 0.2);
border-radius: 2px;
transition: background 0.2s ease;
}
.sources-scrollbar::-webkit-scrollbar-thumb:hover {
background: hsl(var(--muted-foreground) / 0.35);
}
/* Ocultar scrollbar quando não há overflow */
.sources-scrollbar:not(:hover)::-webkit-scrollbar-thumb {
background: transparent;
}
/* Reasoning Chain animations */
@keyframes reasoning-fade-in {
from {
opacity: 0;
transform: translateY(4px);
from {
opacity: 0;
transform: translateY(4px);
}
to {
opacity: 1;
transform: translateY(0);
to {
opacity: 1;
transform: translateY(0);
}
}
.reasoning-step {
animation: reasoning-fade-in 0.3s ease-out forwards;
animation: reasoning-fade-in 200ms var(--ease-out) forwards;
opacity: 0;
}
@@ -402,4 +348,34 @@
.reasoning-step:nth-child(6) { animation-delay: 500ms; }
.reasoning-step:nth-child(7) { animation-delay: 600ms; }
.reasoning-step:nth-child(8) { animation-delay: 700ms; }
.reasoning-step:nth-child(n+9) { animation-delay: 800ms; }
.reasoning-step:nth-child(n+9) { animation-delay: 800ms; }
/* Movimento reduzido: sem deslocamento; indicadores de carregamento viram pulso de opacidade. */
@keyframes reduced-pulse {
50% {
opacity: 0.45;
}
}
@media (prefers-reduced-motion: reduce) {
.reasoning-step {
animation: none;
opacity: 1;
}
.animate-spin,
.animate-bounce,
.animate-ping {
animation: reduced-pulse 1.6s ease-in-out infinite;
}
.animate-in,
.animate-out {
--tw-enter-translate-x: 0;
--tw-enter-translate-y: 0;
--tw-enter-scale: 1;
--tw-exit-translate-x: 0;
--tw-exit-translate-y: 0;
--tw-exit-scale: 1;
}
}
+4 -13
View File
@@ -1,19 +1,10 @@
import type { Metadata } from "next";
import { Geist, Geist_Mono } from "next/font/google";
import { GeistSans } from "geist/font/sans";
import { GeistMono } from "geist/font/mono";
import "./globals.css";
import { ThemeProvider } from "@/components/theme-provider";
import { AppUpdaterProvider } from "@/components/app-updater-provider";
const geistSans = Geist({
variable: "--font-geist-sans",
subsets: ["latin"],
});
const geistMono = Geist_Mono({
variable: "--font-geist-mono",
subsets: ["latin"],
});
export const metadata: Metadata = {
title: "OllaHub",
description: "Interface moderna para Ollama",
@@ -27,11 +18,11 @@ export default function RootLayout({
return (
<html lang="pt-BR" suppressHydrationWarning>
<body
className={`${geistSans.variable} ${geistMono.variable} antialiased`}
className={`${GeistSans.variable} ${GeistMono.variable} antialiased`}
>
<ThemeProvider
attribute="class"
defaultTheme="system"
defaultTheme="dark"
enableSystem
disableTransitionOnChange
>
+6 -6
View File
@@ -45,15 +45,15 @@ export default function Home() {
if (status === 'checking') {
return (
<div className="flex h-screen w-full items-center justify-center bg-background">
<Loader2 className="h-8 w-8 animate-spin text-primary" />
<span className="ml-2 text-muted-foreground">Verificando sistema...</span>
<div className="flex h-screen w-full items-center justify-center gap-2 bg-background">
<Loader2 className="h-5 w-5 animate-spin text-primary" />
<span className="text-muted-foreground">Verificando sistema...</span>
</div>
);
}
return (
<main className="flex min-h-screen flex-col items-center justify-center p-4 bg-background text-foreground transition-colors duration-300">
<main className="flex min-h-screen flex-col items-center justify-center p-4 bg-background text-foreground">
{/* Notificação de boas-vindas */}
<WelcomeNotification />
@@ -64,9 +64,9 @@ export default function Home() {
{/* Layout for Stopped State */}
{status === 'installed_stopped' && (
<div className="flex flex-col items-center gap-8 animate-in fade-in slide-in-from-bottom-4 duration-500">
<div className="flex flex-col items-center gap-8 animate-in fade-in duration-200 ease-out">
<div className="text-center space-y-2">
<h1 className="text-3xl font-bold tracking-tighter">OllaHub</h1>
<h1 className="text-3xl font-semibold tracking-tight">OllaHub</h1>
<p className="text-muted-foreground">Detectamos o Ollama, mas ele não está rodando.</p>
</div>
<StoppedCard onCheckAgain={check} />
+19 -19
View File
@@ -232,11 +232,11 @@ export default function SettingsPage() {
<TitleBar />
<div className="flex-1 overflow-y-auto">
<div className="container mx-auto py-4 sm:py-6 md:py-8 px-3 sm:px-4 md:px-6 max-w-4xl w-full overflow-x-hidden">
<div className="mb-4 sm:mb-6">
<div className="mb-6">
<div className="flex items-start justify-between gap-3">
<div className="flex-1 min-w-0">
<h1 className="text-2xl sm:text-3xl font-bold truncate">Configurações</h1>
<p className="text-muted-foreground mt-1 sm:mt-2 text-sm sm:text-base">
<h1 className="text-2xl font-semibold tracking-tight truncate">Configurações</h1>
<p className="text-muted-foreground mt-1 text-sm">
Gerencie as preferências do OllaHub
</p>
</div>
@@ -244,7 +244,7 @@ export default function SettingsPage() {
variant="ghost"
size="icon"
onClick={() => router.push('/chat')}
className="rounded-lg shrink-0"
className="shrink-0 text-muted-foreground hover:text-foreground"
title="Fechar configurações"
>
<X className="w-5 h-5" />
@@ -252,24 +252,24 @@ export default function SettingsPage() {
</div>
</div>
<Tabs defaultValue="overview" className="space-y-4 sm:space-y-6">
<TabsList className="grid w-full grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-1 sm:gap-2 h-auto">
<TabsTrigger value="overview" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<Tabs defaultValue="overview" className="space-y-6">
<TabsList className="grid w-full grid-cols-2 sm:grid-cols-3 md:grid-cols-6 gap-1 h-auto">
<TabsTrigger value="overview" className="px-3 py-2 truncate">
Visão Geral
</TabsTrigger>
<TabsTrigger value="general" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<TabsTrigger value="general" className="px-3 py-2 truncate">
General
</TabsTrigger>
<TabsTrigger value="web" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<TabsTrigger value="web" className="px-3 py-2 truncate">
Web Search
</TabsTrigger>
<TabsTrigger value="sources" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<TabsTrigger value="sources" className="px-3 py-2 truncate">
Sources
</TabsTrigger>
<TabsTrigger value="tasks" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<TabsTrigger value="tasks" className="px-3 py-2 truncate">
Tasks
</TabsTrigger>
<TabsTrigger value="system" className="text-xs sm:text-sm px-2 sm:px-3 py-1.5 sm:py-2 truncate">
<TabsTrigger value="system" className="px-3 py-2 truncate">
System
</TabsTrigger>
</TabsList>
@@ -316,11 +316,11 @@ export default function SettingsPage() {
className="shrink-0"
>
{isCheckingConnection ? (
<Loader2 className="w-4 h-4 animate-spin" />
<Loader2 className="w-4 h-4 animate-spin text-primary" />
) : connectionStatus === 'success' ? (
<CheckCircle2 className="w-4 h-4 text-green-500" />
<CheckCircle2 className="w-4 h-4 text-success" />
) : connectionStatus === 'error' ? (
<XCircle className="w-4 h-4 text-red-500" />
<XCircle className="w-4 h-4 text-destructive" />
) : (
'Verificar'
)}
@@ -561,7 +561,7 @@ export default function SettingsPage() {
{settings.webSearch.engineOrder.map((engine, index) => (
<div
key={engine}
className="flex items-center justify-between p-2 rounded-md hover:bg-muted/50 transition-colors"
className="flex items-center justify-between p-2 rounded-md hover:bg-hover transition-colors duration-150"
>
<div className="flex items-center gap-2">
<Badge variant="outline" className="font-mono text-xs">
@@ -819,7 +819,7 @@ export default function SettingsPage() {
};
return (
<Card key={category.id} className={category.enabled ? 'border-primary' : ''}>
<Card key={category.id} className={category.enabled ? 'border-foreground/30' : ''}>
<CardContent className="pt-4 sm:pt-6">
<div className="flex flex-col sm:flex-row items-start justify-between gap-3 sm:gap-0">
<div className="flex items-start gap-2 sm:gap-3 flex-1 min-w-0 w-full">
@@ -1044,7 +1044,7 @@ export default function SettingsPage() {
</CardHeader>
<CardContent>
<div className="relative">
<div className="bg-black text-green-400 font-mono text-xs p-4 rounded-lg h-[400px] overflow-y-auto">
<div className="bg-background border text-foreground font-mono text-xs p-4 rounded-md h-[400px] overflow-y-auto">
{isLoadingLogs ? (
<div className="flex items-center gap-2 text-muted-foreground">
<Loader2 className="w-4 h-4 animate-spin" />
@@ -1138,7 +1138,7 @@ export default function SettingsPage() {
{updater.updateAvailable && (
<div className="flex items-center justify-between text-sm">
<span className="text-muted-foreground">Nova Versão Disponível</span>
<span className="font-mono font-medium text-primary">
<span className="font-mono font-semibold text-foreground">
{updater.updateInfo?.version}
</span>
</div>
+4 -4
View File
@@ -19,22 +19,22 @@ export default function SetupPage() {
return (
<main className="flex min-h-screen flex-col items-center justify-center p-4 bg-background text-foreground">
<div className="w-full max-w-2xl space-y-8 animate-in fade-in duration-700">
<div className="w-full max-w-2xl space-y-8 animate-in fade-in duration-200 ease-out">
<div className="text-center space-y-2">
<h1 className="text-3xl font-bold tracking-tighter">Configuração Inicial</h1>
<h1 className="text-3xl font-semibold tracking-tight">Configuração Inicial</h1>
<p className="text-muted-foreground">Vamos preparar o ambiente ideal para você.</p>
</div>
<HardwareScan specs={specs} loading={loading} />
{!loading && specs && gpus.length > 0 && (
<div className="animate-in slide-in-from-bottom-8 duration-700 delay-200 fill-mode-backwards">
<div className="animate-in fade-in duration-200 ease-out">
<GpuSelector gpus={gpus} />
</div>
)}
{!loading && specs && (
<div className="animate-in slide-in-from-bottom-8 duration-700 delay-300 fill-mode-backwards">
<div className="animate-in fade-in duration-200 ease-out">
<ModelSelector
recommendation={getRecommendation(specs)}
onComplete={handleComplete}
+11 -9
View File
@@ -107,11 +107,11 @@ export default function TasksPage() {
<TitleBar />
<div className="flex-1 overflow-y-auto">
<div className="container mx-auto p-4 sm:p-6 max-w-6xl w-full overflow-x-hidden">
<div className="mb-4 sm:mb-6">
<div className="mb-6">
<div className="flex items-start justify-between gap-3">
<div className="flex-1 min-w-0">
<h1 className="text-2xl sm:text-3xl font-bold truncate">Tarefas Agendadas</h1>
<p className="text-muted-foreground mt-1 text-sm sm:text-base">
<h1 className="text-2xl font-semibold tracking-tight truncate">Tarefas Agendadas</h1>
<p className="text-muted-foreground mt-1 text-sm">
Gerencie tarefas que executam automaticamente em segundo plano
</p>
</div>
@@ -119,7 +119,7 @@ export default function TasksPage() {
variant="ghost"
size="icon"
onClick={() => router.push('/chat')}
className="rounded-lg shrink-0"
className="shrink-0 text-muted-foreground hover:text-foreground"
title="Voltar para o chat"
>
<X className="w-5 h-5" />
@@ -140,7 +140,7 @@ export default function TasksPage() {
<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
<DialogTrigger asChild>
<Button size="lg" className="w-full max-w-md">
<Plus className="w-5 h-5 mr-2" />
<Plus className="w-4 h-4" />
Criar Primeira Task
</Button>
</DialogTrigger>
@@ -167,7 +167,7 @@ export default function TasksPage() {
<Dialog open={isDialogOpen} onOpenChange={setIsDialogOpen}>
<DialogTrigger asChild>
<Button size="lg" className="w-full">
<Plus className="w-5 h-5 mr-2" />
<Plus className="w-4 h-4" />
Nova Task
</Button>
</DialogTrigger>
@@ -196,13 +196,13 @@ export default function TasksPage() {
<CardTitle className="flex items-center gap-2">
{task.label}
{task.enabled ? (
<Badge variant="default" className="bg-green-500/10 text-green-500 border-green-500/20">
<CheckCircle2 className="w-3 h-3 mr-1" />
<Badge variant="outline" className="bg-success/10 text-success border-success/30">
<CheckCircle2 className="w-3 h-3" />
Ativa
</Badge>
) : (
<Badge variant="secondary">
<XCircle className="w-3 h-3 mr-1" />
<XCircle className="w-3 h-3" />
Pausada
</Badge>
)}
@@ -232,6 +232,8 @@ export default function TasksPage() {
variant="ghost"
size="icon"
onClick={() => deleteTask(task.id)}
className="text-muted-foreground hover:bg-destructive/10 hover:text-destructive"
aria-label="Excluir task"
>
<Trash2 className="w-4 h-4" />
</Button>