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

Function taskPluginProtocolJSONValue

controller/plugin_protocol.go:1169–1175  ·  view source on GitHub ↗

taskPluginProtocolJSONValue encodes a task view for a hook, which receives it parsed from the text.

(view dto.TaskView)

Source from the content-addressed store, hash-verified

1167// taskPluginProtocolJSONValue encodes a task view for a hook, which receives
1168// it parsed from the text.
1169func taskPluginProtocolJSONValue(view dto.TaskView) (any, error) {
1170 encoded, err := common.Marshal(view)
1171 if err != nil {
1172 return nil, err
1173 }
1174 return pluginruntime.RawJSON(encoded), nil
1175}
1176
1177func taskPluginProtocolRendererContext(
1178 request pluginruntime.ProtocolRequestContext,

Calls 1

MarshalMethod · 0.65

Tested by

no test coverage detected