Drop bang-only enter alias
This commit is contained in:
@@ -82,7 +82,7 @@ python -m lazy_enter
|
|||||||
실행 후 Slack의 허용된 채널에서:
|
실행 후 Slack의 허용된 채널에서:
|
||||||
- `/start-claude`, `/start-codex`: 기존 세션에 연결
|
- `/start-claude`, `/start-codex`: 기존 세션에 연결
|
||||||
- 일반 메시지 전송: 현재 연결된 CLI(Claude/Codex)로 입력만 전달 (엔터 미포함)
|
- 일반 메시지 전송: 현재 연결된 CLI(Claude/Codex)로 입력만 전달 (엔터 미포함)
|
||||||
- `!`, `!e`, `!enter` 전송: 엔터 키만 전달 (현재 프롬프트 제출)
|
- `!e`, `!enter` 전송: 엔터 키만 전달 (현재 프롬프트 제출)
|
||||||
- `/stop-claude`, `/stop-codex`: 브릿지 연결 해제 (세션 유지)
|
- `/stop-claude`, `/stop-codex`: 브릿지 연결 해제 (세션 유지)
|
||||||
|
|
||||||
## 테스트 및 품질 점검
|
## 테스트 및 품질 점검
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ logger = logging.getLogger(__name__)
|
|||||||
class Bridge:
|
class Bridge:
|
||||||
"""Slack ↔ CLI 프로세스 간의 중계기."""
|
"""Slack ↔ CLI 프로세스 간의 중계기."""
|
||||||
|
|
||||||
ENTER_COMMANDS = {"!", "!e", "!enter"}
|
ENTER_COMMANDS = {"!e", "!enter"}
|
||||||
|
|
||||||
def __init__(self, config: Config | None = None) -> None:
|
def __init__(self, config: Config | None = None) -> None:
|
||||||
self.config = config or Config()
|
self.config = config or Config()
|
||||||
|
|||||||
@@ -167,11 +167,23 @@ def test_handle_message_short_enter_alias_sends_enter_only(monkeypatch) -> None:
|
|||||||
bridge._handle_command("start", "codex", "C1")
|
bridge._handle_command("start", "codex", "C1")
|
||||||
pty = FakePtyManager.instances[-1]
|
pty = FakePtyManager.instances[-1]
|
||||||
|
|
||||||
bridge._handle_message("!", "C1")
|
|
||||||
bridge._handle_message("!e", "C1")
|
bridge._handle_message("!e", "C1")
|
||||||
|
|
||||||
assert pty.sent_inputs == []
|
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:
|
def test_split_message_preserves_all_content(monkeypatch) -> None:
|
||||||
|
|||||||
Reference in New Issue
Block a user