Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrJobQueueFull = fmt.Errorf("job queue is full") ErrJobQueueClosed = fmt.Errorf("job queue is closed") )
View Source
var ErrnoAssistantMarker = fmt.Errorf("\n%s%s\n\n", `No Go code requiring AI assistant generation was detected. To trigger the AI assistant, ensure the following conditions are met: 1. Define a function in Go code. 2. Add detailed function comments (used as AI prompts). 3. Add panic("implement me") inside the function body. Example:`, fmt.Sprintf(` %s func MyFuncName() { %s }`, color.HiCyanString("// Describe the specific functionality of the function"), color.HiCyanString(`panic("implement me")`)))
nolint
Functions ¶
func ChatCommand ¶ added in v1.13.0
ChatCommand chat with AI Assistant
func CleanUpAssistantCode ¶ added in v1.13.0
CleanUpAssistantCode clean up all assistant generated code
func MergeAssistantCode ¶ added in v1.13.0
MergeAssistantCode merge AI assistant generated code into source Go file
Types ¶
type Reply ¶ added in v1.13.0
type Reply struct { JobID int `json:"jobID"` ErrMsg string `json:"errMsg"` SrcFile string `json:"srcFile"` Functions []string `json:"functions"` Prompt string `json:"prompt"` Contents map[string]string `json:"contents"` // reply contents }
Reply execute assistant task result
type WorkerPool ¶ added in v1.13.0
type WorkerPool struct {
// contains filtered or unexported fields
}
WorkerPool represents a worker pool
func NewWorkerPool ¶ added in v1.13.0
NewWorkerPool creates a new worker pool
func (*WorkerPool) Results ¶ added in v1.13.0
func (wp *WorkerPool) Results() <-chan Result
Results returns the result channel
func (*WorkerPool) Start ¶ added in v1.13.0
func (wp *WorkerPool) Start()
Start starts the worker pool
func (*WorkerPool) Submit ¶ added in v1.13.0
func (wp *WorkerPool) Submit(job Job, timeout time.Duration) error
Submit submits a task to the worker pool
func (*WorkerPool) Wait ¶ added in v1.13.0
func (wp *WorkerPool) Wait()
Wait waits for all workers to complete and closes the result channel
Click to show internal directories.
Click to hide internal directories.