Changesets · Branches · Tags · Compare
| Changeset | 951aa1c26a3eed1b0fa305a0ebb3d790bf82c1710bf00129cc55ef2fef1ae1a7 |
|---|---|
| Author | shamanic <shamanicbeatbox@gmail.com> · 2025-06-07 04:17 +01:00 |
| Committer | shamanic <shamanicbeatbox@gmail.com> · 2025-06-07 04:17 +01:00 |
| Parents | 190a805117f4 |
1 file changed
modified extensions/vscode/src/commands.ts +9 −2
| @@ -624,9 +624,16 @@ | ||
| 624 | 624 | } |
| 625 | 625 | } |
| 626 | 626 | }, |
| 627 | - "continue.forceAutocomplete": () => { | |
| 627 | + "continue.forceAutocomplete": async () => { | |
| 628 | 628 | captureCommandTelemetry("forceAutocomplete"); |
| 629 | - vscode.commands.executeCommand("editor.action.inlineSuggest.trigger"); | |
| 629 | + | |
| 630 | + // 1. Explicitly hide any existing suggestion. This clears VS Code's cache for the current position. | |
| 631 | + await vscode.commands.executeCommand("editor.action.inlineSuggest.hide"); | |
| 632 | + | |
| 633 | + // 2. Now trigger a new one. VS Code has no cached suggestion, so it's forced to call our provider. | |
| 634 | + await vscode.commands.executeCommand( | |
| 635 | + "editor.action.inlineSuggest.trigger", | |
| 636 | + ); | |
| 630 | 637 | }, |
| 631 | 638 | |
| 632 | 639 | "continue.openTabAutocompleteConfigMenu": async () => { |