consts

package
v3.0.2 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package consts defines constants for gitflow-toolkit.

Index

Constants

View Source
const (
	Feat     = "feat"
	Fix      = "fix"
	Docs     = "docs"
	Style    = "style"
	Refactor = "refactor"
	Test     = "test"
	Chore    = "chore"
	Perf     = "perf"
	Hotfix   = "hotfix"
)

Commit types following Angular commit message specification.

View Source
const (
	CmdCommit = "ci"
	CmdPush   = "ps"
)

Command aliases for git subcommands.

View Source
const (
	// LuckyCommitBinary is the name of the lucky_commit executable.
	LuckyCommitBinary = "lucky_commit"

	// LuckyCommitMaxLen is the maximum length of lucky commit prefix.
	LuckyCommitMaxLen = 12

	// LuckyCommitURL is the download URL for lucky_commit.
	LuckyCommitURL = "https://github.com/not-an-aardvark/lucky-commit"
)

Lucky commit constants.

View Source
const (
	LLMDefaultDiffContext    = 5
	LLMDefaultRequestTimeout = 2 * time.Minute
	LLMDefaultRetries        = 0
	LLMDefaultLang           = "en"
	LLMDefaultTemperature    = 0.3
	LLMDefaultConcurrency    = 3
)

LLM defaults.

View Source
const (
	LLMHostOllama     = "http://localhost:11434"
	LLMHostOpenRouter = "https://openrouter.ai"
	LLMHostGroq       = "https://api.groq.com"
	LLMHostOpenAI     = "https://api.openai.com"
	LLMHostDeepSeek   = "https://api.deepseek.com"
	LLMHostMistral    = "https://api.mistral.ai"
)

LLM provider hosts (OpenAI-compatible APIs only).

View Source
const (
	LLMPathOllama     = "/api/generate"
	LLMPathOpenAI     = "/v1/chat/completions"        // OpenAI, DeepSeek, Mistral, most compatible APIs
	LLMPathOpenRouter = "/api/v1/chat/completions"    // OpenRouter
	LLMPathGroq       = "/openai/v1/chat/completions" // Groq
)

LLM API paths for chat completions.

View Source
const (
	LLMLangEN        = "en"
	LLMLangZH        = "zh"
	LLMLangBilingual = "bilingual"
)

LLM language options.

View Source
const (
	LLMModelOllama     = "qwen2.5-coder:7b"
	LLMModelOpenRouter = "mistralai/devstral-2512:free"
)

LLM default models.

View Source
const (
	// LLMDefaultFilePrompt is the system prompt for analyzing individual file diffs.
	LLMDefaultFilePrompt = "You are a git diff analyzer. Output only a brief summary, no formatting."

	// LLMCommitPromptEN is the system prompt for generating commit messages in English.
	LLMCommitPromptEN = `` /* 604-byte string literal not displayed */

	// LLMCommitPromptZH is the system prompt for generating commit messages in Chinese.
	LLMCommitPromptZH = `` /* 580-byte string literal not displayed */

	// LLMCommitPromptBilingual is the system prompt for generating bilingual commit messages.
	LLMCommitPromptBilingual = `` /* 674-byte string literal not displayed */

)

LLM default prompts (can be overridden via gitconfig).

View Source
const (
	// BinaryName is the name of the main binary.
	BinaryName = "gitflow-toolkit"

	// GitCommandPrefix is the prefix for git subcommands.
	GitCommandPrefix = "git-"

	// DefaultInstallDir is the default installation directory.
	DefaultInstallDir = "/usr/local/bin"

	// TempFilePrefix is the prefix for temporary files.
	TempFilePrefix = "gitflow"
)

Binary and path constants.

Variables

View Source
var CommitTypes = []CommitType{
	{Feat, "Introducing new features"},
	{Fix, "Bug fix"},
	{Docs, "Writing docs"},
	{Style, "Improving structure/format of the code"},
	{Refactor, "Refactoring code"},
	{Test, "When adding missing tests"},
	{Chore, "Changing CI/CD"},
	{Perf, "Improving performance"},
	{Hotfix, "Bug fix urgently"},
}

CommitTypes returns all available commit types with descriptions.

Functions

func SymlinkCommands

func SymlinkCommands() []string

SymlinkCommands returns all symlink command names (without git- prefix).

Types

type CommitType

type CommitType struct {
	Name        string
	Description string
}

CommitType represents a commit type with its name and description.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL