refactor: remove unused internal helpers and state (#5667)
* refactor: remove unused internal helpers and state * test(tui): await deferred submissions before reconnect attach
This commit is contained in:
1 parent
f37ba60ed4
commit
63cc5f270d
11 files changed
+12
-118
No files matched your search
@@ -20,9 +20,7 @@ from nanobot.bus.events import (
|
||||
InboundMessage,
|
||||
)
|
||||
from nanobot.runtime_context import (
|
||||
RUNTIME_CONTEXT_END,
|
||||
RUNTIME_CONTEXT_MESSAGE_META,
|
||||
RUNTIME_CONTEXT_TAG,
|
||||
RuntimeContextBlock,
|
||||
append_runtime_context,
|
||||
)
|
||||
@@ -93,8 +91,6 @@ class ContextBuilder:
|
||||
|
||||
BOOTSTRAP_FILES = ["AGENTS.md", "SOUL.md", "USER.md"]
|
||||
_SKIPPABLE_DEFAULTS = {"AGENTS.md", "USER.md"}
|
||||
_RUNTIME_CONTEXT_TAG = RUNTIME_CONTEXT_TAG
|
||||
_RUNTIME_CONTEXT_END = RUNTIME_CONTEXT_END
|
||||
|
||||
def __init__(self, workspace: Path, timezone: str | None = None, disabled_skills: list[str] | None = None):
|
||||
self.workspace = workspace
|
||||
|
||||
@@ -503,7 +503,6 @@ class TelegramChannel(BaseChannel):
|
||||
super().__init__(config, bus)
|
||||
self.config: TelegramConfig = config
|
||||
self._app: TelegramApplication | None = None
|
||||
self._chat_ids: dict[str, int] = {} # Map sender_id to chat_id for replies
|
||||
self._typing_tasks: dict[str, asyncio.Task[None]] = {} # chat_id -> typing loop task
|
||||
self._media_group_buffers: dict[str, dict[str, Any]] = {}
|
||||
self._media_group_tasks: dict[str, asyncio.Task[None]] = {}
|
||||
@@ -1723,9 +1722,6 @@ class TelegramChannel(BaseChannel):
|
||||
return
|
||||
self._remember_thread_context(message)
|
||||
|
||||
# Store chat_id for replies
|
||||
self._chat_ids[sender_id] = chat_id
|
||||
|
||||
if not await self._is_group_message_for_bot(message):
|
||||
return
|
||||
|
||||
|
||||
@@ -539,9 +539,6 @@ class WebSocketChannel(BaseChannel):
|
||||
def default_config(cls) -> dict[str, Any]:
|
||||
return WebSocketConfig().model_dump(by_alias=True)
|
||||
|
||||
def _expected_path(self) -> str:
|
||||
return _normalize_config_path(self.config.path)
|
||||
|
||||
def _build_ssl_context(self) -> ssl.SSLContext | None:
|
||||
cert = self.config.ssl_certfile.strip()
|
||||
key = self.config.ssl_keyfile.strip()
|
||||
@@ -579,9 +576,6 @@ class WebSocketChannel(BaseChannel):
|
||||
headers,
|
||||
)
|
||||
|
||||
def _consume_issued_token(self, connection: ServerConnection, token: str) -> bool:
|
||||
return self.gateway.endpoint.consume_issued_token(connection, token)
|
||||
|
||||
# -- Server lifecycle and connection ingress ---------------------------
|
||||
|
||||
@staticmethod
|
||||
|
||||
Reference in new issue
Block a user