INNER CODE UNIT · Python
parse_session_file
softaworks/agent-toolkit · skills/daily-meeting-update/scripts/claude_digest.py:105
def parse_session_file(file_path: Path) -> Optional[dict]:
"""Parse a JSONL session file."""
messages = []
summary = None
session_id = file_path.stem
project_path = decode_project_path(file_path.parent.name)
git_branch = None
first_timestamp = None
first_user_message = None
try:
with open(file_path, 'r', encoding='utf-8') as f:
for line in f:
if not line.strip():
continue
try:
entry = json.loads(line)
except json.JSONDecodeError: