Documentation ¶
Index ¶
- Constants
- func AppendToTextFile(filePath string, text string) error
- func CalculateSHA256(filePath string) (string, error)
- func CaseInsensitiveFileSearch(targetFile string, fileNames []string) (string, bool)
- func CaseInsensitiveLeadingDirectoriesSearch(targetFile string, projectFileNames []string) []string
- func CheckFilenameCaseCollisions(fileNames []string) bool
- func CheckForPathSeparatorsInFilenames(fileNames []string) bool
- func ConvertFilePathToOSFormat(targetFile string) string
- func FilterRequestedProjectFiles(projectRootDir string, llmRequestedFiles []string, userRequestedFiles []string, ...) []string
- func FindConfigDir() (string, error)
- func FindInFile(filePath string, regexps []*regexp.Regexp) (bool, error)
- func FindInRelativeFile(projectRootDir string, relativeFilePath string, regexps []*regexp.Regexp) (bool, error)
- func FindProjectRoot(logger logging.ILogger) (string, string, error)
- func GetAnnotations(filePath string, fileChecksums map[string]string) (map[string]string, error)
- func GetChangedFiles(filePath string, fileChecksums map[string]string) ([]string, error)
- func GetEnvFloat(vars ...string) (float64, error)
- func GetEnvInt(vars ...string) (int, error)
- func GetEnvString(vars ...string) (string, error)
- func GetEnvUpperString(vars ...string) (string, error)
- func GetProjectFileList(projectRootDir string, perpetualDir string, projectFilesWhitelist []string, ...) (map[string]string, []string, []string, error)
- func GetTextAfterFirstMatch(text, searchRegexp string) (string, error)
- func GetTextAfterFirstMatches(text string, searchRegexps []string) (string, error)
- func GetTextBeforeLastMatch(text, searchRegexp string) (string, error)
- func GetTextBeforeLastMatches(text string, searchRegexps []string) (string, error)
- func LoadEnvFiles(logger logging.ILogger, filePaths ...string)
- func LoadJsonFile(filePath string, v any) error
- func LoadStringPair(file string, minLen int, maxLen int, lenDivideBy int, logger logging.ILogger) []string
- func LoadTextFile(filePath string) (string, error)
- func MakePathRelative(basePath string, filePath string, cdIntoBasePath bool) (string, error)
- func ParseMultiTaggedText(sourceText string, startTagRegexps []string, endTagRegexps []string, ...) ([]string, error)
- func ParseTaggedText(sourceText string, startTagRegexp string, endTagRegexp string, ...) ([]string, error)
- func ReplaceTag(text, searchRegex, replacement string) (string, error)
- func SaveAnnotations(filePath string, checksums map[string]string, annotations map[string]string) error
- func SaveJsonFile(filePath string, v any) error
- func SaveTextFile(filePath string, text string) error
- type AnnotationEntries
- type AnnotationEntry
Constants ¶
View Source
const ( Other textEncoding = iota UTF8 UTF16LE UTF16BE UTF32LE UTF32BE )
View Source
const AnnotationsFileName = ".annotations.json"
View Source
const DotEnvFileName = ".env"
View Source
const StashesDirName = ".stash"
Variables ¶
This section is empty.
Functions ¶
func AppendToTextFile ¶
func CalculateSHA256 ¶
func FilterRequestedProjectFiles ¶ added in v1.7.1
func FindConfigDir ¶ added in v1.7.1
func FindInRelativeFile ¶ added in v1.7.1
func GetAnnotations ¶
func GetChangedFiles ¶
func GetEnvFloat ¶ added in v1.4.1
func GetEnvString ¶ added in v1.4.1
func GetEnvUpperString ¶ added in v1.4.1
func GetProjectFileList ¶
func GetProjectFileList(projectRootDir string, perpetualDir string, projectFilesWhitelist []string, projectFilesBlacklist []string) (map[string]string, []string, []string, error)
Recursively get project files, starting from projectRootDir Return values: - map with checksums of files filtered with whitelist and blacklist - filenames filtered with whitelist and blacklist (relative to projectRootDir) - all filenames processed (relative to projectRootDir) - error, if any
func GetTextAfterFirstMatch ¶
func GetTextAfterFirstMatches ¶ added in v1.4.1
func GetTextBeforeLastMatch ¶
func GetTextBeforeLastMatches ¶ added in v1.4.1
func LoadEnvFiles ¶ added in v1.7.1
func LoadJsonFile ¶
func LoadStringPair ¶ added in v1.4.1
func LoadTextFile ¶
func MakePathRelative ¶
func ParseMultiTaggedText ¶ added in v1.4.1
func ParseMultiTaggedText(sourceText string, startTagRegexps []string, endTagRegexps []string, ignoreUnclosedTagErrors bool) ([]string, error)
Parse text enclosed with multiple start and end tags provided as regexps.
func ParseTaggedText ¶
func ParseTaggedText(sourceText string, startTagRegexp string, endTagRegexp string, ignoreUnclosedTagErrors bool) ([]string, error)
Parse text enclosed with start and end tags provided as regexps.
func ReplaceTag ¶
Search and replace all matches of searchRegex in the text Please, consider not to use it on big texts.
func SaveAnnotations ¶
func SaveJsonFile ¶
func SaveTextFile ¶
Types ¶
type AnnotationEntries ¶
type AnnotationEntries []AnnotationEntry
func (AnnotationEntries) Len ¶
func (entries AnnotationEntries) Len() int
func (AnnotationEntries) Less ¶
func (entries AnnotationEntries) Less(i, j int) bool
func (AnnotationEntries) Swap ¶
func (entries AnnotationEntries) Swap(i, j int)
type AnnotationEntry ¶
Click to show internal directories.
Click to hide internal directories.