Vibe Coded Today

The daily paper for people who build by talking to software.

Front page

Ship real software by talking to it.

Prompts that fill themselves in with your project, guides that take a subject end to end, and fixes for the moment it breaks. Every page dated, checked, and free.

Today’s clipping · No. 56

Stream the response

Same wait, completely different feel.

stream-response.txt
My model call waits for the whole response before showing anything,
and it feels broken: <paste the endpoint and the client code>

Add streaming end to end:
- Server: stream from the provider and forward to the client without
  buffering the whole thing.
- Client: render tokens as they arrive, scrolling only if the user is
  already at the bottom.
- A stop button that actually aborts the upstream request, so I'm not
  billed for output nobody sees.
- Handle the stream failing halfway: keep what arrived, show a clear
  error, offer retry.
- Handle the user navigating away mid-stream.

Tell me what changes for error handling, since headers are sent before
the model has finished.

The stop button must abort upstream, not just stop rendering. Otherwise you pay for every token of a response the user rejected two seconds in.

A different prompt every day. More from the Building with models desk

The one prompt to start every session

Paste this before you ask for any code. It stops the model inventing a stack you didn't ask for.

context-primer.txt
You are helping me build: <one sentence, what the thing does>

Stack I am already using: <languages, frameworks, hosting>
Files that already exist: <paste `ls` output or a short list>
What works right now: <the last thing you got working>
What I want next: <one change, not five>

Rules:
- Change the fewest files possible. Show me full file contents for anything you edit.
- Do not add new dependencies unless you say why and I agree first.
- If my request is ambiguous, ask one question before writing code.
- End with the exact command I run to see it working.

Why it works: most bad AI output comes from missing context, not a weak model. Nine lines of setup beats three rounds of "no, not like that".