Documentation
¶
Index ¶
- func FormatDryRunOutput(result *DryRunResult, config Config) string
- func GetMetadataSummary(config Config, result *ProcessResult, infoOnly bool) (string, error)
- func ParseCommaSeparated(input string) []string
- func Run(dirPath string, extension string, exclude string, noCopy bool, infoOnly bool, ...) error
- type Config
- type ConfigSummary
- type DryRunResult
- type ExcludedFileInfo
- type FilePriorityInfo
- type ProcessResult
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatDryRunOutput ¶ added in v0.3.0
func FormatDryRunOutput(result *DryRunResult, config Config) string
FormatDryRunOutput formats the dry-run preview results for display
func GetMetadataSummary ¶
func GetMetadataSummary(config Config, result *ProcessResult, infoOnly bool) (string, error)
GetMetadataSummary returns a summary of project metadata and analysis If infoOnly is true, returns a rich summary with all details Otherwise returns a minimal summary with basic project info
func ParseCommaSeparated ¶
func Run ¶
func Run(dirPath string, extension string, exclude string, noCopy bool, infoOnly bool, verbose bool, outputFormat string, outFile string, debug bool, gitignore bool, useDefaultRules bool, dryRun bool, quiet bool, relevanceKeywords string, maxTokens int, explainSelection bool) error
Run executes the promptext tool with the given configuration
Types ¶
type ConfigSummary ¶ added in v0.3.0
type ConfigSummary struct {
Extensions []string
Excludes []string
UseGitIgnore bool
UseDefaultRules bool
Format string
OutputFile string
}
ConfigSummary contains effective configuration information
type DryRunResult ¶ added in v0.3.0
type DryRunResult struct {
FilePaths []string
EstimatedTokens int
ConfigSummary *ConfigSummary
ProjectInfo *info.ProjectInfo
}
DryRunResult contains dry-run preview information
func PreviewDirectory ¶ added in v0.3.0
func PreviewDirectory(config Config) (*DryRunResult, error)
PreviewDirectory performs a dry-run preview of what files would be processed
type ExcludedFileInfo ¶ added in v0.4.0
ExcludedFileInfo contains information about an excluded file
type FilePriorityInfo ¶ added in v0.4.0
type FilePriorityInfo struct {
Path string
Tokens int
Score float64
IsEntry bool
IsTest bool
IsConfig bool
Depth int
Included bool
}
FilePriorityInfo contains information about a file's priority for explain-selection
type ProcessResult ¶
type ProcessResult struct {
ProjectOutput *format.ProjectOutput
DisplayContent string
ClipboardContent string
TokenCount int // Token count for included files
TotalTokens int // Total tokens if all files were included
ProjectInfo *info.ProjectInfo
ExcludedFiles int // Number of files excluded due to token budget
ExcludedFileList []ExcludedFileInfo // Details of excluded files
PriorityList []FilePriorityInfo // Priority breakdown for explain-selection
}
ProcessResult contains both display and clipboard content
func ProcessDirectory ¶
func ProcessDirectory(config Config, verbose bool) (*ProcessResult, error)