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

Method runHandler

go/copilot_request_handler.go:657–673  ·  view source on GitHub ↗
(rctx *CopilotRequestContext, sink *responseSink, exchange *pendingExchange)

Source from the content-addressed store, hash-verified

655}
656
657func (a *copilotRequestAdapter) runHandler(rctx *CopilotRequestContext, sink *responseSink, exchange *pendingExchange) {
658 err := a.handler.handle(rctx, sink)
659 if err != nil {
660 if exchange.ctx.Err() != nil {
661 a.finishCancelled(sink, exchange)
662 return
663 }
664 a.failViaSink(sink, exchange, err.Error())
665 return
666 }
667 exchange.mu.Lock()
668 finished := exchange.finished
669 exchange.mu.Unlock()
670 if !finished {
671 a.failViaSink(sink, exchange, "CopilotRequestHandler returned without finalising the response")
672 }
673}
674
675func (a *copilotRequestAdapter) failViaSink(sink *responseSink, exchange *pendingExchange, message string) {
676 exchange.mu.Lock()

Callers 1

HttpRequestStartMethod · 0.95

Calls 5

finishCancelledMethod · 0.95
failViaSinkMethod · 0.95
handleMethod · 0.65
ErrMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected