From 7c35df7a82f501ef3544f171d4088ab6f90c75c3 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Thu, 21 May 2026 11:14:19 +0800 Subject: [PATCH 1/2] fix: default agent mode to enabled --- channel/channel.py | 2 +- channel/web/web_channel.py | 2 +- config.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/channel/channel.py b/channel/channel.py index 385451b2..cd46c565 100644 --- a/channel/channel.py +++ b/channel/channel.py @@ -73,7 +73,7 @@ class Channel(object): Build reply content, using agent if enabled in config """ # Check if agent mode is enabled - use_agent = conf().get("agent", False) + use_agent = conf().get("agent", True) if use_agent: try: diff --git a/channel/web/web_channel.py b/channel/web/web_channel.py index 0b5a6a70..2a5e71b8 100644 --- a/channel/web/web_channel.py +++ b/channel/web/web_channel.py @@ -1108,7 +1108,7 @@ class ConfigHandler: web.header('Content-Type', 'application/json; charset=utf-8') try: local_config = conf() - use_agent = local_config.get("agent", False) + use_agent = local_config.get("agent", True) title = "CowAgent" if use_agent else "AI Assistant" api_bases = {} diff --git a/config.py b/config.py index 1d08bb64..d172fd3d 100644 --- a/config.py +++ b/config.py @@ -366,7 +366,7 @@ def load_config(): logger.info("[INIT] Model: {}".format(config.get("model", "unknown"))) # Agent模式信息 - if config.get("agent", False): + if config.get("agent", True): workspace = config.get("agent_workspace", "~/cow") logger.info("[INIT] Mode: Agent (workspace: {})".format(workspace)) else: From a01423a196f4330bf866914623602c272d152881 Mon Sep 17 00:00:00 2001 From: zhayujie Date: Thu, 21 May 2026 11:17:50 +0800 Subject: [PATCH 2/2] fix: default agent mode to enabled when "agent" config is absent --- cli/commands/process.py | 2 +- plugins/cow_cli/cow_cli.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cli/commands/process.py b/cli/commands/process.py index 6a66c63a..0996ffca 100644 --- a/cli/commands/process.py +++ b/cli/commands/process.py @@ -269,7 +269,7 @@ def status(): channel = ", ".join(channel) click.echo(f" 通道: {channel}") click.echo(f" 模型: {cfg.get('model', 'unknown')}") - mode = "Agent" if cfg.get("agent") else "Chat" + mode = "Chat" if cfg.get("agent") is False else "Agent" click.echo(f" 模式: {mode}") diff --git a/plugins/cow_cli/cow_cli.py b/plugins/cow_cli/cow_cli.py index 3ecbfaec..aafa1813 100644 --- a/plugins/cow_cli/cow_cli.py +++ b/plugins/cow_cli/cow_cli.py @@ -271,7 +271,7 @@ class CowCliPlugin(Plugin): model_name = cfg.get("model", "unknown") lines.append(f" 模型: {model_name}") - mode = "Agent" if cfg.get("agent") else "Chat" + mode = "Chat" if cfg.get("agent") is False else "Agent" lines.append(f" 模式: {mode}") session_id = self._get_session_id(e_context, fallback=session_id)