mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-09-30 06:53:14 +00:00
feat: remove eyes reaction on Slack invocation (#1289)
Drops the add_slack_reaction call in process_slack_mention; the Slack assistant status indicator and the agent's first reply still signal acknowledgement. Linear and GitHub eyes reactions are unchanged. Co-authored-by: open-swe[bot] <open-swe@users.noreply.github.com> Co-authored-by: Ramon Nogueira <270434257+ramon-langchain@users.noreply.github.com>
This commit is contained in:
parent
4e4ffd3b2f
commit
ed7974f62d
3 changed files with 1 additions and 30 deletions
|
|
@ -487,9 +487,7 @@ The server runs on `http://localhost:2024` with these endpoints:
|
|||
|
||||
1. In any channel where the bot is invited, start a thread
|
||||
2. Mention the bot: `@open-swe what's in the repo?`
|
||||
3. You should see:
|
||||
- An 👀 reaction on your message
|
||||
- A reply in the thread with the agent's response
|
||||
3. You should see a reply in the thread with the agent's response.
|
||||
|
||||
## 9. Production deployment
|
||||
|
||||
|
|
|
|||
|
|
@ -57,7 +57,6 @@ from .utils.repo import extract_repo_from_text
|
|||
from .utils.sandbox import validate_sandbox_startup_config
|
||||
from .utils.slack import (
|
||||
GitHubPrRef,
|
||||
add_slack_reaction,
|
||||
fetch_slack_thread_messages,
|
||||
format_slack_messages_for_prompt,
|
||||
get_slack_user_info,
|
||||
|
|
@ -836,14 +835,6 @@ async def process_slack_mention(event_data: dict[str, Any], repo_config: dict[st
|
|||
)
|
||||
return
|
||||
|
||||
reacted = await add_slack_reaction(channel_id, event_ts, "eyes")
|
||||
if not reacted:
|
||||
logger.debug(
|
||||
"Unable to add eyes reaction for Slack message ts=%s in channel=%s",
|
||||
event_ts,
|
||||
channel_id,
|
||||
)
|
||||
|
||||
await set_slack_assistant_status(channel_id, thread_ts)
|
||||
|
||||
thread_id = generate_thread_id_from_slack_thread(channel_id, thread_ts)
|
||||
|
|
|
|||
|
|
@ -486,14 +486,6 @@ def test_get_slack_repo_config_repo_name_only_space_syntax(
|
|||
def _setup_slack_mention_fakes(
|
||||
monkeypatch: pytest.MonkeyPatch, captured: dict[str, object]
|
||||
) -> None:
|
||||
async def fake_add_slack_reaction(channel_id: str, message_ts: str, emoji: str) -> bool:
|
||||
captured["reaction"] = {
|
||||
"channel_id": channel_id,
|
||||
"message_ts": message_ts,
|
||||
"emoji": emoji,
|
||||
}
|
||||
return True
|
||||
|
||||
async def fake_get_slack_user_info(user_id: str) -> dict:
|
||||
return {
|
||||
"profile": {
|
||||
|
|
@ -554,7 +546,6 @@ def _setup_slack_mention_fakes(
|
|||
threads = _FakeThreadsClientForProcess()
|
||||
|
||||
monkeypatch.setattr(webapp, "SLACK_BOT_USERNAME", "open-swe")
|
||||
monkeypatch.setattr(webapp, "add_slack_reaction", fake_add_slack_reaction)
|
||||
monkeypatch.setattr(webapp, "get_slack_user_info", fake_get_slack_user_info)
|
||||
monkeypatch.setattr(webapp, "fetch_slack_thread_messages", fake_fetch_slack_thread_messages)
|
||||
monkeypatch.setattr(webapp, "get_slack_user_names", fake_get_slack_user_names)
|
||||
|
|
@ -666,14 +657,6 @@ def test_process_slack_mention_queues_active_thread_message(
|
|||
) -> None:
|
||||
captured: dict[str, object] = {}
|
||||
|
||||
async def fake_add_slack_reaction(channel_id: str, message_ts: str, emoji: str) -> bool:
|
||||
captured["reaction"] = {
|
||||
"channel_id": channel_id,
|
||||
"message_ts": message_ts,
|
||||
"emoji": emoji,
|
||||
}
|
||||
return True
|
||||
|
||||
async def fake_get_slack_user_info(user_id: str) -> dict:
|
||||
return {
|
||||
"profile": {
|
||||
|
|
@ -733,7 +716,6 @@ def test_process_slack_mention_queues_active_thread_message(
|
|||
threads = _FakeThreadsClientForProcess()
|
||||
|
||||
monkeypatch.setattr(webapp, "SLACK_BOT_USERNAME", "open-swe")
|
||||
monkeypatch.setattr(webapp, "add_slack_reaction", fake_add_slack_reaction)
|
||||
monkeypatch.setattr(webapp, "get_slack_user_info", fake_get_slack_user_info)
|
||||
monkeypatch.setattr(webapp, "fetch_slack_thread_messages", fake_fetch_slack_thread_messages)
|
||||
monkeypatch.setattr(webapp, "get_slack_user_names", fake_get_slack_user_names)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue