Skip to main content

StreamSpawner

Type Alias StreamSpawner 

Source
pub type StreamSpawner = Box<dyn Fn(Vec<ChatHistoryEntry>, SyncSender<ChatEvent>) -> CancelHandle + Send + 'static>;
Expand description

Injected by service.rs — captures signing_key + model_ref.

Called with the current history and event channel every time the user submits a message or a tool result re-triggers generation. Returns a CancelHandle that aborts the stream. Must be Send + 'static because it is moved into the background thread spawned by spawn_app_process.

Aliased Type§

pub struct StreamSpawner(/* private fields */);