Expand description
The IDE server supervisor: an idle tokio task that starts/stops the loopback WebSocket listener on command.
Mirrors lattice_lsp’s supervisor shape: a single task owns the
listener lifecycle; a clone-able ClaudeCodeServerHandle drives it
via a non-blocking cmd_tx send. The ex-command apply closures
(:claude-code-start / :claude-code-stop) and claude-code-mode’s
on_activate (I5) hold the handle and call start / stop.
All protocol I/O happens off the editor thread: the supervisor task
and one task per connection run on the IDE runtime. The editor thread
only ever calls start / stop (a channel send) and reads the
wait-free ServerState snapshot.
Structs§
- Claude
Code Server Handle - Handle to the supervisor. Clone-able +
Send + Sync: the ex-commandapplyclosures andclaude-code-mode’son_activatehold one and drivestart/stop. Mirrorslattice_lsp::LspSupervisorHandle. - Server
Config - Static config the server binds with.
- Server
State - Wait-free snapshot of server state for status reads (headerline, I7).
Functions§
- spawn
- Spawn the supervisor task on
rt. Returns immediately; the task stays idle untilstart().