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

Method Remove

internal/appapi/providers.go:210–218  ·  view source on GitHub ↗

Remove deletes a provider.

(ctx context.Context, name string)

Source from the content-addressed store, hash-verified

208
209// Remove deletes a provider.
210func (api ProviderAPI) Remove(ctx context.Context, name string) (OperationResult, error) {
211 if err := api.prepareProviderOperation(); err != nil {
212 return OperationResult{}, err
213 }
214 if !api.store().RemoveProvider(ctx, name) {
215 return OperationResult{}, fmt.Errorf("provider %q not found: %w", name, providers.ErrNotFound)
216 }
217 return OperationResult{OK: true, Message: fmt.Sprintf("Removed provider %q", name), Path: api.dbPath()}, nil
218}
219
220// SetEnabled toggles a provider's enabled state.
221func (api ProviderAPI) SetEnabled(ctx context.Context, name string, enabled bool) (Provider, error) {

Callers 15

TestProviderAPIMutationsFunction · 0.95
UninstallFunction · 0.45
downloadBranchZipMethod · 0.45
providerRemoveCommandMethod · 0.45
writeManagedFileFunction · 0.45
UpdateMethod · 0.45
DeleteMethod · 0.45
retargetSymlinkFunction · 0.45
removeInstalledFileFunction · 0.45
symlinksWorkFunction · 0.45
loadRemoteWithCacheFunction · 0.45

Calls 4

storeMethod · 0.95
dbPathMethod · 0.95
RemoveProviderMethod · 0.80

Tested by 3

TestProviderAPIMutationsFunction · 0.76
symlinksWorkFunction · 0.36