|
81 | 81 |
|
82 | 82 | <div class="mx-auto w-full max-w-4xl"> |
83 | 83 | <!-- Info bar --> |
84 | | - <div |
85 | | - class="mb-4 flex items-center gap-4 rounded-xl border border-gray-200 bg-white p-4 shadow-sm" |
86 | | - > |
| 84 | + <div class="border-border bg-card mb-4 flex items-center gap-4 rounded-xl border p-4 shadow-sm"> |
87 | 85 | <div> |
88 | | - <div class="text-xs font-medium uppercase text-gray-400">Messages</div> |
89 | | - <div class="font-mono text-lg font-semibold text-gray-900">{messages.length}</div> |
| 86 | + <div class="text-muted-foreground text-xs font-medium uppercase">Messages</div> |
| 87 | + <div class="text-foreground font-mono text-lg font-semibold">{messages.length}</div> |
90 | 88 | </div> |
91 | 89 | <div> |
92 | | - <div class="text-xs font-medium uppercase text-gray-400">Oldest Loaded</div> |
93 | | - <div class="font-mono text-lg font-semibold text-gray-900">#{oldestLoadedId}</div> |
| 90 | + <div class="text-muted-foreground text-xs font-medium uppercase">Oldest Loaded</div> |
| 91 | + <div class="text-foreground font-mono text-lg font-semibold">#{oldestLoadedId}</div> |
94 | 92 | </div> |
95 | 93 | <div> |
96 | | - <div class="text-xs font-medium uppercase text-gray-400">History Loads</div> |
97 | | - <div class="font-mono text-lg font-semibold text-gray-900">{loadCount}</div> |
| 94 | + <div class="text-muted-foreground text-xs font-medium uppercase">History Loads</div> |
| 95 | + <div class="text-foreground font-mono text-lg font-semibold">{loadCount}</div> |
98 | 96 | </div> |
99 | 97 | <div class="ml-auto"> |
100 | 98 | {#if isLoadingHistory} |
101 | | - <span class="flex items-center gap-1.5 text-sm font-medium text-indigo-600"> |
102 | | - <span class="inline-block h-2 w-2 animate-pulse rounded-full bg-indigo-500" |
| 99 | + <span |
| 100 | + class="text-brand-600 dark:text-brand-400 flex items-center gap-1.5 text-sm font-medium" |
| 101 | + > |
| 102 | + <span class="bg-brand-500 inline-block h-2 w-2 animate-pulse rounded-full" |
103 | 103 | ></span> |
104 | 104 | Loading history... |
105 | 105 | </span> |
106 | 106 | {:else if !hasMoreHistory} |
107 | | - <span class="text-sm text-gray-400">All history loaded</span> |
| 107 | + <span class="text-muted-foreground text-sm">All history loaded</span> |
108 | 108 | {:else} |
109 | | - <span class="text-sm text-gray-500">Scroll up to load more</span> |
| 109 | + <span class="text-muted-foreground text-sm">Scroll up to load more</span> |
110 | 110 | {/if} |
111 | 111 | </div> |
112 | 112 | </div> |
113 | 113 |
|
114 | 114 | <!-- Virtualization Stats --> |
115 | 115 | {#if debugInfo} |
116 | | - <div class="mb-4 rounded-xl border border-gray-200 bg-white p-4 shadow-sm"> |
117 | | - <h3 class="mb-3 text-xs font-semibold uppercase tracking-wide text-gray-400"> |
| 116 | + <div class="border-border bg-card mb-4 rounded-xl border p-4 shadow-sm"> |
| 117 | + <h3 class="text-muted-foreground mb-3 text-xs font-semibold tracking-wide uppercase"> |
118 | 118 | Virtualization Stats |
119 | 119 | </h3> |
120 | 120 | <div class="grid grid-cols-3 gap-3 sm:grid-cols-6"> |
121 | | - <div class="rounded-lg bg-gray-50 p-2.5"> |
122 | | - <div class="text-xs text-gray-400">Total</div> |
123 | | - <div class="font-mono text-lg font-semibold text-gray-900"> |
| 121 | + <div class="bg-muted/50 rounded-lg p-2.5"> |
| 122 | + <div class="text-muted-foreground text-xs">Total</div> |
| 123 | + <div class="text-foreground font-mono text-lg font-semibold"> |
124 | 124 | {debugInfo.totalMessages} |
125 | 125 | </div> |
126 | 126 | </div> |
127 | | - <div class="rounded-lg bg-indigo-50 p-2.5"> |
128 | | - <div class="text-xs text-indigo-400">In DOM</div> |
129 | | - <div class="font-mono text-lg font-semibold text-indigo-700"> |
| 127 | + <div class="bg-brand-500/10 rounded-lg p-2.5"> |
| 128 | + <div class="text-brand-500 text-xs">In DOM</div> |
| 129 | + <div class="text-brand-600 dark:text-brand-400 font-mono text-lg font-semibold"> |
130 | 130 | {debugInfo.renderedCount} |
131 | 131 | </div> |
132 | 132 | </div> |
133 | | - <div class="rounded-lg bg-gray-50 p-2.5"> |
134 | | - <div class="text-xs text-gray-400">Measured</div> |
135 | | - <div class="font-mono text-lg font-semibold text-gray-900"> |
| 133 | + <div class="bg-muted/50 rounded-lg p-2.5"> |
| 134 | + <div class="text-muted-foreground text-xs">Measured</div> |
| 135 | + <div class="text-foreground font-mono text-lg font-semibold"> |
136 | 136 | {debugInfo.measuredCount} |
137 | 137 | </div> |
138 | 138 | </div> |
139 | | - <div class="rounded-lg bg-gray-50 p-2.5"> |
140 | | - <div class="text-xs text-gray-400">Range</div> |
141 | | - <div class="font-mono text-sm font-semibold text-gray-900"> |
| 139 | + <div class="bg-muted/50 rounded-lg p-2.5"> |
| 140 | + <div class="text-muted-foreground text-xs">Range</div> |
| 141 | + <div class="text-foreground font-mono text-sm font-semibold"> |
142 | 142 | {debugInfo.startIndex}–{debugInfo.endIndex} |
143 | 143 | </div> |
144 | 144 | </div> |
145 | | - <div class="rounded-lg bg-gray-50 p-2.5"> |
146 | | - <div class="text-xs text-gray-400">Height</div> |
147 | | - <div class="font-mono text-sm font-semibold text-gray-900"> |
| 145 | + <div class="bg-muted/50 rounded-lg p-2.5"> |
| 146 | + <div class="text-muted-foreground text-xs">Height</div> |
| 147 | + <div class="text-foreground font-mono text-sm font-semibold"> |
148 | 148 | {Math.round(debugInfo.totalHeight)}px |
149 | 149 | </div> |
150 | 150 | </div> |
151 | | - <div class="rounded-lg bg-gray-50 p-2.5"> |
152 | | - <div class="text-xs text-gray-400">Scroll</div> |
153 | | - <div class="font-mono text-sm font-semibold text-gray-900"> |
| 151 | + <div class="bg-muted/50 rounded-lg p-2.5"> |
| 152 | + <div class="text-muted-foreground text-xs">Scroll</div> |
| 153 | + <div class="text-foreground font-mono text-sm font-semibold"> |
154 | 154 | {Math.round(debugInfo.scrollTop)}px |
155 | 155 | </div> |
156 | 156 | </div> |
|
162 | 162 | <div class="mb-4 flex items-center gap-3"> |
163 | 163 | <button |
164 | 164 | onclick={() => chat?.scrollToBottom({ smooth: true })} |
165 | | - class="rounded-lg bg-indigo-600 px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors hover:bg-indigo-700" |
| 165 | + class="bg-brand-600 hover:bg-brand-700 rounded-lg px-4 py-2 text-sm font-medium text-white shadow-sm transition-colors" |
166 | 166 | > |
167 | 167 | Scroll to bottom |
168 | 168 | </button> |
169 | 169 | <button |
170 | 170 | onclick={loadOlderMessages} |
171 | 171 | disabled={isLoadingHistory || !hasMoreHistory} |
172 | | - class="rounded-lg border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm transition-colors hover:bg-gray-50 disabled:opacity-50" |
| 172 | + class="border-border bg-card text-foreground hover:bg-muted rounded-lg border px-4 py-2 text-sm font-medium shadow-sm transition-colors disabled:opacity-50" |
173 | 173 | > |
174 | 174 | Load history manually |
175 | 175 | </button> |
176 | 176 | </div> |
177 | 177 |
|
178 | 178 | <!-- Chat viewport --> |
179 | | - <div class="overflow-hidden rounded-xl border border-gray-200 bg-white shadow-sm"> |
| 179 | + <div class="border-border bg-card overflow-hidden rounded-xl border shadow-sm"> |
180 | 180 | <SvelteVirtualChat |
181 | 181 | bind:this={chat} |
182 | 182 | {messages} |
|
192 | 192 | > |
193 | 193 | {#snippet renderMessage(message: Message)} |
194 | 194 | <div |
195 | | - class="border-b border-gray-100 px-5 py-3 {message.role === 'user' |
196 | | - ? 'bg-indigo-50/50' |
197 | | - : 'bg-white'}" |
| 195 | + class="border-border border-b px-5 py-3 {message.role === 'user' |
| 196 | + ? 'bg-brand-500/5' |
| 197 | + : ''}" |
198 | 198 | > |
199 | 199 | <div class="mb-1 flex items-center gap-2"> |
200 | 200 | <span |
201 | 201 | class="text-xs font-semibold {message.role === 'user' |
202 | | - ? 'text-indigo-600' |
203 | | - : 'text-gray-500'}" |
| 202 | + ? 'text-brand-600 dark:text-brand-400' |
| 203 | + : 'text-muted-foreground'}" |
204 | 204 | > |
205 | 205 | {message.role === 'user' ? 'You' : 'Assistant'} |
206 | 206 | </span> |
207 | | - <span class="text-xs text-gray-400"> |
| 207 | + <span class="text-muted-foreground text-xs"> |
208 | 208 | {formatTime(message.timestamp)} |
209 | 209 | </span> |
210 | | - <span class="font-mono text-xs text-gray-300"> |
| 210 | + <span class="text-muted-foreground/50 font-mono text-xs"> |
211 | 211 | #{message.id} |
212 | 212 | </span> |
213 | 213 | </div> |
214 | | - <div class="text-sm leading-relaxed text-gray-800"> |
| 214 | + <div class="text-foreground text-sm leading-relaxed"> |
215 | 215 | {message.content} |
216 | 216 | </div> |
217 | 217 | </div> |
|
0 commit comments