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

Method Init

internal/appapi/providers.go:124–133  ·  view source on GitHub ↗

Init creates the SQLite app state database and deletes the legacy providers.json.

(ctx context.Context)

Source from the content-addressed store, hash-verified

122
123// Init creates the SQLite app state database and deletes the legacy providers.json.
124func (api ProviderAPI) Init(ctx context.Context) (OperationResult, error) {
125 if err := api.prepareProviderOperation(); err != nil {
126 return OperationResult{}, err
127 }
128 store := api.store()
129 if err := store.Init(ctx); err != nil {
130 return OperationResult{}, err
131 }
132 return OperationResult{OK: true, Message: fmt.Sprintf("SQLite app state ready at %s", store.Path()), Path: store.Path()}, nil
133}
134
135// File returns providers in providers.File shape for adapters that still need existing helpers.
136func (api ProviderAPI) File(ctx context.Context) (providers.File, error) {

Calls 3

storeMethod · 0.95
PathMethod · 0.45