MCPcopy Create free account
hub / github.com/Chat2AnyLLM/code-agent-manager / Install

Method Install

internal/desktop/tool_service.go:79–93  ·  view source on GitHub ↗
(name string, dryRun bool)

Source from the content-addressed store, hash-verified

77}
78
79func (s *ToolService) Install(name string, dryRun bool) (OperationResult, error) {
80 tool, err := loadTool(name)
81 if err != nil {
82 return OperationResult{}, err
83 }
84 if dryRun {
85 return OperationResult{OK: true, Message: tool.InstallCmd}, nil
86 }
87 var stdout, stderr bytes.Buffer
88 code, err := tools.Install(tool, nil, &stdout, &stderr)
89 if err != nil {
90 return OperationResult{}, wrapError("TOOL_INSTALL_FAILED", err)
91 }
92 return OperationResult{OK: code == 0, Message: stdout.String() + stderr.String()}, nil
93}
94
95func (s *ToolService) Uninstall(name string, dryRun bool) (OperationResult, error) {
96 tool, err := loadTool(name)

Callers 1

UpgradeMethod · 0.95

Calls 3

InstallFunction · 0.92
loadToolFunction · 0.85
wrapErrorFunction · 0.85

Tested by

no test coverage detected