Documentation
¶
Index ¶
- Constants
- func IsInForeachMode(ctx context.Context) bool
- func WithForeachMode(ctx context.Context) context.Context
- func WithReporter(ctx context.Context, reporter *Reporter) context.Context
- func WithStepInfo(ctx context.Context, info StepInfo) context.Context
- type ProfileTokenUsage
- type Reporter
- func (r *Reporter) BatchComplete()
- func (r *Reporter) BatchProgress(processed, total int)
- func (r *Reporter) BatchStart(inputPath, outputPath string, mutable bool)
- func (r *Reporter) ChunkingStart(strategy string, chunkCount int)
- func (r *Reporter) DocumentComplete(path string, duration time.Duration)
- func (r *Reporter) DocumentError(path string, err error)
- func (r *Reporter) DocumentSkipped(path string, reason string)
- func (r *Reporter) DocumentStart(path string, sizeKB float64)
- func (r *Reporter) ForeachComplete(successCount, totalCount int, duration time.Duration)
- func (r *Reporter) ForeachItem(index, total int, status string)
- func (r *Reporter) ForeachStart(itemCount int)
- func (r *Reporter) GetStats() Stats
- func (r *Reporter) RetryAttempt(attempt, maxAttempts int, delay time.Duration)
- func (r *Reporter) RetryExhausted(maxAttempts int)
- func (r *Reporter) RetrySuccess(attempt int)
- func (r *Reporter) RouterDefault(targetJob string)
- func (r *Reporter) RouterEvaluating()
- func (r *Reporter) RouterMatched(routeName string, targetJob string)
- func (r *Reporter) RouterNoMatch()
- func (r *Reporter) SetForeachMode(inForeach bool)
- func (r *Reporter) SetTokenSource(source TokenSource)
- func (r *Reporter) StepComplete(jobName, stepName string, stepNum, totalSteps int, duration time.Duration, ...)
- func (r *Reporter) StepError(jobName, stepName string, stepNum, totalSteps int, err error)
- func (r *Reporter) StepProgress(message string)
- func (r *Reporter) StepSkipped(jobName, stepName string, stepNum, totalSteps int, reason string)
- func (r *Reporter) StepStart(jobName, stepName string, stepNum, totalSteps int)
- func (r *Reporter) Summary()
- func (r *Reporter) SummaryQuick(docCount int, duration time.Duration)
- func (r *Reporter) ThinkingContent(text string)
- func (r *Reporter) UpdateTokens(inputTokens, outputTokens int)
- func (r *Reporter) WorkflowCompiled(name string, jobCount, stepCount int)
- func (r *Reporter) WorkflowError(err error)
- func (r *Reporter) WorkflowLoading(path string)
- type Stats
- type StepInfo
- type TokenSource
- type TokenUsage
Constants ¶
const ( IconWorkflowLoad = "📋" // Loading workflow file IconWorkflowCompiled = "✅" // Workflow successfully compiled IconWorkflowError = "❌" // Workflow error IconDocumentStart = "📄" // Document processing started IconDocumentComplete = "✅" // Document processed successfully IconDocumentError = "❌" // Document processing error IconDocumentSkipped = "⏭️" // Document skipped IconStepProcessing = "⚙️ " // Step is processing (mutable line) IconStepComplete = "✅" // Step completed successfully IconStepError = "❌" // Step failed with error IconRouterEvaluating = "🧭" // Router evaluating conditions IconRouterMatched = "↳" // Router matched a route (text, not emoji) IconForeachStart = "🔁" // Foreach loop started IconForeachItem = "✅" // Foreach item completed IconRetryAttempt = "🔄" // Retry attempt IconRetrySuccess = "✅" // Retry succeeded IconRetryExhausted = "❌" // All retries exhausted IconBatchProcessing = "📂" // Batch processing IconChunking = "✂️" // Document chunking IconThinking = "💭" // LLM thinking/reasoning content IconSummary = "📊" // Pipeline summary IconWarning = "⚠️" // Warning message )
Icons used for progress reporting - centralized for easy customization
Variables ¶
This section is empty.
Functions ¶
func IsInForeachMode ¶
IsInForeachMode checks if we're currently inside a foreach loop
func WithForeachMode ¶
WithForeachMode marks the context as being inside a foreach loop
func WithReporter ¶
WithReporter embeds a progress reporter in the context
Types ¶
type ProfileTokenUsage ¶
type ProfileTokenUsage struct {
Name string
Usage TokenUsage
}
ProfileTokenUsage represents token usage for a specific profile
type Reporter ¶
type Reporter struct {
// contains filtered or unexported fields
}
Reporter handles all progress output to stderr with educational messages
func FromContext ¶
FromContext extracts the progress reporter from context
func NewWithWriter ¶
NewWithWriter creates a reporter with a custom writer (for testing)
func (*Reporter) BatchComplete ¶
func (r *Reporter) BatchComplete()
BatchComplete finalizes batch progress
func (*Reporter) BatchProgress ¶
BatchProgress reports batch processing progress
func (*Reporter) BatchStart ¶
BatchStart indicates batch processing is starting
func (*Reporter) ChunkingStart ¶
ChunkingStart indicates document is being split
func (*Reporter) DocumentComplete ¶
DocumentComplete indicates successful document completion
func (*Reporter) DocumentError ¶
DocumentError reports a document processing error
func (*Reporter) DocumentSkipped ¶
DocumentSkipped indicates a document was skipped
func (*Reporter) DocumentStart ¶
DocumentStart indicates a document is starting to process
func (*Reporter) ForeachComplete ¶
ForeachComplete indicates foreach loop completed
func (*Reporter) ForeachItem ¶
ForeachItem reports progress on a foreach item
func (*Reporter) ForeachStart ¶
ForeachStart indicates foreach loop is starting
func (*Reporter) RetryAttempt ¶
RetryAttempt indicates a retry is being attempted
func (*Reporter) RetryExhausted ¶
RetryExhausted indicates all retry attempts failed
func (*Reporter) RetrySuccess ¶
RetrySuccess indicates retry succeeded
func (*Reporter) RouterDefault ¶
RouterDefault indicates router is using default route
func (*Reporter) RouterEvaluating ¶
func (r *Reporter) RouterEvaluating()
RouterEvaluating indicates router is evaluating conditions
func (*Reporter) RouterMatched ¶
RouterMatched indicates router matched a route
func (*Reporter) RouterNoMatch ¶
func (r *Reporter) RouterNoMatch()
RouterNoMatch indicates no route was matched
func (*Reporter) SetForeachMode ¶
SetForeachMode sets whether we're inside a foreach loop
func (*Reporter) SetTokenSource ¶
func (r *Reporter) SetTokenSource(source TokenSource)
SetTokenSource sets the token source for final usage reporting
func (*Reporter) StepComplete ¶
func (r *Reporter) StepComplete(jobName, stepName string, stepNum, totalSteps int, duration time.Duration, tokens int)
StepComplete indicates step completion
func (*Reporter) StepProgress ¶
StepProgress updates the current step status (mutable)
func (*Reporter) StepSkipped ¶ added in v0.1.16
StepSkipped indicates step was skipped (e.g., cache hit)
func (*Reporter) SummaryQuick ¶
SummaryQuick prints a compact one-line summary
func (*Reporter) ThinkingContent ¶
ThinkingContent displays LLM thinking/reasoning content This is used when --llm-think is enabled to show intermediate reasoning
func (*Reporter) UpdateTokens ¶
UpdateTokens updates token statistics
func (*Reporter) WorkflowCompiled ¶
WorkflowCompiled indicates successful workflow compilation
func (*Reporter) WorkflowError ¶
WorkflowError reports a workflow-level error
func (*Reporter) WorkflowLoading ¶
WorkflowLoading indicates workflow file is being loaded
type Stats ¶
type Stats struct {
DocsProcessed int
DocsSkipped int
DocsErrors int
TokensInput int
TokensOutput int
Errors []error
}
Stats tracks processing metrics
type StepInfo ¶
StepInfo carries information about the current step execution
func GetStepInfo ¶
GetStepInfo extracts step information from context
type TokenSource ¶
type TokenSource interface {
Usage() TokenUsage
ProfileUsage() []ProfileTokenUsage
}
TokenSource interface for accessing token usage from LLM routers
type TokenUsage ¶
TokenUsage represents token usage statistics