services

package
v0.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 2, 2025 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var MockUpdateStatusForTests bool

MockUpdateStatusForTests is a flag that can be set to disable UI updates during testing

Functions

func ExecuteCommand

func ExecuteCommand(command string, args []string, dir string) error

ExecuteCommand runs a command and returns an error if it fails

func FindCommitByMessage

func FindCommitByMessage(repo *git.Repository, origMsg string) (string, error)

FindCommitByMessage searches for a commit with a specific message

func GenerateNewCommitMessage

func GenerateNewCommitMessage(commit models.CommitOutput, model string, temperature float64) (models.NewCommitMessage, error)

GenerateNewCommitMessage generates a new commit message using Ollama

func GetCommandOutput

func GetCommandOutput(command string, args []string, dir string) (string, error)

GetCommandOutput runs a command and returns its output

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 GetRepoName

func GetRepoName(repoPath string) string

GetRepoName extracts the name of a repository from its path

func RewordCommit

func RewordCommit(repoPath, targetCommit, newMessage string) error

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳