Documentation
¶
Overview ¶
Package transcript contains provider-neutral transcript formatting helpers shared by assistant persistence and terminal presentation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CanMergeStreamingRole ¶
CanMergeStreamingRole reports whether adjacent streaming transcript blocks with the same role can be joined without changing their meaning.
func FormatToolEventDisplay ¶
FormatToolEventDisplay formats a tool event for terminal display.
func FormatToolEventPersistence ¶
FormatToolEventPersistence formats a tool event for durable transcript storage.
func ToDatabaseRole ¶
ToDatabaseRole converts a transcript role into a durable database role.
Types ¶
type Role ¶
type Role string
Role identifies a transcript message category independent from storage roles.
const ( // RoleUser is a user-authored prompt. RoleUser Role = "user" // RoleAssistant is an assistant response. RoleAssistant Role = "assistant" // RoleToolResult is output from a tool execution. RoleToolResult Role = "toolResult" // RoleThinking is model reasoning or thinking text. RoleThinking Role = "thinking" // RoleCustom is extension-provided context. RoleCustom Role = "custom" // RoleBashExecution is output from a user-run shell command. RoleBashExecution Role = "bashExecution" // RoleBranchSummary is summary context for an abandoned branch. RoleBranchSummary Role = "branchSummary" // RoleCompactionSummary is summary context for compacted history. RoleCompactionSummary Role = "compactionSummary" )
func FromDatabaseRole ¶
FromDatabaseRole converts a durable database role into a transcript role.
Click to show internal directories.
Click to hide internal directories.