Skip to main content

Module modes

Module modes 

Source
Expand description

AI agent modes (AI-1b).

  • ai-log-mode (major) – the read-only buffer backing the per-process *ai:<provider>:<index>* log view. Mirrors lattice_lsp::modes::LspServerLogMode: on_activate derives its SessionKey identity by parsing the buffer’s synthetic name, seeds from the AiLogger ring, subscribes to AiLogPushed, and spawns a drain task that appends matching records live. The returned Subscription guard unsubscribes on drop.

The boot wiring that registers this mode, registers the AiLogger service (there is no Editor field – modes reach it through the service registry), wires the AiLogPushed publisher onto the runtime bus, and creates/opens the buffers lives in lattice_ai::install. This module only builds the mode itself, unit-testable without a booted app (every missing service / unparseable name short- circuits on_activate to Ok(None)).

Structs§

AiLogMode
ai-log-mode – major mode for the per-session *ai:<provider>:<index>* buffer.