MCPcopy Create free account
hub / github.com/github/copilot-sdk / end

Method end

go/copilot_request_handler.go:802–822  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

800}
801
802func (s *responseSink) end() error {
803 s.exchange.mu.Lock()
804 if s.exchange.finished {
805 s.exchange.mu.Unlock()
806 return nil
807 }
808 s.exchange.finished = true
809 s.exchange.mu.Unlock()
810 s.adapter.removePending(s.requestID)
811 api, err := s.rpcAPI()
812 if err != nil {
813 return err
814 }
815 end := true
816 _, err = api.HttpResponseChunk(context.Background(), &rpc.LlmInferenceHTTPResponseChunkRequest{
817 RequestID: s.requestID,
818 Data: "",
819 End: &end,
820 })
821 return err
822}
823
824func (s *responseSink) sinkError(message string, code string) error {
825 s.exchange.mu.Lock()

Callers 2

streamResponseToSinkFunction · 0.45
endMethod · 0.45

Calls 3

rpcAPIMethod · 0.95
removePendingMethod · 0.80
HttpResponseChunkMethod · 0.80

Tested by

no test coverage detected