-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Autocomplete: Track inserted completions #1380
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🔥
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
New data incoming! 🎉
// When a document is rename, the TextDocument instance will still work | ||
// however the URI it resolves to will be outdated. Ensure we never use it. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🦸♂️
logCompletionEvent('persistence:present', { | ||
id: trackedCompletion.id, | ||
afterSec: MEASURE_TIMEOUTS[measureTimeoutsIndex] / 1000, | ||
isMostlyUnchanged, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to log this flag? Might as well use the difference
field we already have and define the isMostlyUnchanged
value in the analytics dashboard.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
const initialText = trackedCompletion.completion.insertText | ||
const latestText = trackedCompletion.document.getText(trackedCompletion.latestRange) | ||
|
||
if (latestText.length === 0) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if it's possible, but we might want to filter out items where initialText.length === 0
too
return levenshtein(A, B) | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we remove this helper (LevenshteinCompare
) altogether because it doesn't add value?
Adds tracking for inserted completion after 30 seconds, 2 minutes, 5 minutes, 10 minutes.
This also replaces our levenshtein comparator since I found a bug in the current implementation (see the added test case for more context).
Test plan