Help us shape the future of Go! Take the 2026 Go Developer Survey

transcript

package
v0.6.2 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTools  = 20
	MaxAgents = 10
)

Maximum entries to keep for display

Variables

This section is empty.

Functions

func GetCompletedToolCounts

func GetCompletedToolCounts(data *types.TranscriptData) map[string]int

GetCompletedToolCounts returns a map of tool names to completion counts

func GetCurrentTodo

func GetCurrentTodo(data *types.TranscriptData) *types.TodoItem

GetCurrentTodo returns the in-progress todo, if any

func GetRunningAgents

func GetRunningAgents(data *types.TranscriptData) []types.AgentEntry

GetRunningAgents returns only agents with status "running"

func GetRunningTools

func GetRunningTools(data *types.TranscriptData) []types.ToolEntry

GetRunningTools returns only tools with status "running"

func GetSessionDuration

func GetSessionDuration(data *types.TranscriptData) string

GetSessionDuration returns the session duration as a formatted string

func GetTodoProgress

func GetTodoProgress(data *types.TranscriptData) (completed, total int)

GetTodoProgress returns completed count and total count

func Parse

func Parse(transcriptPath string) *types.TranscriptData

Parse reads the transcript file and extracts tools, agents, and todos

Types

type ContentBlock

type ContentBlock struct {
	Type      string          `json:"type"`        // "tool_use", "tool_result", "text"
	ID        string          `json:"id"`          // tool_use_id
	ToolUseID string          `json:"tool_use_id"` // for tool_result
	Name      string          `json:"name"`
	Input     json.RawMessage `json:"input"`
	Content   string          `json:"content"` // for tool_result
	IsError   bool            `json:"is_error"`
}

ContentBlock represents a content block in a message

type TodoInput

type TodoInput struct {
	ID      string `json:"id"`
	Subject string `json:"subject"`
	Status  string `json:"status"`
}

TodoInput represents a todo item from TodoWrite

type ToolInput

type ToolInput struct {
	// For file operations (Read, Edit, Write, Glob, Grep)
	FilePath string `json:"file_path"`
	Path     string `json:"path"`
	Pattern  string `json:"pattern"`
	Command  string `json:"command"`

	// For Task (subagents)
	SubagentType string `json:"subagent_type"`
	Description  string `json:"description"`
	Prompt       string `json:"prompt"`
	Model        string `json:"model"`

	// For TodoWrite
	Todos []TodoInput `json:"todos"`
}

ToolInput holds common tool input fields

type TranscriptEntry

type TranscriptEntry struct {
	Timestamp string `json:"timestamp"`
	Type      string `json:"type"` // "assistant", "user", "result"
	Message   struct {
		Content []ContentBlock `json:"content"`
	} `json:"message"`
}

TranscriptEntry represents a single entry in the transcript JSONL

Jump to

Keyboard shortcuts

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