sourcegraph / cody

Type less, code more: Cody is an AI code assistant that uses advanced search and codebase context to help you write and fix code.
https://cody.dev
Apache License 2.0
2.53k stars 261 forks source link

pass AbortSignals in more places #5098

Closed sqs closed 1 month ago

sqs commented 1 month ago

AbortSignals let us cancel potentially resource-intensive tasks when their result is no longer needed. Now we pass them around in more places.

Many methods in the GraphQL client now accept AbortSignals. This preserves the timeouts and timeout-related error behavior.

Test plan

Test with an added 6-second-plus sleep and ensure that the error thrown is an ETIMEDOUT.