Documentation
¶
Index ¶
- Variables
- func ApplyCommitToNewRepo(originalRepo *git.Repository, newRepoPath, commitID, newMessage string) error
- func CheckOllamaAvailability() error
- func ConfigureNewRepository(sourceRepoPath, newRepoPath string) error
- func CreateNewRepository(sourceRepoPath string, targetRepoName string, defaultBranch string) error
- func EstimateTokenCount(text string) int
- func ExecuteCommand(command string, args []string, dir string) error
- func GenerateNewCommitMessage(commit models.CommitOutput, model string, temperature float64, contextSize int) (models.NewCommitMessage, error)
- func GenerateSimplifiedCommitMessage(commit models.CommitOutput, model string, temperature float64, contextSize int) (string, error)
- func GetCommandOutput(command string, args []string, dir string) (string, error)
- func GetCommitsChronological(repo *git.Repository, maxMsgLength, maxDiffLength int) ([]models.CommitOutput, []models.CommitOutput, error)
- func GetCommitsToRewrite(repo *git.Repository, maxMsgLength, maxDiffLength int) ([]models.CommitOutput, error)
- func GetCurrentBranchName(repoPath string) (string, error)
- func GetDefaultBranchName(repoPath string) (string, error)
- func GetModelContextSize(model string) (int, error)
- func GetRemoteOriginURL(repoPath string) (string, error)
- func GetRepoName(repoPath string) string
- func RewordCommit(repoPath, targetCommit, newMessage string) error
- func SendOllamaMessage(model string, messages []ollama.Message, format json.RawMessage, ...) (string, error)
Constants ¶
This section is empty.
Variables ¶
var MockUpdateStatusForTests bool
MockUpdateStatusForTests is a flag that can be set to disable UI updates during testing
Functions ¶
func ApplyCommitToNewRepo ¶ added in v0.2.0
func ApplyCommitToNewRepo(originalRepo *git.Repository, newRepoPath, commitID, newMessage string) error
ApplyCommitToNewRepo applies a commit from the original repo to the new repo
func CheckOllamaAvailability ¶ added in v0.2.0
func CheckOllamaAvailability() error
CheckOllamaAvailability checks if the Ollama server is available
func ConfigureNewRepository ¶ added in v0.2.0
ConfigureNewRepository sets up the new repository with the same branch name and remote as the source
func CreateNewRepository ¶ added in v0.2.0
CreateNewRepository creates a new empty git repository at the specified path with the given default branch name The new repository is created as a sibling directory to the source repository
func EstimateTokenCount ¶ added in v0.2.0
EstimateTokenCount provides a rough estimate of token count for text
func ExecuteCommand ¶
ExecuteCommand runs a command and returns an error if it fails
func GenerateNewCommitMessage ¶
func GenerateNewCommitMessage(commit models.CommitOutput, model string, temperature float64, contextSize int) (models.NewCommitMessage, error)
GenerateNewCommitMessage generates a new commit message using Ollama
func GenerateSimplifiedCommitMessage ¶ added in v0.2.0
func GenerateSimplifiedCommitMessage(commit models.CommitOutput, model string, temperature float64, contextSize int) (string, error)
GenerateSimplifiedCommitMessage generates a one-line commit message for large commits
func GetCommandOutput ¶
GetCommandOutput runs a command and returns its output
func GetCommitsChronological ¶ added in v0.2.0
func GetCommitsChronological(repo *git.Repository, maxMsgLength, maxDiffLength int) ([]models.CommitOutput, []models.CommitOutput, error)
GetCommitsChronological returns ALL commits from oldest to newest
func GetCommitsToRewrite ¶
func GetCommitsToRewrite(repo *git.Repository, maxMsgLength, maxDiffLength int) ([]models.CommitOutput, error)
GetCommitsToRewrite gets a list of commits that need to be rewritten
func GetCurrentBranchName ¶ added in v0.2.0
GetCurrentBranchName gets the name of the current branch
func GetDefaultBranchName ¶ added in v0.2.0
GetDefaultBranchName gets the default branch name of the repository
func GetModelContextSize ¶ added in v0.2.0
GetModelContextSize retrieves the context window size for a model
func GetRemoteOriginURL ¶ added in v0.2.0
GetRemoteOriginURL gets the URL of the remote origin
func GetRepoName ¶
GetRepoName extracts the name of a repository from its path
func RewordCommit ¶
RewordCommit changes the message of a specific git commit
func SendOllamaMessage ¶
func SendOllamaMessage(model string, messages []ollama.Message, format json.RawMessage, temperature float64) (string, error)
SendOllamaMessage sends a request to the Ollama API
Types ¶
This section is empty.