Skip to content

Use Claude Code, Codex, VSCode, Pi, and OpenCode (and 6 other harnesses) for free (1.3B+ free tokens) from your terminal, app, IDE, or phone, and now from the browser with native browser sessions (multi-harness + multi-model) like OpenClaw (voice supported + ToS friendly)

Python

lint

Alishahryar1ff22e9baa26c
diff --git a/messaging/handler.py b/messaging/handler.py
index b32a1e93..290d9ab1 100644
--- a/messaging/handler.py
+++ b/messaging/handler.py
@@ -132,9 +132,7 @@ def render_markdown_to_mdv2(text: str) -> str:
href = val
break
if alt:
- out.append(
- f"{escape_md_v2(alt)} ({escape_md_v2_link_url(href)})"
- )
+ out.append(f"{escape_md_v2(alt)} ({escape_md_v2_link_url(href)})")
else:
out.append(escape_md_v2_link_url(href))
else:
@@ -460,7 +458,9 @@ class ClaudeMessageHandler:
captured_session_id = session_or_temp_id
except RuntimeError as e:
components["errors"].append(str(e))
- await update_ui(format_status("⏳", "Session limit reached"), force=True)
+ await update_ui(
+ format_status("⏳", "Session limit reached"), force=True
+ )
if tree:
await tree.update_state(
node_id, MessageState.ERROR, error_message=str(e)
@@ -736,7 +736,9 @@ class ClaudeMessageHandler:
count = await self.stop_all_tasks()
await self.platform.queue_send_message(
incoming.chat_id,
- format_status("⏹", "Stopped.", f"Cancelled {count} pending or active requests."),
+ format_status(
+ "⏹", "Stopped.", f"Cancelled {count} pending or active requests."
+ ),
)
async def _handle_stats_command(self, incoming: IncomingMessage) -> None:
diff --git a/messaging/telegram.py b/messaging/telegram.py
index 9b95cf2b..79afb9fd 100644
--- a/messaging/telegram.py
+++ b/messaging/telegram.py
@@ -26,6 +26,7 @@ MDV2_SPECIAL_CHARS = set("\\_*[]()~`>#+-=|{}.!")
def escape_md_v2(text: str) -> str:
return "".join(f"\\{ch}" if ch in MDV2_SPECIAL_CHARS else ch for ch in text)
+
# Optional import - python-telegram-bot may not be installed
try:
from telegram import Update, Bot
diff --git a/messaging/tree_processor.py b/messaging/tree_processor.py
index a03f4d01..189958af 100644
--- a/messaging/tree_processor.py
+++ b/messaging/tree_processor.py
@@ -33,18 +33,14 @@ class TreeQueueProcessor:
def set_queue_update_callback(
self,
- queue_update_callback: Optional[
- Callable[[MessageTree], Awaitable[None]]
- ],
+ queue_update_callback: Optional[Callable[[MessageTree], Awaitable[None]]],
) -> None:
"""Update the callback used to refresh queue positions."""
self._queue_update_callback = queue_update_callback
def set_node_started_callback(
self,
- node_started_callback: Optional[
- Callable[[MessageTree, str], Awaitable[None]]
- ],
+ node_started_callback: Optional[Callable[[MessageTree, str], Awaitable[None]]],
) -> None:
"""Update the callback used when a queued node starts processing."""
self._node_started_callback = node_started_callback
diff --git a/messaging/tree_queue.py b/messaging/tree_queue.py
index a5441b60..adc2fb3a 100644
--- a/messaging/tree_queue.py
+++ b/messaging/tree_queue.py
@@ -332,18 +332,14 @@ class TreeQueueManager:
def set_queue_update_callback(
self,
- queue_update_callback: Optional[
- Callable[[MessageTree], Awaitable[None]]
- ],
+ queue_update_callback: Optional[Callable[[MessageTree], Awaitable[None]]],
) -> None:
"""Set callback for queue position updates."""
self._processor.set_queue_update_callback(queue_update_callback)
def set_node_started_callback(
self,
- node_started_callback: Optional[
- Callable[[MessageTree, str], Awaitable[None]]
- ],
+ node_started_callback: Optional[Callable[[MessageTree, str], Awaitable[None]]],
) -> None:
"""Set callback for when a queued node starts processing."""
self._processor.set_node_started_callback(node_started_callback)