interaction

package
v0.0.0-...-e487a75 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2025 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GitHubCommentClient

type GitHubCommentClient interface {
	CreateComment(ctx context.Context, owner, repo string, issueNumber int, body string) (*githubapi.IssueComment, error)
	UpdateComment(ctx context.Context, owner, repo string, commentID int64, body string) error
}

GitHubCommentClient GitHub评论客户端接口

type ProgressCommentManager

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

ProgressCommentManager 进度评论管理器

func NewProgressCommentManager

func NewProgressCommentManager(github GitHubCommentClient, repo *githubapi.Repository, issueNumber int) *ProgressCommentManager

NewProgressCommentManager 创建进度评论管理器

func (*ProgressCommentManager) FinalizeComment

func (pcm *ProgressCommentManager) FinalizeComment(ctx context.Context, result *models.ProgressExecutionResult) error

FinalizeComment 完成评论(最终状态)

func (*ProgressCommentManager) GetContext

func (pcm *ProgressCommentManager) GetContext() *models.CommentContext

GetContext 获取评论上下文

func (*ProgressCommentManager) GetTracker

func (pcm *ProgressCommentManager) GetTracker() *models.ProgressTracker

GetTracker 获取进度跟踪器

func (*ProgressCommentManager) HideSpinner

func (pcm *ProgressCommentManager) HideSpinner(ctx context.Context) error

HideSpinner 隐藏Spinner动画

func (*ProgressCommentManager) InitializeProgress

func (pcm *ProgressCommentManager) InitializeProgress(ctx context.Context, tasks []*models.Task) error

InitializeProgress 初始化进度评论

func (*ProgressCommentManager) SetTestMode

func (pcm *ProgressCommentManager) SetTestMode(testMode bool)

SetTestMode 设置测试模式(用于测试中禁用频率限制)

func (*ProgressCommentManager) ShowSpinner

func (pcm *ProgressCommentManager) ShowSpinner(ctx context.Context, message string) error

ShowSpinner 显示Spinner动画

func (*ProgressCommentManager) UpdateTask

func (pcm *ProgressCommentManager) UpdateTask(ctx context.Context, taskID string, status models.TaskStatus, message ...string) error

UpdateTask 更新任务状态

type TaskDefinition

type TaskDefinition struct {
	Name        string            `json:"name"`
	Description string            `json:"description"`
	Metadata    map[string]string `json:"metadata,omitempty"`
}

TaskDefinition 任务定义

type TaskFactory

type TaskFactory struct{}

TaskFactory 任务工厂 为不同的操作类型创建预定义的任务列表

func NewTaskFactory

func NewTaskFactory() *TaskFactory

NewTaskFactory 创建任务工厂

func (*TaskFactory) CreateBatchReviewTasks

func (tf *TaskFactory) CreateBatchReviewTasks() []*models.Task

CreateBatchReviewTasks 创建批量Review处理任务列表 对应PR Review中的批量命令处理

func (*TaskFactory) CreateCustomTasks

func (tf *TaskFactory) CreateCustomTasks(taskDefinitions []TaskDefinition) []*models.Task

CreateCustomTasks 创建自定义任务列表

func (*TaskFactory) CreateIssueProcessingTasks

func (tf *TaskFactory) CreateIssueProcessingTasks() []*models.Task

CreateIssueProcessingTasks 创建Issue处理任务列表 对应 /code 命令的处理流程

func (*TaskFactory) CreatePRContinueTasks

func (tf *TaskFactory) CreatePRContinueTasks() []*models.Task

CreatePRContinueTasks 创建PR继续任务列表 对应 /continue 命令的处理流程

func (*TaskFactory) CreatePRFixTasks

func (tf *TaskFactory) CreatePRFixTasks() []*models.Task

CreatePRFixTasks 创建PR修复任务列表 对应 /fix 命令的处理流程

func (*TaskFactory) CreatePRReviewTasks

func (tf *TaskFactory) CreatePRReviewTasks() []*models.Task

CreatePRReviewTasks 创建PR审查任务列表 对应自动PR审查流程

func (*TaskFactory) GetTasksForCommand

func (tf *TaskFactory) GetTasksForCommand(command string, isPR bool) []*models.Task

GetTasksForCommand 根据命令类型获取任务列表

func (*TaskFactory) GetTasksForOperation

func (tf *TaskFactory) GetTasksForOperation(operation string) []*models.Task

GetTasksForOperation 根据操作类型获取任务列表

Jump to

Keyboard shortcuts

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