Documentation
¶
Overview ¶
Source: modules/fileread/read/arguments.go:14:119@7197229d.
Index ¶
- Constants
- Variables
- func ExpandMaxTokensOption(arguments []string) []string
- func ParseLineRange(span string) (int, int, error)
- func ParseMaxTokens(value string) (int, error)
- func ParseReadBundle(args []string) ([]ReadSelection, ReaderOptions, error)
- func ParseReadBundleSource(args []string) ([]ReadSelection, ReaderOptions, error)
- func Quote(value string) string
- func QuoteArgument(value string) string
- type ReadSelection
- type ReaderOptions
- type RunOptions
- type SymbolArguments
- type SymbolQuery
Constants ¶
const MaxOutputTokens = 15_500
Source: internal/router/toolplugin/frontend_options.go:11:128@[e702dffa] shared command options.
const MaxTokensArgumentError = "--max-tokens requires one positive integer and cannot repeat"
Variables ¶
var LineRangePattern = regexp.MustCompile(`^[0-9]+[:-][0-9]+$`)
LineRangePattern identifies range operands before command-specific path handling.
Functions ¶
func ExpandMaxTokensOption ¶
Expand only the next option, never operands owned by a command or -- boundary.
func ParseLineRange ¶
ParseLineRange parses canonical inclusive endpoints. Callers impose their own numeric ceiling; zero starts remain available for mcat's first-row convention.
func ParseMaxTokens ¶
func ParseReadBundle ¶
func ParseReadBundle(args []string) ([]ReadSelection, ReaderOptions, error)
ParseReadBundle validates argv without reading content; ambiguous PATH:ROW operands use filesystem metadata to preserve existing literal filenames.
func ParseReadBundleSource ¶
func ParseReadBundleSource(args []string) ([]ReadSelection, ReaderOptions, error)
ParseReadBundleSource validates unevaluated source arguments without filesystem inspection. Ambiguous PATH:ROW operands remain unclassified, even when a literal file with that name exists. Execution uses ParseReadBundle to disambiguate them.
func Quote ¶
Source: libraries/commandanalysis/shellsyntax/source.go:9:12@7197229d. Quote preserves a literal shell argument, including empty strings.
func QuoteArgument ¶
QuoteArgument renders a compact Bash argument, preserving the literal fallback. Source: libraries/commandanalysis/shellsyntax/words.go:210:216@7197229d.
Types ¶
type ReadSelection ¶
ReadSelection is one source and its normalized inclusive range, if present.
type ReaderOptions ¶
func ParseReaderOptions ¶
func ParseReaderOptions(args []string, allowTail bool, defaultBudget int, takesValue string) (ReaderOptions, []string, error)
ParseReaderOptions removes shared reader options and retains the -- boundary and command-specific operands, including the value of takesValue. Source: plugins/common.ts:48:99@[543de4f3] readerOptions
type RunOptions ¶
RunOptions selects the bounded foreground command output.
func ParseRunOptions ¶
func ParseRunOptions(arguments []string) (RunOptions, []string, error)
ParseRunOptions separates mrun options from the untouched child argv.
type SymbolArguments ¶
type SymbolArguments struct {
Queries []SymbolQuery
Workspace string
ExplicitWorkspace bool
Budget int
}
SymbolArguments retains ordered selectors and explicit workspace selection. Parsing does not resolve the directory or grant access to it.
func ParseSymbolQueries ¶
func ParseSymbolQueries(args []string) (SymbolArguments, error)
ParseSymbolQueries validates a complete msymbol invocation without reading sources or starting a resolver. Execution and source display share this grammar.
type SymbolQuery ¶
SymbolQuery selects one semantic definition or reference lookup.