octomind 0.20.0

Session-based AI development assistant with conversational codebase interaction, multimodal vision support, built-in MCP tools, and multi-provider AI integration
Documentation
// Copyright 2025 Muvon Un Limited
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
//     http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.

use clap::Args;

#[derive(Args, Debug)]
pub struct SessionArgs {
	/// Name of the session to start or resume
	#[arg(long, short)]
	pub name: Option<String>,

	/// Resume an existing session
	#[arg(long, short)]
	pub resume: Option<String>,

	/// Resume the most recent session for the current project directory
	#[arg(long)]
	pub resume_recent: bool,

	/// Use a specific model instead of the one configured in config (runtime only, not saved)
	#[arg(long)]
	pub model: Option<String>,

	/// Maximum tokens for the AI response (runtime only, not saved)
	#[arg(long)]
	pub max_tokens: Option<u32>,

	/// Temperature for the AI response (0.0 to 1.0, runtime only, not saved)
	#[arg(long)]
	pub temperature: Option<f32>,

	/// Session role: developer (default with layers and tools) or assistant (simple chat without tools)
	#[arg(long, default_value = "developer")]
	pub role: String,

	/// Maximum number of retries for provider errors (runtime only, not saved)
	#[arg(long)]
	pub max_retries: Option<u32>,

	/// Output mode: plain (default) or jsonl (JSON Lines format like WebSocket)
	#[arg(long, default_value = "plain")]
	pub mode: String,

	/// Override system prompt with content from this file (runtime only, not saved)
	#[arg(long)]
	pub system: Option<String>,

	/// Override instructions with content from this file (runtime only, not saved)
	#[arg(long)]
	pub instructions: Option<String>,

	/// Path to JSON schema file for structured output (runtime only)
	#[arg(long)]
	pub schema: Option<String>,
}

// No execute function here since it's handled directly by the session::chat module
// The module is accessed in main.rs via:
// session::chat::run_interactive_session(session_args, &store, &config).await?