MCPcopy Index your code
hub / github.com/github/copilot-sdk / Invoke

Method Invoke

go/session.go:271–284  ·  view source on GitHub ↗
(request *rpc.CanvasProviderInvokeActionRequest)

Source from the content-addressed store, hash-verified

269}
270
271func (a *canvasClientSessionAdapter) Invoke(request *rpc.CanvasProviderInvokeActionRequest) (any, error) {
272 if request == nil {
273 return nil, canvasJSONRPCError(NewCanvasError("canvas_handler_unset", "missing canvas action request"))
274 }
275 handler, err := a.resolveHandler(canvasProviderSessionID(request))
276 if err != nil {
277 return nil, err
278 }
279 result, actionErr := handler.OnAction(context.Background(), *request)
280 if actionErr != nil {
281 return nil, canvasResultError(actionErr)
282 }
283 return result, nil
284}
285
286func (a *canvasClientSessionAdapter) Open(request *rpc.CanvasProviderOpenRequest) (*rpc.CanvasProviderOpenResult, error) {
287 if request == nil {

Callers

nothing calls this directly

Calls 6

resolveHandlerMethod · 0.95
canvasJSONRPCErrorFunction · 0.85
NewCanvasErrorFunction · 0.85
canvasProviderSessionIDFunction · 0.85
canvasResultErrorFunction · 0.85
OnActionMethod · 0.65

Tested by

no test coverage detected