MCPcopy Create free account
hub / github.com/OpenRaiser/NanoResearch / __init__

Method __init__

nanoresearch/feishu_bot.py:95–103  ·  view source on GitHub ↗
(self, chat_id: str)

Source from the content-addressed store, hash-verified

93 KEEP_RECENT = 10
94
95 def __init__(self, chat_id: str) -> None:
96 self.chat_id = chat_id
97 safe_id = re.sub(r'[<>:"/\\|?*\x00-\x1f]', '_', chat_id)[:120]
98 self._path = _CHAT_MEMORY_DIR / f"{safe_id}.json"
99 self._summary: str = ""
100 self._messages: list[dict[str, str]] = []
101 self._facts: list[str] = []
102 self._invalidated = False
103 self._load()
104
105 def _load(self) -> None:
106 if self._path.exists():

Callers

nothing calls this directly

Calls 1

_loadMethod · 0.95

Tested by

no test coverage detected