summary

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AssistantText

func AssistantText(am protocol.AssistantMessage) string

AssistantText returns the text content from an assistant message.

func LastAssistantText

func LastAssistantText(messages []protocol.Message) string

LastAssistantText returns the text from the last assistant message.

Types

type MessageSummary

type MessageSummary struct {
	Role string
	Text string
}

MessageSummary is a simplified transcript entry.

func ToSummaries

func ToSummaries(messages []protocol.Message) []MessageSummary

ToSummaries converts protocol messages to simplified summaries.

type UsageSummary

type UsageSummary struct {
	Input  int
	Output int
	Total  int
}

UsageSummary reports token usage.

func LastUsage

func LastUsage(messages []protocol.Message) *UsageSummary

LastUsage returns usage from the last assistant message, if any.

Jump to

Keyboard shortcuts

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