When a user types, chances are the model will anticipate what they are
about to do. Previously, we would continuously cancel the pending
completion until the user stopped typing. With this commit, we allow at
most two completions to race with each other (the first and the last
one):
- If the completion that was requested first completes first, we will
show it (assuming we can interpolate it) but avoid canceling the last
one.
- When the completion that was requested last completes, we will cancel
the first one if it's pending.
In both cases, if a completion is already on-screen we have a special
case for when the completions are just insertions and the new completion
is a superset of the existing one. In this case, we will replace the
existing completion with the new one. Otherwise we will keep showing the
old one to avoid thrashing the UI.
This should make latency a lot better. Note that I also reduced the
debounce timeout to 8ms.
Release Notes:
- N/A
This PR adds keyboard shortcuts to common interactions you might want to
do in the Zeta rating panel.
This PR also adds a way to fake inline completion requests, as well as
the test data used to create this PR, to make it easier to adjust the UI
in the future.
It also changes the status bar from the text "Zeta" to "ζ", because I
thought it looked cool.
Release Notes:
- N/A