Documentation
¶
Index ¶
- Constants
- type CopilotTool
- func (t *CopilotTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string
- func (t *CopilotTool) Definition() mcp.Tool
- func (t *CopilotTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, ...) (*mcp.CallToolResult, error)
- func (t *CopilotTool) FilterOutput(output string) string
- func (t *CopilotTool) GetMaxResponseSize() int
- func (t *CopilotTool) GetTimeout() int
- func (t *CopilotTool) ProvideExtendedInfo() *tools.ExtendedHelp
Constants ¶
View Source
const ( DefaultTimeout = 180 // 3 minutes default timeout DefaultMaxResponseSize = 2 * 1024 * 1024 // 2MB default limit AgentMaxResponseSizeEnvVar = "AGENT_MAX_RESPONSE_SIZE" AgentTimeoutEnvVar = "AGENT_TIMEOUT" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CopilotTool ¶
type CopilotTool struct{}
CopilotTool implements the tools.Tool interface for GitHub Copilot CLI
func (*CopilotTool) ApplyResponseSizeLimit ¶
func (t *CopilotTool) ApplyResponseSizeLimit(output string, logger *logrus.Logger) string
ApplyResponseSizeLimit truncates the response if it exceeds the configured size limit
func (*CopilotTool) Definition ¶
func (t *CopilotTool) Definition() mcp.Tool
Definition returns the tool's definition for MCP registration
func (*CopilotTool) Execute ¶
func (t *CopilotTool) Execute(ctx context.Context, logger *logrus.Logger, cache *sync.Map, args map[string]any) (*mcp.CallToolResult, error)
Execute executes the tool's logic by calling the Copilot CLI
func (*CopilotTool) FilterOutput ¶
func (t *CopilotTool) FilterOutput(output string) string
FilterOutput removes Copilot-specific metadata from output
func (*CopilotTool) GetMaxResponseSize ¶
func (t *CopilotTool) GetMaxResponseSize() int
GetMaxResponseSize returns the configured maximum response size
func (*CopilotTool) GetTimeout ¶
func (t *CopilotTool) GetTimeout() int
GetTimeout returns the configured timeout or default
func (*CopilotTool) ProvideExtendedInfo ¶
func (t *CopilotTool) ProvideExtendedInfo() *tools.ExtendedHelp
ProvideExtendedInfo provides detailed usage information for the Copilot agent tool
Click to show internal directories.
Click to hide internal directories.