| 1 | // This file was generated by [ts-rs](https://github.com/Aleph-Alpha/ts-rs). Do not edit this file manually. |
| 2 | import type { ProjectCategory } from "./ProjectCategory"; |
| 3 | import type { SessionSummary } from "./SessionSummary"; |
| 4 | |
| 5 | /** |
| 6 | * A logical project — one or more encoded-cwd directories collapsed |
| 7 | * together via git-root detection, path-prefix fallback, or (for |
| 8 | * observer sessions) category membership. |
| 9 | */ |
| 10 | export type Project = { |
| 11 | /** |
| 12 | * Stable key — the git root path, longest common cwd prefix, or |
| 13 | * (when nothing else is available) a single encoded dir name. |
| 14 | */ |
| 15 | id: string, |
| 16 | /** |
| 17 | * Canonical working directory for this project. |
| 18 | */ |
| 19 | cwd: string, |
| 20 | /** |
| 21 | * Basename of `cwd` for rendering. |
| 22 | */ |
| 23 | displayName: string, sessionCount: number, |
| 24 | /** |
| 25 | * Most recent `lastActivityAt` across all sessions in the project. |
| 26 | */ |
| 27 | lastActivity: string | null, |
| 28 | /** |
| 29 | * Sidebar grouping — see [`ProjectCategory`]. |
| 30 | */ |
| 31 | category: ProjectCategory, |
| 32 | /** |
| 33 | * Every encoded `~/.claude/projects/` directory that contributed |
| 34 | * sessions to this project. Useful for debugging unexpected merges. |
| 35 | */ |
| 36 | sourceDirs: Array<string>, |
| 37 | /** |
| 38 | * All session summaries that belong to this project, sorted newest |
| 39 | * first. Each session carries its own `projectId` which points at |
| 40 | * the **encoded source dir** where the jsonl physically lives, |
| 41 | * distinct from `Project::id` (the merged logical key). |
| 42 | */ |
| 43 | sessions: Array<SessionSummary>, }; |