Skip to content

Commit

Permalink
send event only when inline suggestion is called for within the file
Browse files Browse the repository at this point in the history
  • Loading branch information
ganeshrn committed Jul 21, 2023
1 parent 4dd6c3e commit 7643b36
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/features/lightspeed/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,10 @@ export class LightSpeedManager {
const currentFileContent = document.getText();
const documentUri = document.uri.toString();
let activityId: string;

if (!this.lightSpeedActivityTracker.hasOwnProperty(documentUri)) {
// Inline suggestion not yet triggered, return without sending event.
return;
}
if (this.lightSpeedActivityTracker.hasOwnProperty(documentUri)) {
activityId = this.lightSpeedActivityTracker[documentUri].activityId;
const previousFileContent =
Expand Down

0 comments on commit 7643b36

Please sign in to comment.