Skip to content

refactor(cs): Refactor and optimize active stream checking

Paul Slaughter requested to merge ps-refactor-and-optimize-stream-checking into main

Description

This MR refactors and optimizes how we check for whether to go down the streaming branch or default branch.

  • Change: If there's an active stream at the current position, we do not need to check for intention.
  • Change: If we are going down the default branch, let's go ahead and cancel out all other streams.
  • Refactor: Move things over to privates for better encapsulation
  • Refactor: Add provideDefaultInlineCompletionItems private method so that we are not creating a closure for this on every keystroke.

Screenshots

With streamCodeGenerations FF on With streamCodeGenerations FF off Code completion still works
Screenshot_2023-12-20_at_1.44.42_PM Screenshot_2023-12-20_at_1.45.07_PM Screenshot_2023-12-20_at_1.52.26_PM
Edited by Paul Slaughter

Merge request reports