JetBrains: clear last autocomplete candidate after acceptance (#56505)

clear last candidate after acceptance
This commit is contained in:
Chris Warwick 2023-09-12 05:12:21 -04:00 committed by GitHub
parent 83166945fa
commit ccb7e35979
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 0 deletions

View File

@ -61,4 +61,7 @@ public interface CodyAgentServer {
@JsonNotification("debug/message")
void debugMessage(DebugMessage message);
@JsonNotification("autocomplete/clearLastCandidate")
void autocompleteClearLastCandidate();
}

View File

@ -51,6 +51,7 @@ public class AcceptCodyAutocompleteAction extends EditorAction {
CodyAutocompleteManager.getInstance().getCurrentAutocompleteTelemetry();
GraphQlLogger.logAutocompleteAcceptedEvent(
project, telemetry != null ? telemetry.params() : null);
server.autocompleteClearLastCandidate();
acceptAgentAutocomplete(editor, maybeCaret);
} else {
Optional.ofNullable(maybeCaret)