Add short enter aliases for Slack input

This commit is contained in:
2026-02-17 06:00:34 +09:00
parent 271376a7da
commit b3ce2622e3
3 changed files with 17 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
class Bridge:
"""Slack ↔ CLI 프로세스 간의 중계기."""
ENTER_COMMAND = "!enter"
ENTER_COMMANDS = {"!", "!e", "!enter"}
def __init__(self, config: Config | None = None) -> None:
self.config = config or Config()
@@ -45,7 +45,7 @@ class Bridge:
self.slack.send_message(channel, ":warning: 연결된 세션이 없습니다.")
return
if text.strip().lower() == self.ENTER_COMMAND:
if text.strip().lower() in self.ENTER_COMMANDS:
self.pty.send_enter()
self._last_sent_output = ""
self._last_sent_fingerprint = None