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

Function taskPluginProtocolEventsTerminal

controller/plugin_protocol.go:1209–1217  ·  view source on GitHub ↗
(events []dto.PluginResponsesStreamEvent)

Source from the content-addressed store, hash-verified

1207}
1208
1209func taskPluginProtocolEventsTerminal(events []dto.PluginResponsesStreamEvent) bool {
1210 for _, event := range events {
1211 switch event.Type {
1212 case "response.completed", "response.failed", "response.incomplete":
1213 return true
1214 }
1215 }
1216 return false
1217}
1218
1219func writeTaskPluginProtocolEvent(c *gin.Context, event dto.PluginResponsesStreamEvent) error {
1220 encoded, err := common.Marshal(event)

Callers 1

streamTaskPluginProtocolFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected