processor

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2025 License: MIT Imports: 17 Imported by: 0

Documentation

Index

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 ParseCommaSeparated(input string) []string

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 Config

type Config struct {
	DirPath           string
	Extensions        []string
	Excludes          []string
	GitIgnore         bool
	Filter            *filter.Filter
	RelevanceKeywords string // Keywords for relevance filtering
	MaxTokens         int    // Maximum token budget (0 = unlimited)
	ExplainSelection  bool   // Show priority scoring breakdown
}

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

type ExcludedFileInfo struct {
	Path   string
	Tokens int
}

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)

Jump to

Keyboard shortcuts

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