Your lightweight open-source personal agent.
Python agent-frameworkai-agentai-agentschatbotchatopsdiscord-botllm-agentsllmslocal-llmmcpmodel-context-protocolmulti-agentopenai-compatibleopenclawpersonal-ai-assistantpythonself-hostedtelegram-bot-ai-assistantwebuiworkflow-automation
fix(gateway): remove duplicate load_config() that overwrote custom workspace/config
Re-bin0343d6622400
diff --git a/nanobot/cli/commands.py b/nanobot/cli/commands.pyindex 05e2cbe24..b09705958 100644--- a/nanobot/cli/commands.py+++ b/nanobot/cli/commands.py@@ -244,7 +244,7 @@ def _make_provider(config: Config):@app.command()def gateway(port: int = typer.Option(18790, "--port", "-p", help="Gateway port"),- workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory (default: ~/.nanobot/workspace)"),+ workspace: str | None = typer.Option(None, "--workspace", "-w", help="Workspace directory"),config: str | None = typer.Option(None, "--config", "-c", help="Config file path"),verbose: bool = typer.Option(False, "--verbose", "-v", help="Verbose output"),):@@ -252,7 +252,7 @@ def gateway(from nanobot.agent.loop import AgentLoopfrom nanobot.bus.queue import MessageBusfrom nanobot.channels.manager import ChannelManager- from nanobot.config.loader import get_data_dir, load_config+ from nanobot.config.loader import load_configfrom nanobot.cron.service import CronServicefrom nanobot.cron.types import CronJobfrom nanobot.heartbeat.service import HeartbeatService@@ -262,17 +262,12 @@ def gateway(import logginglogging.basicConfig(level=logging.DEBUG)- # Load config from custom path if provided, otherwise use defaultconfig_path = Path(config) if config else Noneconfig = load_config(config_path)-- # Override workspace if specified via command lineif workspace:config.agents.defaults.workspace = workspaceconsole.print(f"{__logo__} Starting nanobot gateway on port {port}...")-- config = load_config()sync_workspace_templates(config.workspace_path)bus = MessageBus()provider = _make_provider(config)