stage-7: CLI tool with full subcommands

echo status/doctor/restart/logs/sessions/channel/send commands, symlink at ~/.local/bin/echo. QA fix: discord chat handler tuple unpacking bug. 32 new tests (193 total).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
MoltBot Service
2026-02-13 13:29:39 +00:00
parent 5bdceff732
commit 09d3de003a
5 changed files with 716 additions and 11 deletions

View File

@@ -4,8 +4,6 @@ import asyncio
import logging
import os
import signal
from pathlib import Path
import discord
from discord import app_commands
@@ -355,7 +353,7 @@ def create_bot(config: Config) -> discord.Client:
try:
async with message.channel.typing():
response = await asyncio.to_thread(
response, _is_cmd = await asyncio.to_thread(
route_message, channel_id, user_id, text
)

View File

@@ -64,7 +64,7 @@ def route_message(channel_id: str, user_id: str, text: str, model: str | None =
response = send_message(channel_id, text, model=model)
return response, False
except Exception as e:
log.error(f"Claude error for channel {channel_id}: {e}")
log.error("Claude error for channel %s: %s", channel_id, e)
return f"Error: {e}", False