app

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultDiffTokenLimit = 100_000
	AppKey                = "DIFFAI"
)

Variables

This section is empty.

Functions

func GetEnvWithPrefix added in v0.1.1

func GetEnvWithPrefix(env EnvKey) string

Types

type DefaultGitService

type DefaultGitService struct{}

func (*DefaultGitService) DiffCommit

func (s *DefaultGitService) DiffCommit(ref string, diffOptions git.DiffOptions) (git.DiffResult, error)

func (*DefaultGitService) DiffRefs

func (s *DefaultGitService) DiffRefs(refFrom string, refTo string, diffOptions git.DiffOptions) (git.DiffResult, error)

func (*DefaultGitService) DiffStaged

func (s *DefaultGitService) DiffStaged(diffOptions git.DiffOptions) (git.DiffResult, error)

type DefaultLLMService

type DefaultLLMService struct{}

func (*DefaultLLMService) NewClient

func (s *DefaultLLMService) NewClient(provider llm.LLMProvider, opts llm.LLMClientOptions) (llm.LLMClient, error)

type DefaultServiceProvider added in v0.1.1

type DefaultServiceProvider struct {
	// contains filtered or unexported fields
}

func (*DefaultServiceProvider) Format added in v0.1.1

func (*DefaultServiceProvider) Git added in v0.1.1

func (*DefaultServiceProvider) LLM added in v0.1.1

func (*DefaultServiceProvider) TUI added in v0.1.1

type DefaultTUIService

type DefaultTUIService struct{}

func (*DefaultTUIService) InitialModel

func (s *DefaultTUIService) InitialModel(opts ui.InitialModelOptions) ui.ChatTUIModel

func (*DefaultTUIService) Run

func (s *DefaultTUIService) Run(model ui.ChatTUIModel) (returnModel tea.Model, returnErr error)

type DefaultTextFormatService

type DefaultTextFormatService struct{}

func (*DefaultTextFormatService) FormatMarkdown

func (s *DefaultTextFormatService) FormatMarkdown(text string) (string, error)

type EnvKey added in v0.1.1

type EnvKey = string
const (
	EnvDiffTokenLimit EnvKey = "DIFF_TOKEN_LIMIT"
	EnvModel          EnvKey = "MODEL"
	EnvProvider       EnvKey = "PROVIDER"
	EnvPrompt         EnvKey = "PROMPT"
)

type GitService

type GitService interface {
	DiffStaged(diffOptions git.DiffOptions) (git.DiffResult, error)
	DiffRefs(refFrom string, refTo string, diffOptions git.DiffOptions) (git.DiffResult, error)
	DiffCommit(ref string, diffOptions git.DiffOptions) (git.DiffResult, error)
}

type LLMService

type LLMService interface {
	NewClient(provider llm.LLMProvider, opts llm.LLMClientOptions) (llm.LLMClient, error)
}

type ServiceProvider added in v0.1.1

type ServiceProvider interface {
	Git() GitService
	TUI() TUIService
	LLM() LLMService
	Format() TextFormatService
}

func NewDefaultServiceProvider added in v0.1.1

func NewDefaultServiceProvider() ServiceProvider

type TUIService

type TUIService interface {
	InitialModel(opts ui.InitialModelOptions) ui.ChatTUIModel
	Run(model ui.ChatTUIModel) (returnModel tea.Model, returnErr error)
}

type TextFormatService

type TextFormatService interface {
	FormatMarkdown(text string) (string, error)
}

Jump to

Keyboard shortcuts

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