Commit 163affe
ux(wasm): show "Thinking..." indicator during prompt prefill (#26)
First-token latency can be several seconds on a 0.8B model in WASM
(processing the full prompt through 28 layers in single-threaded
WASM). Without feedback, users see a blank assistant bubble and
think the demo is broken.
Add a spinner + "Thinking..." message inside the assistant bubble
that appears immediately after sending. Replaced by the first
streamed token. Also show "Processing prompt..." in the stats bar.
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent d016c78 commit 163affe
1 file changed
Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
68 | 68 | | |
69 | 69 | | |
70 | 70 | | |
| 71 | + | |
71 | 72 | | |
72 | 73 | | |
73 | 74 | | |
| |||
412 | 413 | | |
413 | 414 | | |
414 | 415 | | |
| 416 | + | |
| 417 | + | |
415 | 418 | | |
416 | 419 | | |
417 | 420 | | |
| 421 | + | |
| 422 | + | |
418 | 423 | | |
419 | 424 | | |
420 | 425 | | |
| |||
0 commit comments