pub struct ConversationManager {Show 30 fields
pub history: Vec<ChatMessage>,
pub engine: Arc<InferenceEngine>,
pub tools: Vec<ToolDefinition>,
pub mcp_manager: Arc<Mutex<McpManager>>,
pub professional: bool,
pub brief: bool,
pub snark: u8,
pub chaos: u8,
pub fast_model: Option<String>,
pub think_model: Option<String>,
pub correction_hints: Vec<String>,
pub running_summary: Option<String>,
pub gpu_state: Arc<GpuState>,
pub vein: Vein,
pub transcript: TranscriptLogger,
pub cancel_token: Arc<AtomicBool>,
pub git_state: Arc<GitState>,
pub think_mode: Option<bool>,
pub session_memory: SessionMemory,
pub swarm_coordinator: Arc<SwarmCoordinator>,
pub voice_manager: Arc<VoiceManager>,
pub soul_personality: String,
pub lsp_manager: Arc<Mutex<LspManager>>,
pub reasoning_history: Option<String>,
pub pinned_files: Arc<Mutex<HashMap<String, String>>>,
pub l1_context: Option<String>,
pub repo_map: Option<String>,
pub turn_count: u32,
pub last_goal: Option<String>,
pub latest_target_dir: Option<String>,
/* private fields */
}Fields§
§history: Vec<ChatMessage>Full conversation history in OpenAI format.
engine: Arc<InferenceEngine>§tools: Vec<ToolDefinition>§mcp_manager: Arc<Mutex<McpManager>>§professional: bool§brief: bool§snark: u8§chaos: u8§fast_model: Option<String>Model to use for simple read-only tasks (optional, user-supplied via –fast-model).
think_model: Option<String>Model to use for complex write/build tasks (optional, user-supplied via –think-model).
correction_hints: Vec<String>Files where whitespace auto-correction fired this session.
running_summary: Option<String>Running background summary of pruned older messages.
gpu_state: Arc<GpuState>Live hardware telemetry handle.
vein: VeinLocal RAG memory — FTS5-indexed project source.
transcript: TranscriptLoggerAppend-only session transcript logger.
cancel_token: Arc<AtomicBool>Thread-safe cancellation signal for the current agent turn.
git_state: Arc<GitState>Shared Git remote state (for persistent connectivity checks).
think_mode: Option<bool>Reasoning think-mode override. None = let model decide. Some(true) = force /think. Some(false) = force /no_think (fast mode, 3-5x quicker for simple tasks).
session_memory: SessionMemoryLayer 6: Dynamic Task Context (extracted during compaction)
swarm_coordinator: Arc<SwarmCoordinator>§voice_manager: Arc<VoiceManager>§soul_personality: StringPersonality description for the current Rusty soul — used in chat mode system prompt.
lsp_manager: Arc<Mutex<LspManager>>§reasoning_history: Option<String>Active reasoning summary extracted from the previous model turn (Gemma-4 Native).
pinned_files: Arc<Mutex<HashMap<String, String>>>Layer 8: Active Reference Pinning (Context Locked)
l1_context: Option<String>L1 context block — hot files summary injected into the system prompt. Built once after vein init and updated as edits accumulate heat.
repo_map: Option<String>Condensed AST repository layout for the active project.
turn_count: u32Number of real inference turns completed this session.
last_goal: Option<String>Last user message sent to the model — persisted as checkpoint goal.
latest_target_dir: Option<String>Most recent project directory created this session (Automatic Dive-In).
Implementations§
Source§impl ConversationManager
impl ConversationManager
pub fn new( engine: Arc<InferenceEngine>, professional: bool, brief: bool, snark: u8, chaos: u8, soul_personality: String, fast_model: Option<String>, think_model: Option<String>, gpu_state: Arc<GpuState>, git_state: Arc<GitState>, swarm_coordinator: Arc<SwarmCoordinator>, voice_manager: Arc<VoiceManager>, ) -> Self
Sourcepub fn initialize_vein(&mut self) -> usize
pub fn initialize_vein(&mut self) -> usize
Index the project into The Vein. Call once after construction. Uses block_in_place so the tokio runtime thread isn’t parked.
Sourcepub fn initialize_repo_map(&mut self)
pub fn initialize_repo_map(&mut self)
Generate the AST Repo Map. Call once after construction or when resetting context.
Sourcepub async fn initialize_mcp(
&mut self,
tx: &Sender<InferenceEvent>,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn initialize_mcp( &mut self, tx: &Sender<InferenceEvent>, ) -> Result<(), Box<dyn Error + Send + Sync>>
Spawns and initializes all configured MCP servers, discovering their tools.
Sourcepub async fn run_turn(
&mut self,
user_turn: &UserTurn,
tx: Sender<InferenceEvent>,
yolo: bool,
) -> Result<(), Box<dyn Error + Send + Sync>>
pub async fn run_turn( &mut self, user_turn: &UserTurn, tx: Sender<InferenceEvent>, yolo: bool, ) -> Result<(), Box<dyn Error + Send + Sync>>
Run one user turn through the full agentic loop.
Adds the user message, calls the model, executes any tools, and loops
until the model produces a final text reply. All progress is streamed
as InferenceEvent values via tx.
Auto Trait Implementations§
impl Freeze for ConversationManager
impl !RefUnwindSafe for ConversationManager
impl Send for ConversationManager
impl Sync for ConversationManager
impl Unpin for ConversationManager
impl UnsafeUnpin for ConversationManager
impl !UnwindSafe for ConversationManager
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more