Slash commands (/quit, /help) + zero compiler warnings

1. /quit and /help commands restored:
   - /quit: exits the interactive loop
   - /help: shows formatted help box with available commands & tips
   - Unknown commands get a friendly error pointing to /help
   - Slash commands intercepted before LLM processing (no token waste)

2. Zero warnings across entire workspace (13 files fixed):
   - Fixed ambiguous glob re-exports in gyandoot-core
   - Added #[allow(dead_code)] on intentional dead fields
   - Fixed unused imports, variables, and macros
   - Fixed unused assignments in subagents
   - cleaned up service.rs, profile, kanban warnings

install.sh now produces a completely clean build with zero warnings.
This commit is contained in:
2026-06-12 12:15:01 +05:30
parent 366d93443b
commit 8c9a32075d
13 changed files with 90 additions and 22 deletions

View File

@@ -29,12 +29,11 @@
//! ```
use std::collections::HashMap;
use std::path::PathBuf;
use std::sync::Arc;
use chrono::{DateTime, Utc};
use gyandoot_agent::agent_loop::{AgentLoop, ConversationOutput};
use gyandoot_core::{AgentConfig, AgentError, AgentStatus};
use gyandoot_agent::agent_loop::AgentLoop;
use gyandoot_core::AgentConfig;
use tokio::sync::{Mutex, Semaphore};
use tracing::{error, info, span, warn, Level};
use uuid::Uuid;
@@ -219,7 +218,7 @@ impl SubAgentWorker {
/// The worker respects max_iterations by passing a capped max_tokens
/// and managing iteration count through the system prompt directive.
pub async fn execute(&self) -> WorkerResult {
let started_at = Utc::now();
let _started_at = Utc::now();
{
let mut s = self.status.lock().await;
*s = WorkerStatus::Running;
@@ -293,7 +292,7 @@ impl SubAgentWorker {
};
}
let completed_at = Utc::now();
let _completed_at = Utc::now();
info!(
worker_id = %self.config.id,
success = %result.success,
@@ -325,8 +324,11 @@ impl SubAgentWorker {
_config: &AgentConfig,
) -> WorkerResult {
let started_at = Utc::now();
#[allow(unused_assignments)]
let mut summary = String::new();
#[allow(unused_assignments)]
let mut error_msg = None;
#[allow(unused_assignments)]
let mut iteration_count = 0;
// Build a directive message for the sub-agent
@@ -410,7 +412,7 @@ impl SubAgentWorker {
// Build a simulated ToolExecutor with filtered tools
let tool_executor = if let Some(allowed) = &self.config.allowed_tools {
let mut exec = gyandoot_agent::tools::ToolExecutor::with_defaults();
let _exec = gyandoot_agent::tools::ToolExecutor::with_defaults();
// Remove tools not in the allowed list
let names: Vec<String> = allowed.clone();
// We can't easily unregister, so we build fresh
@@ -653,7 +655,7 @@ impl SubAgentManager {
let mut w = self.workers.lock().await;
w.retain(|_, worker| {
// We can only check the current status synchronously
let status = worker.status.try_lock().map(|mut s| s.clone()).ok();
let status = worker.status.try_lock().map(|s| s.clone()).ok();
!matches!(
status,
Some(WorkerStatus::Completed { .. }) | Some(WorkerStatus::Failed(_))