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

@@ -649,6 +649,7 @@ impl ConfigLoader {
/// - Provider-specific: `GYANDOOT_OPENAI_API_KEY`, `GYANDOOT_OPENAI_MODEL`,
/// `GYANDOOT_OPENAI_BASE_URL`, `GYANDOOT_ANTHROPIC_API_KEY`, etc.
pub fn from_env(&self, config: &mut GyandootConfig) {
#[allow(unused_macros)]
macro_rules! env_opt {
($key:literal, $target:expr) => {
if let Ok(val) = std::env::var(concat!(env_prefix_str!(), $key)) {
@@ -785,7 +786,7 @@ impl ConfigLoader {
/// Convenience: load config from a single TOML file (legacy API).
pub fn load_config_from_file(path: &std::path::Path) -> anyhow::Result<AgentConfig> {
let loader = ConfigLoader::new();
let _loader = ConfigLoader::new();
let gyandoot = ConfigLoader::from_file(path)?;
Ok(AgentConfig::from(gyandoot))
}

View File

@@ -9,6 +9,13 @@ pub mod config;
pub mod error;
pub mod service;
pub use types::*;
pub use config::*;
pub use error::*;
pub use config::{
AgentConfig, AgentSection, AnthropicConfig, BrowserSection, ConfigLoader,
GatewaySection, GyandootConfig, IdentitySection,
KanbanRootConfig, MemoryRootConfig, MemorySection, OllamaConfig,
OpenAIConfig, PlatformRootConfig, PlatformSection, ProviderRootConfig,
ProvidersSection, SecurityRootConfig, SkillsRootConfig, TelegramConfig,
WebhookConfig, DiscordConfig, load_config_from_file,
};
pub use error::*;
pub use types::*;

View File

@@ -7,8 +7,8 @@
//! Templates live in the resources/ directory of the repo and are rendered
//! at install time with the actual binary path and home directory.
use std::path::{Path, PathBuf};
use tracing::{info, warn};
use std::path::PathBuf;
use tracing::info;
use crate::{AgentError, AgentResult};