Documentation
¶
Index ¶
- Variables
- func BlameCmd() *cobra.Command
- func CatCmd() *cobra.Command
- func FormatMessagesHumanReadable(messages []json.RawMessage, indent string) string
- func FormatMessagesHumanReadable_OLD(messages []json.RawMessage, indent string) string
- func HookCmd() *cobra.Command
- func InitCmd() *cobra.Command
- func LogCmd() *cobra.Command
- func RenderGraph(steps []index.StepInfo, s *store.Store) ([]string, error)
- func RenderGraphLine(node *GraphNode, layout *GraphLayout, nextNode *GraphNode) string
- func SessionsCmd() *cobra.Command
- func ShowCmd() *cobra.Command
- func StatusCmd() *cobra.Command
- func VersionCmd() *cobra.Command
- type DefaultFormatter
- type EnrichedCause
- type EnrichedStep
- type FileDiff
- type GraphLayout
- type GraphNode
- type JSONFormatter
- type LogFormat
- type LogFormatter
- type OnelineFormatter
- type StatFormatter
Constants ¶
This section is empty.
Variables ¶
var ( // Version is set at build time via -ldflags Version = "dev" // Commit is set at build time via -ldflags Commit = "unknown" )
Functions ¶
func FormatMessagesHumanReadable ¶ added in v0.2.0
func FormatMessagesHumanReadable(messages []json.RawMessage, indent string) string
FormatMessagesHumanReadable converts raw message JSON into readable conversation format
func FormatMessagesHumanReadable_OLD ¶ added in v0.2.0
func FormatMessagesHumanReadable_OLD(messages []json.RawMessage, indent string) string
PLACEHOLDER - will implement proper parsing once we understand the format
func RenderGraph ¶ added in v0.2.0
RenderGraph generates ASCII graph prefixes for each step Returns a slice of prefixes, one per step, in the same order as input
func RenderGraphLine ¶ added in v0.2.0
func RenderGraphLine(node *GraphNode, layout *GraphLayout, nextNode *GraphNode) string
RenderGraphLine generates the ASCII art prefix for a single step
Types ¶
type DefaultFormatter ¶
type DefaultFormatter struct {
NoColor bool
}
DefaultFormatter produces timeline view with arrows
func (*DefaultFormatter) Format ¶
func (f *DefaultFormatter) Format(steps []EnrichedStep, sessionID string, showConversation bool, showFiles bool, w io.Writer) error
type EnrichedCause ¶ added in v0.2.0
type EnrichedCause struct {
Cause store.Cause
Args json.RawMessage
Result json.RawMessage
}
type EnrichedStep ¶
type EnrichedStep struct {
StepInfo index.StepInfo
Causes []EnrichedCause
Files []string
FileDiffs []FileDiff // Actual file changes (parent → current)
Args json.RawMessage
Result json.RawMessage
Duration time.Duration
Messages []json.RawMessage // Conversation transcript
GraphPrefix string // ASCII graph line prefix (if graph enabled)
Warnings []string // Non-fatal data recovery or display issues
}
EnrichedStep contains a step with all its related data
type FileDiff ¶ added in v0.2.0
type FileDiff struct {
Path string
Status string // "added", "modified", "deleted"
Additions int
Deletions int
IsBinary bool
}
FileDiff represents a file change between steps
type GraphLayout ¶ added in v0.2.0
type GraphLayout struct {
Nodes []*GraphNode
ColumnMap map[store.Hash]int // stepHash → column
MaxColumns int
}
GraphLayout holds the column assignments for rendering
func LayoutGraph ¶ added in v0.2.0
func LayoutGraph(nodes []*GraphNode) *GraphLayout
LayoutGraph assigns columns to each node using a topological layout
type GraphNode ¶ added in v0.2.0
type GraphNode struct {
StepHash store.Hash
Parents []store.Hash // [primary, secondary if exists]
Children []store.Hash // Derived from parent pointers
Column int // Display column (0-based)
SessionID string
}
GraphNode represents a step in the graph with its relationships
type JSONFormatter ¶
type JSONFormatter struct{}
JSONFormatter produces machine-readable JSON output
func (*JSONFormatter) Format ¶
func (f *JSONFormatter) Format(steps []EnrichedStep, sessionID string, showConversation bool, showFiles bool, w io.Writer) error
type LogFormatter ¶
type LogFormatter interface {
Format(steps []EnrichedStep, sessionID string, showConversation bool, showFiles bool, w io.Writer) error
}
LogFormatter formats steps for output
type OnelineFormatter ¶
type OnelineFormatter struct{}
OnelineFormatter produces compact one-line-per-step output
func (*OnelineFormatter) Format ¶
func (f *OnelineFormatter) Format(steps []EnrichedStep, sessionID string, showConversation bool, showFiles bool, w io.Writer) error
type StatFormatter ¶
type StatFormatter struct{}
StatFormatter shows file statistics
func (*StatFormatter) Format ¶
func (f *StatFormatter) Format(steps []EnrichedStep, sessionID string, showConversation bool, showFiles bool, w io.Writer) error