chore: auto-commit from dashboard

This commit is contained in:
2026-05-27 05:40:22 +00:00
parent 2a05f7cf49
commit 3dd2ddbd6a
11 changed files with 430 additions and 19 deletions

View File

@@ -9,7 +9,8 @@ from pathlib import Path
from typing import Callable
from src.config import Config
from src.fast_commands import dispatch as fast_dispatch
from src.fast_commands import dispatch as fast_dispatch, set_channel_context
from src.last_response_store import set_last as _set_last_response
from src.claude_session import (
send_message,
clear_session,
@@ -137,6 +138,7 @@ def route_message(
parts = text[1:].split()
cmd_name = parts[0].lower()
cmd_args = parts[1:]
set_channel_context(channel_id)
result = fast_dispatch(cmd_name, cmd_args)
if result is not None:
return result, True
@@ -154,6 +156,7 @@ def route_message(
try:
response = send_message(channel_id, text, model=model, on_text=on_text)
_set_last_response(channel_id, response)
return response, False
except Exception as e:
log.error("Claude error for channel %s: %s", channel_id, e)