fix(gateway): support quick commands from GatewayConfig

This commit is contained in:
stablegenius49 2026-03-11 12:46:56 -07:00 committed by teknium1
parent 41f22de20f
commit ce56b45514
3 changed files with 30 additions and 1 deletions

View file

@ -1013,7 +1013,10 @@ 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 command in quick_commands:
qcmd = quick_commands[command]
if qcmd.get("type") == "exec":