Rename Paths.projects and Session.projects to claude_transcripts
This commit is contained in:
@@ -23,9 +23,9 @@ def locations(home):
|
||||
return home / ".claude.json", home / ".claude" / "cache" / "model-catalog", home / ".claude" / "projects"
|
||||
|
||||
|
||||
# <projects>/-home-me-code-log/<session id>.jsonl
|
||||
def transcript_path(projects, session_id):
|
||||
hit = glob.glob(os.path.join(glob.escape(str(projects)), "*", f"{session_id}.jsonl"))
|
||||
# <claude_transcripts>/-home-me-code-log/<session id>.jsonl
|
||||
def transcript_path(claude_transcripts, session_id):
|
||||
hit = glob.glob(os.path.join(glob.escape(str(claude_transcripts)), "*", f"{session_id}.jsonl"))
|
||||
return hit[0] if hit else ""
|
||||
|
||||
|
||||
|
||||
@@ -13,19 +13,19 @@ NAMESPACE = uuid.UUID("64fb586b-d926-4bb3-a44c-c903e86d3eec")
|
||||
@dataclasses.dataclass(frozen=True)
|
||||
class Session:
|
||||
id: uuid.UUID
|
||||
claude_transcripts: pathlib.Path
|
||||
name: str
|
||||
projects: pathlib.Path
|
||||
|
||||
|
||||
def session_for(project, paths):
|
||||
"""Exists while its transcript does."""
|
||||
# "A " is the human's cue in the session picker that the session is the loop's.
|
||||
name = f"A {project} loop-claude"
|
||||
return Session(uuid.uuid5(NAMESPACE, name), name, paths.projects)
|
||||
return Session(uuid.uuid5(NAMESPACE, name), paths.claude_transcripts, name)
|
||||
|
||||
|
||||
def transcript_file(session):
|
||||
return transcript_path(session.projects, session.id)
|
||||
return transcript_path(session.claude_transcripts, session.id)
|
||||
|
||||
|
||||
def delete_session(session):
|
||||
|
||||
Reference in New Issue
Block a user