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: preserve indentation on split and clear reaction on error paths

cyhhaoc6c4c23423af
diff --git a/core/controller.py b/core/controller.py
index e950295b2..1ba97d94c 100644
--- a/core/controller.py
+++ b/core/controller.py
@@ -462,9 +462,9 @@ class Controller:
logger.error(f"Failed to send oversized Log Message: {err}")
# Continue with remainder (skip the part we already sent)
- # Find how many characters fit in target_bytes
+ # Don't lstrip() - preserve intentional indentation in code blocks
sent_chars = len(first_part) - len(continuation_notice)
- updated = updated[sent_chars:].lstrip()
+ updated = updated[sent_chars:]
existing_message_id = None
logger.info(
"Log Message chunk exceeded %d bytes, split and continuing",
diff --git a/modules/agents/opencode/agent.py b/modules/agents/opencode/agent.py
index 77da65f59..02447d41c 100644
--- a/modules/agents/opencode/agent.py
+++ b/modules/agents/opencode/agent.py
@@ -282,6 +282,7 @@ class OpenCodeAgent(OpenCodeMessageProcessorMixin, BaseAgent):
except asyncio.CancelledError:
logger.info(f"OpenCode request cancelled for {request.base_session_id}")
+ await self._question_handler.clear(request.base_session_id)
if session_id:
self.settings_manager.remove_active_poll(session_id)
raise
@@ -298,6 +299,8 @@ class OpenCodeAgent(OpenCodeMessageProcessorMixin, BaseAgent):
f"Failed to abort OpenCode session after error: {abort_err}"
)
+ # Clean up answer reaction on error
+ await self._question_handler.clear(request.base_session_id)
if session_id:
self.settings_manager.remove_active_poll(session_id)