MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / syncPluginModelRuntime

Method syncPluginModelRuntime

sdk/cliproxy/service.go:206–222  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

204}
205
206func (s *Service) syncPluginModelRuntime(ctx context.Context) {
207 if s == nil || s.pluginHost == nil || s.coreManager == nil {
208 return
209 }
210 if ctx == nil {
211 ctx = context.Background()
212 }
213 s.pluginHost.RegisterModels(ctx, registry.GetGlobalRegistry())
214 s.registerAvailableExecutors(ctx, executorRegistrationOptions{
215 includeBaseline: s.cfg != nil && s.cfg.Home.Enabled,
216 includePlugins: true,
217 forceReplaceAuths: true,
218 auths: s.coreManager.List(),
219 })
220 s.refreshPluginModelRegistrations(ctx)
221 s.coreManager.RefreshSchedulerAll()
222}
223
224func (s *Service) refreshPluginModelRegistrations(ctx context.Context) {
225 if s == nil || s.pluginHost == nil || s.coreManager == nil {

Callers 3

syncPluginRuntimeMethod · 0.95
RunMethod · 0.95

Calls 6

GetGlobalRegistryFunction · 0.92
RefreshSchedulerAllMethod · 0.80
RegisterModelsMethod · 0.65
ListMethod · 0.65

Tested by

no test coverage detected