@@ -196,17 +196,17 @@ count.update(n => n + 1)
196196 <div class =" flex items-center justify-between gap-4" >
197197 <div class =" flex items-center gap-6" >
198198 <div >
199- <div class =" text-xs font-medium uppercase text-gray-400" >Progress</div >
199+ <div class =" text-xs font-medium text-gray-400 uppercase " >Progress</div >
200200 <div class ="font-mono text-lg font-semibold text-gray-900" >{progress }%</div >
201201 </div >
202202 <div >
203- <div class =" text-xs font-medium uppercase text-gray-400" >Tokens</div >
203+ <div class =" text-xs font-medium text-gray-400 uppercase " >Tokens</div >
204204 <div class =" font-mono text-lg font-semibold text-gray-900" >
205205 {tokenCount } / {totalTokens }
206206 </div >
207207 </div >
208208 <div >
209- <div class =" text-xs font-medium uppercase text-gray-400" >Speed</div >
209+ <div class =" text-xs font-medium text-gray-400 uppercase " >Speed</div >
210210 <div class =" font-mono text-lg font-semibold text-gray-900" >
211211 {tokensPerSecond } tok/s
212212 </div >
@@ -269,10 +269,71 @@ count.update(n => n + 1)
269269 </div >
270270 </div >
271271
272+ <!-- How it works -->
273+ <div
274+ class =" mb-4 rounded-xl border border-indigo-200/50 bg-gradient-to-r from-indigo-50/50 to-indigo-100/30 p-5"
275+ >
276+ <h3 class =" mb-2 text-sm font-semibold text-gray-900" >How LLM Streaming Works</h3 >
277+ <ul class =" space-y-1.5 text-sm text-gray-600" >
278+ <li class =" flex items-start gap-2" >
279+ <span class =" mt-0.5 shrink-0 text-indigo-500" >⚡</span >
280+ <span >
281+ LLMs stream tokens via SSE. As each token arrives, the message content grows and
282+ ResizeObserver detects the height change automatically.
283+ </span >
284+ </li >
285+ <li class =" flex items-start gap-2" >
286+ <span class =" mt-0.5 shrink-0 text-indigo-500" >⚡</span >
287+ <span >
288+ Height corrections are batched per animation frame — not per token. The viewport
289+ stays pinned to bottom with zero jitter.
290+ </span >
291+ </li >
292+ <li class =" flex items-start gap-2" >
293+ <span class =" mt-0.5 shrink-0 text-indigo-500" >⚡</span >
294+ <span >
295+ Markdown rendering powered by
296+ <a
297+ href =" https://markdown.svelte.page"
298+ target =" _blank"
299+ rel =" noopener noreferrer"
300+ class =" text-indigo-600 underline hover:text-indigo-500"
301+ >
302+ @humanspeak/svelte-markdown
303+ </a >
304+ with streaming mode (~1.6ms avg per update). Code blocks, tables, lists — all rendered
305+ live without scroll disruption.
306+ </span >
307+ </li >
308+ <li class =" flex items-start gap-2" >
309+ <span class =" mt-0.5 shrink-0 text-amber-500" >💡</span >
310+ <span >
311+ Track token costs across providers with
312+ <a
313+ href =" https://modelpricing.ai"
314+ target =" _blank"
315+ rel =" noopener noreferrer"
316+ class =" text-indigo-600 underline hover:text-indigo-500"
317+ >
318+ ModelPricing.ai
319+ </a >. Need a general-purpose virtual list? Try
320+ <a
321+ href =" https://virtuallist.svelte.page"
322+ target =" _blank"
323+ rel =" noopener noreferrer"
324+ class =" text-indigo-600 underline hover:text-indigo-500"
325+ >
326+ @humanspeak/svelte-virtual-list
327+ </a >.
328+ </span >
329+ </li >
330+ </ul >
331+ </div >
332+
272333 <!-- Virtualization Stats -->
273334 {#if debugInfo }
274335 <div class =" mb-4 rounded-xl border border-gray-200 bg-white p-4 shadow-sm" >
275- <h3 class =" mb-3 text-xs font-semibold uppercase tracking-wide text-gray-400" >
336+ <h3 class =" mb-3 text-xs font-semibold tracking-wide text-gray-400 uppercase " >
276337 Virtualization Stats
277338 </h3 >
278339 <div class =" grid grid-cols-3 gap-3 sm:grid-cols-6" >
0 commit comments