mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-11 13:10:50 +00:00
* Initial implementation of integrating llama.cpp to run LLaMA models locally * Move submodule * Copy llama submodule to bundle * Support for downloading models from IDE * Code cleanup * Store port field * Replace service selection radio group with dropdown * Add quantization support + other fixes * Add option to override host * Fix override host handler * Disable port field when override host enabled * Design updates * Fix llama settings configuration, design changes, clean up code * Improve You.com coupon design * Add new Phind model and help tooltip * Fetch you.com subscription * Add CodeBooga model, fix downloadable model selection * Chat history support * Code refactoring, minor bug fixes * UI updates, several bug fixes, removed code llama python model * Code cleanup, enable llama port only on macOS * Change downloaded gguf models path * Move some of the labels to codegpt bundle * Minor fixes * Remove ToRA model, add help texts * Fix test * Modify description
49 lines
1.3 KiB
Java
49 lines
1.3 KiB
Java
package ee.carlrobert.codegpt.completions.you;
|
|
|
|
import com.intellij.openapi.application.ApplicationManager;
|
|
import com.intellij.openapi.components.Service;
|
|
import ee.carlrobert.codegpt.completions.you.auth.SignedOutNotifier;
|
|
import ee.carlrobert.codegpt.completions.you.auth.response.YouAuthenticationResponse;
|
|
|
|
@Service
|
|
public final class YouUserManager {
|
|
|
|
private YouAuthenticationResponse authenticationResponse;
|
|
private boolean subscribed;
|
|
|
|
private YouUserManager() {
|
|
}
|
|
|
|
public static YouUserManager getInstance() {
|
|
return ApplicationManager.getApplication().getService(YouUserManager.class);
|
|
}
|
|
|
|
public YouAuthenticationResponse getAuthenticationResponse() {
|
|
return authenticationResponse;
|
|
}
|
|
|
|
public void setAuthenticationResponse(YouAuthenticationResponse authenticationResponse) {
|
|
this.authenticationResponse = authenticationResponse;
|
|
}
|
|
|
|
public void clearSession() {
|
|
authenticationResponse = null;
|
|
subscribed = false;
|
|
|
|
ApplicationManager.getApplication().getMessageBus()
|
|
.syncPublisher(SignedOutNotifier.SIGNED_OUT_TOPIC)
|
|
.signedOut();
|
|
}
|
|
|
|
public void setSubscribed(boolean subscribed) {
|
|
this.subscribed = subscribed;
|
|
}
|
|
|
|
public boolean isSubscribed() {
|
|
return subscribed;
|
|
}
|
|
|
|
public boolean isAuthenticated() {
|
|
return authenticationResponse != null;
|
|
}
|
|
}
|