Drop bang-only enter alias

This commit is contained in:
2026-02-17 06:02:09 +09:00
parent b3ce2622e3
commit 6049ba7a8a
3 changed files with 16 additions and 4 deletions

View File

@@ -82,7 +82,7 @@ python -m lazy_enter
실행 후 Slack의 허용된 채널에서:
- `/start-claude`, `/start-codex`: 기존 세션에 연결
- 일반 메시지 전송: 현재 연결된 CLI(Claude/Codex)로 입력만 전달 (엔터 미포함)
- `!`, `!e`, `!enter` 전송: 엔터 키만 전달 (현재 프롬프트 제출)
- `!e`, `!enter` 전송: 엔터 키만 전달 (현재 프롬프트 제출)
- `/stop-claude`, `/stop-codex`: 브릿지 연결 해제 (세션 유지)
## 테스트 및 품질 점검

View File

@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
class Bridge:
"""Slack ↔ CLI 프로세스 간의 중계기."""
ENTER_COMMANDS = {"!", "!e", "!enter"}
ENTER_COMMANDS = {"!e", "!enter"}
def __init__(self, config: Config | None = None) -> None:
self.config = config or Config()

View File

@@ -167,11 +167,23 @@ def test_handle_message_short_enter_alias_sends_enter_only(monkeypatch) -> None:
bridge._handle_command("start", "codex", "C1")
pty = FakePtyManager.instances[-1]
bridge._handle_message("!", "C1")
bridge._handle_message("!e", "C1")
assert pty.sent_inputs == []
assert pty.enter_count == 2
assert pty.enter_count == 1
def test_handle_message_bang_is_plain_input(monkeypatch) -> None:
FakePtyManager.instances.clear()
bridge = _make_bridge(monkeypatch)
bridge._handle_command("start", "codex", "C1")
pty = FakePtyManager.instances[-1]
bridge._handle_message("!", "C1")
assert pty.sent_inputs == ["!"]
assert pty.enter_count == 0
def test_split_message_preserves_all_content(monkeypatch) -> None: