参数: storage_dir: 存储目录,如 ~/.claude/projects/ / CC 用 sanitizePath() 把 cwd 转成合法文件名。 我们简化为直接接收 storage_dir。
(self, storage_dir: Path)
| 56 | |
| 57 | class SessionStore: |
| 58 | def __init__(self, storage_dir: Path): |
| 59 | """ |
| 60 | 参数: |
| 61 | storage_dir: 存储目录,如 ~/.claude/projects/<sanitized-cwd>/ |
| 62 | |
| 63 | CC 用 sanitizePath() 把 cwd 转成合法文件名。 |
| 64 | 我们简化为直接接收 storage_dir。 |
| 65 | """ |
| 66 | self._storage_dir = storage_dir |
| 67 | |
| 68 | def _session_path(self, session_id: str) -> Path: |
| 69 | """JSONL 文件路径。CC: ~/.claude/projects/{cwd}/{session_id}.jsonl""" |
nothing calls this directly
no outgoing calls
no test coverage detected