agent

package
v0.28.4 Latest Latest
Warning

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

Go to latest
Published: Jan 10, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckGoModExists

func CheckGoModExists() bool

CheckGoModExists は go.mod があるか確認

func RunGoFmt

func RunGoFmt(filePath string) (string, error)

RunGoFmt は go fmt を実行

func RunGoTest

func RunGoTest(filePath string) (string, bool, error)

RunGoTest は go test を実行(該当パッケージのみ)

func RunInteractive

func RunInteractive(model string, provider api.Provider)

func RunInteractiveWithResume

func RunInteractiveWithResume(model string, provider api.Provider)

func RunOnce

func RunOnce(query string, model string)

Types

type Agent

type Agent struct {
	Model           string // 初期モデル(後方互換性のため保持)
	CurrentModel    string // 現在のモデル(再起動なしで切り替え可能)
	CurrentProvider api.Provider
	ProviderName    string
	History         []api.Message
	SystemPrompt    string
	// contains filtered or unexported fields
}

Agent はCLIエージェント

func NewAgent

func NewAgent(model string, provider api.Provider) *Agent

NewAgent は新しいAgentを作成

func (*Agent) Cleanup

func (a *Agent) Cleanup()

Cleanup はエージェントのリソースをクリーンアップ

type VerifyResult

type VerifyResult struct {
	NeedsVerify  bool     // 検証が必要か
	FileType     string   // "go", "js", "py" など
	ChangedFiles []string // 変更されたファイル
	FmtResult    string   // go fmt の結果
	TestResult   string   // go test の結果
	TestPassed   bool     // テスト成功したか
}

VerifyResult は検証結果

func ShouldVerify

func ShouldVerify(filePath string) *VerifyResult

ShouldVerify は変更されたファイルが検証対象かを判定

Jump to

Keyboard shortcuts

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