question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Inline completion brace completion API callback

See original GitHub issue

The brace completion API for inline completions is called after a prediction is returned from the inlineCompletionProvider. As the provider, we don’t have information as to what changes were made with the prediction post brace completion. This negatively impacts our telemetry accuracy. We analyze our telemetry to show better and more useful predictions to the user. Below are some examples:

  1. When we send a completion such as }, we have telemetry collected as a completion was shown to the user. But actually, this prediction is not shown to the user because brace completion filters it out since it’s an unbalanced brace.
  2. We monitor number of characters in completion vs accept rate (number of completions accepted / number of completions shown). When brace completion makes changes to a prediction returned by us, we don’t have accurate measurements on how many characters were actually shown.

A callback with what completion was shown to user post brace completion would be incredibly helpful for our telemetry accuracy. Alternatively, the ability to call brace completion within the inlineCompletionProvider would also work.

cc @hediet

Issue Analytics

  • State:open
  • Created a year ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
juihanamshet1commented, Aug 30, 2022

Another idea I have is to add an arg in HandleDidShowCompletion which will be set to the insertText after brace completion.

0reactions
juihanamshet1commented, Aug 31, 2022

Awesome, thank you! I found a bug in handleDidShowCompletion, it would be great if we can get it resolved along with this change, it will really augment the accuracy of our telemetry.

Read more comments on GitHub >

github_iconTop Results From Across the Web

VS Code API | Visual Studio Code Extension API
A cancellation token is passed to an asynchronous or long running operation to request cancellation, like cancelling a request for completion items because...
Read more >
How to turn off brackets/quotes auto-completion in Visual Studio
Once downloaded go to Tools - Options - Productivity Power Tools - then on the right you will see auto Brace Completion. Turn...
Read more >
Asynchronous programming in Office Add-ins - Microsoft Learn
Asynchronous programming using nested callback functions. Frequently, you need to perform two or more asynchronous operations to complete a task ...
Read more >
Closures — The Swift Programming Language (Swift 5.7)
Closure expressions are a way to write inline closures in a brief, ... The first closure is a completion handler that displays a...
Read more >
When should I use curly braces { } and parenthesis ( ) in React?
Curly braces { } are special syntax in JSX. It is used to evaluate a JavaScript expression during compilation. A JavaScript expression can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found