mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-20 01:02:02 +00:00
feat: add paste prediction action
This commit is contained in:
parent
43cfcf44ad
commit
55139b3661
5 changed files with 110 additions and 3 deletions
|
|
@ -9,6 +9,8 @@ import static java.util.Objects.requireNonNull;
|
|||
|
||||
import com.intellij.execution.ExecutionBundle;
|
||||
import com.intellij.notification.Notification;
|
||||
import com.intellij.notification.NotificationGroup;
|
||||
import com.intellij.notification.NotificationListener;
|
||||
import com.intellij.notification.NotificationType;
|
||||
import com.intellij.notification.Notifications;
|
||||
import com.intellij.openapi.actionSystem.AnAction;
|
||||
|
|
@ -48,6 +50,7 @@ public class OverlayUtil {
|
|||
public static Notification getDefaultNotification(
|
||||
@NotNull String content, @NotNull NotificationType type, @NotNull AnAction... actions) {
|
||||
var notification = new Notification(NOTIFICATION_GROUP_ID, "CodeGPT", content, type);
|
||||
notification.setListener(new NotificationListener.UrlOpeningListener(true));
|
||||
Arrays.asList(actions).forEach(notification::addAction);
|
||||
return notification;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue