Documentation
¶
Overview ¶
Package sessiontitle resolves human-readable Claude Code session titles from transcript metadata. It is read-only and best-effort: callers fall back to the session UUID when no title can be resolved.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CleanTitle ¶
CleanTitle sanitizes a Claude session title for display in the TUI board header. It drops every non-whitespace control rune (unicode.IsControl && !IsSpace — the ESC byte that introduces an ANSI sequence, plus BEL and OSC terminators) so a /rename title can't inject escape sequences into the terminal. Once ESC is gone, any leftover body (e.g. "[31m") is inert text. Whitespace control runes (space/tab/newline/CR) are KEPT so strings.Fields collapses them to single spaces rather than gluing words together.
func FindAgentTranscript ¶ added in v0.1.6
FindAgentTranscript locates a teammate's own session transcript: the newest *.jsonl under cwd's project directory whose head records the (team, agent) markers. cwd is the lead session's recorded working directory — the spawn cwd, which is where native Claude Code files the teammate's transcript too. A live teammate's transcript keeps being appended, so candidates modified before notBefore (its spawn time) are skipped — that prunes a prior same-named teammate's transcript and bounds the scan; a zero notBefore disables the filter.
func Resolve ¶
Resolve returns title metadata for ids. custom-title entries written by /rename win over ai-title entries; missing or malformed transcripts simply omit that session from the returned map.
func ResolveMeta ¶ added in v0.1.6
ResolveMeta returns title + working-directory metadata for ids. A session with neither a title nor a cwd is omitted from the returned map.
Types ¶
type Meta ¶ added in v0.1.6
Meta is one session's resolved display metadata: its /rename (or AI) title and the working directory its transcript records. Either field may be empty.
func LookupMeta ¶ added in v0.1.6
LookupMeta returns the best display title + recorded working directory for one Claude session id, merging across transcript candidates first-wins per field and stopping once both are known.