Patterns for agentic interfaces, built from hyuskui components. Each is a GPUI view you copy into your project.
Chat threads, streaming reasoning, tool calls, plans, approvals and terminal output: the pieces an agent's interface is made of. There is no crate to depend on. A pattern is a single Rust file that composes components such as Trace, Message and Code Block, so you own every line and can wire it to your agent's events.
Patterns
Chain of ThoughtDisplays the steps an agent took to reach an answer. The steps stay open while the agent researches, then fold behind a one-line summary when the answer starts.ChatThe thread. Message Scroller keeps your place while the reply streams.CheckpointMarks a point in the conversation you can return to.ConfirmationAsks the user to approve a tool call before the agent runs it. The request waits as a card with Deny and Approve, then becomes a trace row with the outcome.ContextHow much of the context window the conversation has used. A pill names the share; resting on it opens a card with the used and total tokens, a bar, and the split by kind.File TreeA project's files as a folder tree. Folders fold open and closed, and clicking a file selects it.Inline CitationSources cited right where a claim is made. Each pill names the source's site; resting on it shows the page's title and what it covers.MessageOne turn. The person's message, and the agent's reply with its actions.Model SelectorTwo menus in the prompt composer. One picks the model the agent runs, the other picks how hard it thinks.PlanDisplays the steps an agent plans to take. The plan stays open and ticks its steps off as the agent works through them, with a count of what's done.Prompt InputA message field with attachments and a send button.QueueDisplays the agent's todo list, split into what is left and what is done.ReasoningDisplays a model's reasoning. The row streams the thinking open while the model thinks, then folds it away behind how long it took.SourcesThe pages the agent read to write a reply. Once the answer is in, a trace row counts the sources and opens on a link to each one.Stack TraceA failed command and where it broke. The error opens on its message and your code's frames; the framework's frames fold away under one row.SubagentDisplays the work of a subagent the agent hands a task to. The subagent's commands stream in under it, followed by the report it sends back.SuggestionA short prompt you can send to the agent in one click.TaskDisplays a task an agent works through. Each task opens on its steps while it runs and folds away when it finishes.TerminalDisplays a command the agent runs, with its output as it streams. Each command is a trace row that opens on its log while it runs and closes when it exits.Test ResultsA test run the agent started, grouped by file. A failing run opens down to the failed test and its error; passing files stay folded.ToolDisplays the tool calls an agent makes. Each call is a trace row that runs, then opens on its output; a failed call turns destructive and shows its error.
Installation
Add the components
Each pattern lists the components it uses. Most build on Trace and Code Block:
$ cargo hyuskui add trace code-blockCopy a pattern
Open a pattern, copy its code into your project, for example
src/ai/tool.rs, and render the view like any other. The demos play back scripted data on a timer; replace that with your agent's stream and callcx.notify()as events arrive.// src/main.rs mod ai { pub mod tool; }