Documentation ¶
Index ¶
- func EstimateTokens(output string) int64
- func GenerateIgnoreList(repoPath, ignoreFilePath string, useGitignore bool) []string
- func MarshalRepo(repo *GitRepo, scrubComments bool) ([]byte, error)
- func OutputGitRepo(repo *GitRepo, preambleFile string, scrubComments bool) (string, error)
- type GitFile
- type GitRepo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EstimateTokens ¶
EstimateTokens estimates the number of tokens in a string
func GenerateIgnoreList ¶
GenerateIgnoreList generates a list of ignore patterns from the .gptignore file and the .gitignore file. Returns a slice of strings. Will return an empty slice if no ignore files exist.
Types ¶
type GitFile ¶
type GitFile struct { Path string `json:"path"` // path to the file relative to the repository root Tokens int64 `json:"tokens"` // number of tokens in the file Contents string `json:"contents"` // contents of the file }
GitFile is a file in a Git repository
Click to show internal directories.
Click to hide internal directories.