Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions gateway/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,6 +158,10 @@ class GatewayConfig:
# Delivery settings
always_log_local: bool = True # Always save cron outputs to local files

# User-defined quick commands (bypass agent loop, no LLM call)
# Config example: quick_commands: {limits: {type: exec, command: "./limits.sh"}}
quick_commands: Dict[str, Dict[str, Any]] = field(default_factory=dict)

def get_connected_platforms(self) -> List[Platform]:
"""Return list of platforms that are enabled and configured."""
connected = []
Expand Down Expand Up @@ -312,6 +316,11 @@ def load_gateway_config() -> GatewayConfig:
os.environ["DISCORD_FREE_RESPONSE_CHANNELS"] = str(frc)
if "auto_thread" in discord_cfg and not os.getenv("DISCORD_AUTO_THREAD"):
os.environ["DISCORD_AUTO_THREAD"] = str(discord_cfg["auto_thread"]).lower()

# Load quick_commands from config.yaml
qc = yaml_cfg.get("quick_commands")
if qc and isinstance(qc, dict):
config.quick_commands = qc
except Exception:
pass

Expand Down
2 changes: 1 addition & 1 deletion gateway/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,7 @@ async def _handle_message(self, event: MessageEvent) -> Optional[str]:

# User-defined quick commands (bypass agent loop, no LLM call)
if command:
quick_commands = self.config.get("quick_commands", {})
quick_commands = getattr(self.config, "quick_commands", {})
if command in quick_commands:
qcmd = quick_commands[command]
if qcmd.get("type") == "exec":
Expand Down
Loading