MCPcopy Create free account
hub / github.com/QuantumNous/new-api / newTaskPluginSubmitDiagnostics

Function newTaskPluginSubmitDiagnostics

controller/task_plugin_debug.go:21–35  ·  view source on GitHub ↗
(c *gin.Context)

Source from the content-addressed store, hash-verified

19}
20
21func newTaskPluginSubmitDiagnostics(c *gin.Context) taskPluginSubmitDiagnostics {
22 diagnostics := taskPluginSubmitDiagnostics{
23 context: c,
24 pluginKey: c.GetString("expected_task_plugin_key"),
25 }
26 if diagnostics.pluginKey == "" {
27 return diagnostics
28 }
29 if pinnedValue, exists := c.Get(pluginruntime.ContextKeyPinnedPlugin); exists {
30 if pinned, ok := pinnedValue.(pluginruntime.PinnedPlugin); ok && pinned.Generation != nil {
31 diagnostics.generation = pinned.Generation.Number
32 }
33 }
34 return diagnostics
35}
36
37func (d taskPluginSubmitDiagnostics) start(info *relaycommon.RelayInfo) {
38 if d.pluginKey == "" {

Calls 1

GetMethod · 0.45