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

Method Abort

go/session.go:1709–1716  ·  view source on GitHub ↗

Abort aborts the currently processing message in this session. Use this to cancel a long-running request. The session remains valid and can continue to be used for new messages. Returns an error if the session has been disconnected or the connection fails. Example: // Start a long-running reque

(ctx context.Context)

Source from the content-addressed store, hash-verified

1707// log.Printf("Failed to abort: %v", err)
1708// }
1709func (s *Session) Abort(ctx context.Context) error {
1710 _, err := s.client.Request(ctx, "session.abort", sessionAbortRequest{SessionID: s.SessionID})
1711 if err != nil {
1712 return fmt.Errorf("failed to abort session: %w", err)
1713 }
1714
1715 return nil
1716}
1717
1718// SetModelOptions configures optional parameters for SetModel.
1719type SetModelOptions struct {

Callers

nothing calls this directly

Calls 1

RequestMethod · 0.45

Tested by

no test coverage detected