Documentation
¶
Index ¶
- Constants
- func GetEnvWithPrefix(env EnvKey) string
- type DefaultGitService
- func (s *DefaultGitService) DiffCommit(ref string, diffOptions git.DiffOptions) (git.DiffResult, error)
- func (s *DefaultGitService) DiffRefs(refFrom string, refTo string, diffOptions git.DiffOptions) (git.DiffResult, error)
- func (s *DefaultGitService) DiffStaged(diffOptions git.DiffOptions) (git.DiffResult, error)
- type DefaultLLMService
- type DefaultServiceProvider
- type DefaultTUIService
- type DefaultTextFormatService
- type EnvKey
- type GitService
- type LLMService
- type ServiceProvider
- type TUIService
- type TextFormatService
Constants ¶
View Source
const ( DefaultDiffTokenLimit = 100_000 AppKey = "DIFFAI" )
Variables ¶
This section is empty.
Functions ¶
func GetEnvWithPrefix ¶ added in v0.1.1
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 (p *DefaultServiceProvider) Format() TextFormatService
func (*DefaultServiceProvider) Git ¶ added in v0.1.1
func (p *DefaultServiceProvider) Git() GitService
func (*DefaultServiceProvider) LLM ¶ added in v0.1.1
func (p *DefaultServiceProvider) LLM() LLMService
func (*DefaultServiceProvider) TUI ¶ added in v0.1.1
func (p *DefaultServiceProvider) TUI() TUIService
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 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 ¶
Click to show internal directories.
Click to hide internal directories.