Documentation
¶
Overview ¶
Package chat turns Claude Code's session transcript (the JSONL under ~/.claude/projects) into a clean, phone-friendly stream of chat events. cuxdeck collects nothing itself — Claude Code writes every line for --resume, so this is a pure read of data that already exists, live for the current session and complete for past ones.
The parser is intentionally forgiving: unknown block types degrade to a labelled marker, malformed lines are skipped, and the shapes it does not recognise never crash the stream. The transcript format belongs to Claude Code and grows freely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Event ¶
type Event struct {
Role string `json:"role"` // user | assistant | tool | task | ask | system | divider
Kind string `json:"kind,omitempty"` // text | thinking | tool | image | model-switch | task-create | task-update | todos | question | answer | denied | interrupt
Text string `json:"text,omitempty"` // bubble body / one-line tool summary
Tool string `json:"tool,omitempty"` // tool name (Kind==tool) or task id (task events)
Detail string `json:"detail,omitempty"` // secondary line (tool target, model names, options)
Full string `json:"full,omitempty"` // expandable body (whole command, task prompt, result)
ID string `json:"id,omitempty"` // tool_use id — pairs a result line with its call
TS string `json:"ts,omitempty"` // when Claude Code recorded the line (RFC3339)
Tokens int `json:"tokens,omitempty"` // output tokens of the assistant message (first event only)
}
Event is one item in the chat view.
Click to show internal directories.
Click to hide internal directories.