agent

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: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Agent

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

func New

func New(cfg *config.Config, workspaceManager *workspace.Manager) *Agent

func (*Agent) CleanupAfterPRClosed

func (a *Agent) CleanupAfterPRClosed(ctx context.Context, pr *github.PullRequest) error

CleanupAfterPRClosed PR 关闭后清理工作区、映射、执行的code session和删除CodeAgent创建的分支

func (*Agent) ContinuePRFromReviewComment

func (a *Agent) ContinuePRFromReviewComment(ctx context.Context, event *github.PullRequestReviewCommentEvent, args string) error

ContinuePRFromReviewComment continues processing tasks from PR code line comments

func (*Agent) ContinuePRFromReviewCommentWithAI

func (a *Agent) ContinuePRFromReviewCommentWithAI(ctx context.Context, event *github.PullRequestReviewCommentEvent, aiModel, args string) error

ContinuePRFromReviewCommentWithAI continues processing tasks from PR code line comments, supporting AI models

func (*Agent) ContinuePRWithArgs

func (a *Agent) ContinuePRWithArgs(ctx context.Context, event *github.IssueCommentEvent, args string) error

ContinuePRWithArgs continues processing tasks in PR, supporting command parameters

func (*Agent) ContinuePRWithArgsAndAI

func (a *Agent) ContinuePRWithArgsAndAI(ctx context.Context, event *github.IssueCommentEvent, aiModel, args string) error

ContinuePRWithArgsAndAI continues processing tasks in PR, supporting command parameters and AI models

func (*Agent) FixPR

func (a *Agent) FixPR(ctx context.Context, pr *github.PullRequest) error

FixPR fixes issues in PR

func (*Agent) FixPRFromReviewComment

func (a *Agent) FixPRFromReviewComment(ctx context.Context, event *github.PullRequestReviewCommentEvent, args string) error

FixPRFromReviewComment 从 PR 代码行评论修复问题

func (*Agent) FixPRFromReviewCommentWithAI

func (a *Agent) FixPRFromReviewCommentWithAI(ctx context.Context, event *github.PullRequestReviewCommentEvent, aiModel, args string) error

FixPRFromReviewCommentWithAI 从 PR 代码行评论修复问题,支持AI模型

func (*Agent) FixPRWithArgs

func (a *Agent) FixPRWithArgs(ctx context.Context, event *github.IssueCommentEvent, args string) error

FixPRWithArgs fixes issues in PR, supporting command parameters

func (*Agent) FixPRWithArgsAndAI

func (a *Agent) FixPRWithArgsAndAI(ctx context.Context, event *github.IssueCommentEvent, aiModel, args string) error

FixPRWithArgsAndAI fixes issues in PR, supporting command parameters and AI models

func (*Agent) ProcessIssueComment

func (a *Agent) ProcessIssueComment(ctx context.Context, event *github.IssueCommentEvent) error

ProcessIssueComment processes Issue comment events, including complete repository information

func (*Agent) ProcessIssueCommentWithAI

func (a *Agent) ProcessIssueCommentWithAI(ctx context.Context, event *github.IssueCommentEvent, aiModel, args string) error

ProcessIssueCommentWithAI processes Issue comment events with support for specifying AI models

func (*Agent) ProcessPRFromReviewWithTriggerUser

func (a *Agent) ProcessPRFromReviewWithTriggerUser(ctx context.Context, event *github.PullRequestReviewEvent, command string, args string, triggerUser string) error

ProcessPRFromReviewWithTriggerUser 从 PR review 批量处理多个 review comments 并在反馈中@用户

func (*Agent) ProcessPRFromReviewWithTriggerUserAndAI

func (a *Agent) ProcessPRFromReviewWithTriggerUserAndAI(ctx context.Context, event *github.PullRequestReviewEvent, command string, aiModel, args string, triggerUser string) error

ProcessPRFromReviewWithTriggerUserAndAI 从 PR review 批量处理多个 review comments 并在反馈中@用户,支持AI模型

func (*Agent) ReviewPR

func (a *Agent) ReviewPR(ctx context.Context, pr *github.PullRequest) error

ReviewPR 审查 PR

func (*Agent) StartCleanupRoutine

func (a *Agent) StartCleanupRoutine()

StartCleanupRoutine starts the periodic cleanup routine

type EnhancedAgent

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

EnhancedAgent 增强版Agent,集成了新的组件架构

func NewEnhancedAgent

func NewEnhancedAgent(cfg *config.Config, workspaceManager *workspace.Manager) (*EnhancedAgent, error)

NewEnhancedAgent 创建增强版Agent

func (*EnhancedAgent) GetMCPManager

func (a *EnhancedAgent) GetMCPManager() mcp.MCPManager

GetMCPManager 获取MCP管理器(用于外部扩展)

func (*EnhancedAgent) GetModeManager

func (a *EnhancedAgent) GetModeManager() *modes.Manager

GetModeManager 获取模式管理器(用于外部扩展)

func (*EnhancedAgent) ProcessGitHubWebhookEvent

func (a *EnhancedAgent) ProcessGitHubWebhookEvent(ctx context.Context, eventType string, deliveryID string, payload []byte) error

ProcessGitHubWebhookEvent 处理来自Webhook的GitHub事件(推荐方法)

func (*EnhancedAgent) Shutdown

func (a *EnhancedAgent) Shutdown(ctx context.Context) error

Shutdown 关闭增强版Agent

Jump to

Keyboard shortcuts

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