-
Notifications
You must be signed in to change notification settings - Fork 335
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure precomputed intent is not stale (#6572)
closes: https://linear.app/sourcegraph/issue/CODY-4613/non-deterministic-intent-detection We precompute the intent while the user is typing the input with a 300ms debounce. It is possible that after the last intent detection the user may change the query and submit within 300ms, causing the detected intent to be stale and often different than the intent for the final query. This PR fixes that behavior by checking if the query has changed since the last intent detection and ignoring the pre-computed intent in case the query was changed afterwards. ## Test plan https://sourcegraph.slack.com/archives/C07EQBRSF35/p1735859984632339 ## Changelog <!-- OPTIONAL; info at https://www.notion.so/sourcegraph/Writing-a-changelog-entry-dd997f411d524caabf0d8d38a24a878c -->
- Loading branch information
1 parent
13bd58e
commit 359e040
Showing
1 changed file
with
33 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters