Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

fix(reaction): avoid premature ack cleanup on answer submit

cyh046f77077c0d
diff --git a/modules/agents/opencode/agent.py b/modules/agents/opencode/agent.py
index a2e9b81d6..2f184d0e5 100644
--- a/modules/agents/opencode/agent.py
+++ b/modules/agents/opencode/agent.py
@@ -112,8 +112,11 @@ class OpenCodeAgent(OpenCodeMessageProcessorMixin, BaseAgent):
pending,
server, # type: ignore[arg-type]
)
- # Clean up reaction for answer submission
- await self._remove_ack_reaction(request)
+ # Do NOT remove ack reaction here.
+ # The OpenCode run is still in progress after answer submission,
+ # so early cleanup makes users think the task has finished.
+ # Prefer stale reactions over premature removal; terminal cleanup
+ # happens on result/error/cancel paths.
return
else:
task = asyncio.create_task(self._process_message(request))
diff --git a/modules/im/slack.py b/modules/im/slack.py
index 7d8f25d4c..e77122641 100644
--- a/modules/im/slack.py
+++ b/modules/im/slack.py
@@ -760,11 +760,22 @@ class SlackBot(BaseIMClient):
"""Remove interactive buttons from a Slack message."""
self._ensure_clients()
try:
+ if not message_id:
+ return False
+
+ payload = (context.platform_specific or {}).get("payload") if context.platform_specific else None
+ payload_message = payload.get("message") if isinstance(payload, dict) else None
+
blocks = []
fallback_text = text
if fallback_text is not None and parse_mode == "markdown":
fallback_text = self._convert_markdown_to_slack_mrkdwn(fallback_text)
+ if fallback_text is None and isinstance(payload_message, dict):
+ payload_text = payload_message.get("text")
+ if isinstance(payload_text, str):
+ fallback_text = payload_text
+
if fallback_text:
blocks = [
{
@@ -775,6 +786,12 @@ class SlackBot(BaseIMClient):
},
}
]
+ elif isinstance(payload_message, dict):
+ payload_blocks = payload_message.get("blocks")
+ if isinstance(payload_blocks, list):
+ for block in payload_blocks:
+ if isinstance(block, dict) and block.get("type") != "actions":
+ blocks.append(block)
kwargs = {"channel": context.channel_id, "ts": message_id, "blocks": blocks}
if fallback_text is not None: