mirror of
https://github.com/NousResearch/hermes-agent.git
synced 2026-04-28 06:51:16 +08:00
feat: add /background command to gateway and CLI commands registry
Add /background <prompt> to the gateway, allowing users on Telegram, Discord, Slack, etc. to fire off a prompt in a separate agent session. The result is delivered back to the same chat when done, without modifying the active conversation history. Implementation: - _handle_background_command: validates input, spawns asyncio task - _run_background_task: creates AIAgent in executor thread, delivers result (text, images, media files) back via the platform adapter - Inherits model, toolsets, provider routing from gateway config - Error handling with user-visible failure messages Also adds /background to hermes_cli/commands.py registry so it appears in /help and autocomplete. Tests: 15 new tests covering usage, task creation, uniqueness, multi-platform, error paths, and help/autocomplete integration.
This commit is contained in:
@@ -12,7 +12,7 @@ EXPECTED_COMMANDS = {
|
||||
"/personality", "/clear", "/history", "/new", "/reset", "/retry",
|
||||
"/undo", "/save", "/config", "/cron", "/skills", "/platforms",
|
||||
"/verbose", "/compress", "/title", "/usage", "/insights", "/paste",
|
||||
"/reload-mcp", "/rollback", "/skin", "/quit",
|
||||
"/reload-mcp", "/rollback", "/background", "/skin", "/quit",
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user