MCPcopy Create free account
hub / github.com/Louisym/MiniCC / TranscriptStore

Class TranscriptStore

src/transcript.py:7–23  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

5
6@dataclass
7class TranscriptStore:
8 entries: list[str] = field(default_factory=list)
9 flushed: bool = False
10
11 def append(self, entry: str) -> None:
12 self.entries.append(entry)
13 self.flushed = False
14
15 def compact(self, keep_last: int = 10) -> None:
16 if len(self.entries) > keep_last:
17 self.entries[:] = self.entries[-keep_last:]
18
19 def replay(self) -> tuple[str, ...]:
20 return tuple(self.entries)
21
22 def flush(self) -> None:
23 self.flushed = True

Callers 1

from_saved_sessionMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected