starplast.chat
An assistant pane that can see the map.
The same shape as the AI console in spaCR: shell out to whichever vendor coding-agent CLI the user
already has logged in (claude, codex, gemini) rather than asking for an API key. Those CLIs
authenticate against a chat subscription, so there is no key to store, leak, or forget to revoke, and
the one in this repository stays a viewer rather than becoming a thing that bills people.
What makes it worth having here rather than in a browser tab is context. The panel builds a briefing from the actual state -- the selected gene and its evidence, the coloring, how many genes are filtered out, and the standing caveats about what this map does and does not recover -- so a question about "this gene" has a referent. An assistant that cannot see the screen answers about Toxoplasma in general, which the user can already get anywhere.
The caveats are not decoration. The held-out search says localization is recovered worse than study effort, so an assistant left to free-associate about a gene's neighbours would produce exactly the overclaim the rest of the project is built to prevent.
A vendor CLI that can answer a prompt non-interactively.
Providers whose CLI is actually on PATH, in preference order.
Yield stdout chunks from the CLI. Errors are yielded as text, never raised.
This runs on a worker thread feeding a widget, and an exception there is either a silent dead panel or a crash. A message the user can read is strictly better than both.
Reading happens on a helper thread feeding a queue, rather than by iterating readline() here.
That looks like the long way round and is the only version where timeout means anything: a CLI
that hangs without printing never returns from readline, so a timeout applied to the wait()
afterwards is never reached and the panel waits forever on a process that will never speak.
register receives the Popen as soon as it exists, so a caller can kill it. Without that, "stop"
can only set a flag that is checked between chunks -- and a thread blocked on a silent process
never reaches the check, so closing the window would leave a live thread and abort the process.
The assistant pane. context_provider is a callable returning a string about the map.