transcript

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2026 License: MIT Imports: 9 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package transcript reads Claude Code's session transcripts (JSON lines). A transcript is untrusted input: it is read only when it is a regular file under the projects folder, never through a link, and never more than a bounded amount.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstPrompt

func FirstPrompt(path string) string

FirstPrompt is the first line of the first real user message: messages that start with a tag (command and system wrappers) or are blank are skipped. A line that is not JSON is skipped.

func Recent

func Recent(path string) (string, bool)

Recent is the end of the conversation for the summarizer: the user and assistant text of the last 40 lines, "type: text" each, every physical line cut to 600 characters, and the last 6000 bytes of that, on a character boundary.

func Valid

func Valid(path, configDir string) bool

Valid says whether path may be read: it starts with the literal <configDir>/projects/, has no /../ in it (checked on the raw string, before any cleaning), and is a regular file that is not a link.

Types

This section is empty.

Jump to

Keyboard shortcuts

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