mirror of
https://github.com/carlrobertoh/ProxyAI.git
synced 2026-05-10 20:30:24 +00:00
refactor: implement ConfigurationSettings as a Kotlin service (#634)
This commit is contained in:
parent
42568b1c59
commit
083c11f923
20 changed files with 108 additions and 254 deletions
|
|
@ -38,7 +38,7 @@ public final class ChatToolWindowContentManager {
|
|||
public void sendMessage(Message message, ConversationType conversationType) {
|
||||
getToolWindow().show();
|
||||
|
||||
if (ConfigurationSettings.getCurrentState().isCreateNewChatOnEachAction()
|
||||
if (ConfigurationSettings.getState().getCreateNewChatOnEachAction()
|
||||
|| ConversationsState.getCurrentConversation() == null) {
|
||||
createNewTabPanel().sendMessage(message, conversationType);
|
||||
return;
|
||||
|
|
@ -113,11 +113,11 @@ public final class ChatToolWindowContentManager {
|
|||
var toolWindow = toolWindowManager.getToolWindow("CodeGPT");
|
||||
// https://intellij-support.jetbrains.com/hc/en-us/community/posts/11533368171026/comments/11538403084562
|
||||
return Objects.requireNonNullElseGet(toolWindow, () -> toolWindowManager
|
||||
.registerToolWindow(RegisterToolWindowTask.closable(
|
||||
"CodeGPT",
|
||||
() -> "CodeGPT",
|
||||
Icons.DefaultSmall,
|
||||
ToolWindowAnchor.RIGHT)));
|
||||
.registerToolWindow(RegisterToolWindowTask.closable(
|
||||
"CodeGPT",
|
||||
() -> "CodeGPT",
|
||||
Icons.DefaultSmall,
|
||||
ToolWindowAnchor.RIGHT)));
|
||||
}
|
||||
|
||||
private Optional<Content> tryFindFirstChatTabContent() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue