Merge pull request #1287 from NousResearch/hermes/hermes-cc060dd9

fix(gateway): avoid slash-command crash with GatewayConfig
This commit is contained in:
Teknium 2026-03-14 04:13:56 -07:00 committed by GitHub
commit 02752c83b4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 79 additions and 3 deletions

View file

@ -1023,7 +1023,12 @@ class GatewayRunner:
# User-defined quick commands (bypass agent loop, no LLM call)
if command:
quick_commands = self.config.get("quick_commands", {})
if isinstance(self.config, dict):
quick_commands = self.config.get("quick_commands", {}) or {}
else:
quick_commands = getattr(self.config, "quick_commands", {}) or {}
if not isinstance(quick_commands, dict):
quick_commands = {}
if command in quick_commands:
qcmd = quick_commands[command]
if qcmd.get("type") == "exec":