Documentation
¶
Index ¶
- func CompactCWD(cwd string) string
- func CountPlans(messages []Message) int
- func FormatDuration(d time.Duration) string
- func FormatPlan(p Plan) string
- func FormatRelativeTime(t time.Time, now time.Time) string
- func FormatToolCounts(counts map[string]int) string
- func IsRejectedToolResultContent(content string) bool
- func ProjectName(cwd string) string
- func SetNowForTesting(now func() time.Time) func()
- func Truncate(s string, maxLen int) string
- func TruncatePreserveNewlines(s string, maxLen int) string
- type ActionOutcomeCounts
- type ActionTarget
- type ActionTargetType
- type ActivityBucketRow
- type Conversation
- func (c Conversation) CacheKey() string
- func (c Conversation) Description() string
- func (c Conversation) DisplayName() string
- func (c Conversation) Duration() time.Duration
- func (c Conversation) FilePaths() []string
- func (c Conversation) FilterValue() string
- func (c Conversation) FirstMessage() string
- func (c Conversation) GitBranch() string
- func (c Conversation) ID() string
- func (c Conversation) IsSubagent() bool
- func (c Conversation) LatestFilePath() string
- func (c Conversation) MainMessageCount() int
- func (c Conversation) Model() string
- func (c Conversation) PartCount() int
- func (c *Conversation) PrecomputeDisplay()
- func (c Conversation) ResumeCWD() string
- func (c Conversation) ResumeID() string
- func (c Conversation) ResumeTarget() ResumeTarget
- func (c *Conversation) SetSearchPreview(preview string)
- func (c Conversation) Timestamp() time.Time
- func (c Conversation) Title() string
- func (c Conversation) TotalMessageCount() int
- func (c Conversation) TotalTokenUsage() TokenUsage
- func (c Conversation) TotalToolCounts() map[string]int
- func (c Conversation) Version() string
- type DiffHunk
- type Message
- type MessagePerformanceMeta
- type MessageVisibility
- type NormalizedAction
- type NormalizedActionType
- type PerformanceSequenceSession
- type Plan
- type Project
- type Provider
- type Ref
- type ResumeTarget
- type Role
- type Session
- type SessionMeta
- type SessionPerformanceMeta
- type SessionStatsData
- type SessionTurnMetrics
- type TokenUsage
- type ToolCall
- type ToolOutcomeCounts
- type ToolResult
- type TurnTokens
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CompactCWD ¶
func CountPlans ¶
func FormatDuration ¶
func FormatPlan ¶
func FormatRelativeTime ¶ added in v0.2.0
func FormatToolCounts ¶
func IsRejectedToolResultContent ¶ added in v0.2.0
func ProjectName ¶
func SetNowForTesting ¶ added in v0.2.0
Types ¶
type ActionOutcomeCounts ¶ added in v0.2.0
type ActionOutcomeCounts struct {
Calls map[string]int
Errors map[string]int
Rejections map[string]int
}
func DeriveActionOutcomeCounts ¶ added in v0.2.0
func DeriveActionOutcomeCounts(messages []Message) ActionOutcomeCounts
type ActionTarget ¶ added in v0.2.0
type ActionTarget struct {
Type ActionTargetType
Value string
}
type ActionTargetType ¶ added in v0.2.0
type ActionTargetType string
const ( ActionTargetFilePath ActionTargetType = "file_path" ActionTargetPattern ActionTargetType = "pattern" ActionTargetQuery ActionTargetType = "query" ActionTargetURL ActionTargetType = "url" ActionTargetCommand ActionTargetType = "command" ActionTargetPlanPath ActionTargetType = "plan_path" )
type ActivityBucketRow ¶ added in v0.3.0
type Conversation ¶
type Conversation struct {
Ref Ref
Name string
Project Project
Sessions []SessionMeta
PlanCount int
SearchPreview string
// contains filtered or unexported fields
}
func (Conversation) CacheKey ¶
func (c Conversation) CacheKey() string
func (Conversation) Description ¶
func (c Conversation) Description() string
func (Conversation) DisplayName ¶
func (c Conversation) DisplayName() string
func (Conversation) Duration ¶
func (c Conversation) Duration() time.Duration
func (Conversation) FilePaths ¶
func (c Conversation) FilePaths() []string
func (Conversation) FilterValue ¶
func (c Conversation) FilterValue() string
func (Conversation) FirstMessage ¶
func (c Conversation) FirstMessage() string
func (Conversation) GitBranch ¶
func (c Conversation) GitBranch() string
func (Conversation) ID ¶
func (c Conversation) ID() string
func (Conversation) IsSubagent ¶
func (c Conversation) IsSubagent() bool
func (Conversation) LatestFilePath ¶
func (c Conversation) LatestFilePath() string
func (Conversation) MainMessageCount ¶
func (c Conversation) MainMessageCount() int
func (Conversation) Model ¶
func (c Conversation) Model() string
func (Conversation) PartCount ¶
func (c Conversation) PartCount() int
func (*Conversation) PrecomputeDisplay ¶
func (c *Conversation) PrecomputeDisplay()
PrecomputeDisplay eagerly caches derived list-display fields for a value conversation. This is the deliberate exception to the value-receiver rule.
func (Conversation) ResumeCWD ¶
func (c Conversation) ResumeCWD() string
func (Conversation) ResumeID ¶
func (c Conversation) ResumeID() string
func (Conversation) ResumeTarget ¶
func (c Conversation) ResumeTarget() ResumeTarget
func (*Conversation) SetSearchPreview ¶
func (c *Conversation) SetSearchPreview(preview string)
func (Conversation) Timestamp ¶
func (c Conversation) Timestamp() time.Time
func (Conversation) Title ¶
func (c Conversation) Title() string
func (Conversation) TotalMessageCount ¶
func (c Conversation) TotalMessageCount() int
func (Conversation) TotalTokenUsage ¶
func (c Conversation) TotalTokenUsage() TokenUsage
func (Conversation) TotalToolCounts ¶
func (c Conversation) TotalToolCounts() map[string]int
func (Conversation) Version ¶
func (c Conversation) Version() string
type Message ¶
type Message struct {
Role Role
Text string
Thinking string
HasHiddenThinking bool
ToolCalls []ToolCall
ToolResults []ToolResult
Plans []Plan
Visibility MessageVisibility
IsSidechain bool
IsAgentDivider bool
Usage TokenUsage
Performance MessagePerformanceMeta
Timestamp time.Time
}
func (Message) HasThinking ¶
type MessagePerformanceMeta ¶ added in v0.2.0
type MessageVisibility ¶
type MessageVisibility string
const ( MessageVisibilityVisible MessageVisibility = "" MessageVisibilityHiddenSystem MessageVisibility = "hidden_system" )
type NormalizedAction ¶ added in v0.2.0
type NormalizedAction struct {
Type NormalizedActionType
Targets []ActionTarget
}
func (NormalizedAction) IsZero ¶ added in v0.2.0
func (a NormalizedAction) IsZero() bool
type NormalizedActionType ¶ added in v0.2.0
type NormalizedActionType string
const ( NormalizedActionRead NormalizedActionType = "read" NormalizedActionSearch NormalizedActionType = "search" NormalizedActionMutate NormalizedActionType = "mutate" NormalizedActionRewrite NormalizedActionType = "rewrite" NormalizedActionExecute NormalizedActionType = "execute" NormalizedActionTest NormalizedActionType = "test" NormalizedActionBuild NormalizedActionType = "build" NormalizedActionWeb NormalizedActionType = "web" NormalizedActionPlan NormalizedActionType = "plan" NormalizedActionDelegate NormalizedActionType = "delegate" NormalizedActionOther NormalizedActionType = "other" )
type PerformanceSequenceSession ¶ added in v0.3.0
type PerformanceSequenceSession struct {
Timestamp time.Time
Mutated bool
MutationCount int
RewriteCount int
TargetedMutationCount int
BlindMutationCount int
DistinctMutationTargets int
PatchHunkCount int
VerificationPassed bool
FirstPassResolved bool
CorrectionFollowups int
ReasoningLoopCount int
ActionCount int
ActionsBeforeFirstMutation int
TokensBeforeFirstMutation int
UserTurnsBeforeFirstMutation int
AssistantTurns int
VisibleReasoningChars int
HiddenThinkingTurns int
}
type ResumeTarget ¶
type Session ¶
type Session struct {
Meta SessionMeta
Messages []Message
}
type SessionMeta ¶
type SessionMeta struct {
ID string
Provider Provider
Project Project
Slug string
Timestamp time.Time
LastTimestamp time.Time
CWD string
GitBranch string
Version string
Model string
FirstMessage string
MessageCount int
MainMessageCount int
UserMessageCount int
AssistantMessageCount int
FilePath string
TotalUsage TokenUsage
ToolCounts map[string]int
ToolErrorCounts map[string]int
ToolRejectCounts map[string]int
ActionCounts map[string]int
ActionErrorCounts map[string]int
ActionRejectCounts map[string]int
Performance SessionPerformanceMeta
IsSubagent bool
}
func (SessionMeta) Description ¶
func (s SessionMeta) Description() string
func (SessionMeta) DisplaySlug ¶
func (s SessionMeta) DisplaySlug() string
func (SessionMeta) Duration ¶
func (s SessionMeta) Duration() time.Duration
func (SessionMeta) FilterValue ¶
func (s SessionMeta) FilterValue() string
func (SessionMeta) Title ¶
func (s SessionMeta) Title() string
type SessionPerformanceMeta ¶ added in v0.2.0
type SessionPerformanceMeta struct {
ReasoningBlockCount int
ReasoningRedactionCount int
MaxThinkingTokens int
ModelContextWindow int
DurationMS int
RetryAttemptCount int
RetryDelayMS int
MaxRetries int
AbortCount int
CompactionCount int
MicroCompactionCount int
TaskStartedCount int
TaskCompleteCount int
ContextCompactedCount int
RateLimitSnapshotCount int
APIErrorCounts map[string]int
StopReasonCounts map[string]int
PhaseCounts map[string]int
EffortCounts map[string]int
ServerToolUseCounts map[string]int
ServiceTierCounts map[string]int
SpeedCounts map[string]int
}
type SessionStatsData ¶ added in v0.3.0
type SessionStatsData struct {
PerformanceSequence PerformanceSequenceSession
TurnMetrics SessionTurnMetrics
}
type SessionTurnMetrics ¶ added in v0.3.0
type SessionTurnMetrics struct {
Provider Provider
Version string
Timestamp time.Time
Turns []TurnTokens
}
type TokenUsage ¶
type TokenUsage struct {
InputTokens int
CacheCreationInputTokens int
CacheReadInputTokens int
OutputTokens int
ReasoningOutputTokens int
}
func (TokenUsage) PromptTokens ¶ added in v0.3.0
func (u TokenUsage) PromptTokens() int
func (TokenUsage) TotalTokens ¶
func (u TokenUsage) TotalTokens() int
type ToolCall ¶
type ToolCall struct {
Name string
Summary string
Action NormalizedAction
}
type ToolOutcomeCounts ¶ added in v0.2.0
type ToolOutcomeCounts struct {
Calls map[string]int
Errors map[string]int
Rejections map[string]int
}
func DeriveToolOutcomeCounts ¶ added in v0.2.0
func DeriveToolOutcomeCounts(messages []Message) ToolOutcomeCounts
type ToolResult ¶
type ToolResult struct {
ToolName string
ToolSummary string
Content string
IsError bool
StructuredPatch []DiffHunk
Action NormalizedAction
}
func (ToolResult) IsRejected ¶ added in v0.2.0
func (r ToolResult) IsRejected() bool
type TurnTokens ¶ added in v0.3.0
Click to show internal directories.
Click to hide internal directories.