diagnostics

package
v0.0.82 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteEditRetry

func WriteEditRetry(dir string, diag *EditRetryDiagnostic) error

WriteEditRetry writes diagnostic data for a failed edit retry. Creates both a JSON file and a human-readable markdown file.

Types

type EditRetryDiagnostic

type EditRetryDiagnostic struct {
	Timestamp     time.Time `json:"timestamp"`
	Provider      string    `json:"provider"`
	Model         string    `json:"model"`
	FilePath      string    `json:"file_path"`
	AttemptNumber int       `json:"attempt_number"`
	Reason        string    `json:"reason"`

	// Full context
	SystemPrompt string   `json:"system_prompt"`
	UserPrompt   string   `json:"user_prompt"`
	LLMResponse  string   `json:"llm_response"`            // partial output before failure
	FailedSearch string   `json:"failed_search,omitempty"` // for search/replace failures
	DiffLines    []string `json:"diff_lines,omitempty"`    // for unified diff failures
	FileContent  string   `json:"file_content"`            // current file state
}

EditRetryDiagnostic contains diagnostic data for a failed edit that triggered a retry.

Jump to

Keyboard shortcuts

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