sessiontitle

package
v0.1.4 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 6, 2026 License: Apache-2.0 Imports: 8 Imported by: 0

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

func CleanTitle(title string) string

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 Lookup

func Lookup(sessionID string) string

Lookup returns the best display title for one Claude session id.

func Resolve

func Resolve(ids []string) map[string]string

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.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL