Documentation
¶
Index ¶
- Variables
- func CopyFileObject(filePath string) error
- func EstimateTokens(text string) int
- func GetCurrentTimeMillis() int64
- func IsHiddenPath(path string) bool
- func IsTextFile(filePath string) (bool, error)
- func NormalizeGlobPattern(pattern, absRoot string) (string, bool)
- func ParseSizeString(sizeStr string) (int64, error)
- func VersionInfo() string
Constants ¶
This section is empty.
Variables ¶
var ( Version = "dev" CommitSHA = "unknown" )
Functions ¶
func CopyFileObject ¶
CopyFileObject attempts to place a "file object" onto the clipboard. - On macOS, it calls AppleScript to set the clipboard to a POSIX file reference. - On non-macOS, it does nothing.
func EstimateTokens ¶
EstimateTokens provides a rough estimate of the number of tokens in the given text. This is based on the heuristic that one token is approximately four characters.
func GetCurrentTimeMillis ¶ added in v1.1.0
func GetCurrentTimeMillis() int64
GetCurrentTimeMillis returns the current time in milliseconds
func IsHiddenPath ¶
IsHiddenPath checks if any component of the path starts with a dot.
func IsTextFile ¶
IsTextFile returns true if the file at filePath appears to be a text file. It checks the content type and also looks for null bytes.
func NormalizeGlobPattern ¶ added in v1.0.7
NormalizeGlobPattern takes a glob pattern and the absolute project root path, then returns a normalized pattern for matching against relative file paths, and a boolean indicating if the pattern is valid and should be used.
func ParseSizeString ¶ added in v1.0.6
ParseSizeString converts a human-readable size string (e.g., "100kb", "2MB") into bytes (int64).
func VersionInfo ¶
func VersionInfo() string
Types ¶
This section is empty.