Conversation core
Model & context
Use when users choose between models and a long conversation can run out of room without them noticing.
Model picker with capability badges and a live context-window meter.
Part of Conversation core. The first thing you build: a place to ask and a place to read the answer. Every AI product ships these surfaces, so users compare yours with the best they have used. The work here is in the details: what the composer does mid-answer, how a reply arrives, what you can do with it afterwards.
Do
- Show what each model can do and how much it holds right on the picker row.
- Break the meter down by what is using the space: system, files, chat.
- Say what will happen when the window is exceeded, in plain words, before it happens.
Don't
- Don't show a raw token count without the limit beside it.
- Don't style the over-limit state as an error. Nothing is broken, the user has a choice to make.
- Don't show the meter to people who cannot act on it. Leave it out of consumer chat.
States
- Within the window: The chosen model with its capability badges and window size, and a meter in the accent colour with used, limit and percentage.
- Picker open: A list of models, each with a short note, capability badges and window size. The current one is highlighted.
- Over the window: With a smaller model the meter fills and turns to the warning colour, and a line explains that older turns will be compacted.
Usage
import { ModelContextPattern } from "./halaska-kit";
<ModelContextPattern />
Built from
Conversation, Separator, Stack, Typography
Related patterns
Halaska UI · Components · Patterns · Screens · Install