Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ Note that this project **does not** adhere to [Semantic Versioning](https://semv
- Fixed redundant action icons showing in empty identifier fields (DOI, Eprint, ISBN) [#14821](https://github.com/JabRef/jabref/pull/14821)
- Fixed localized walkthrough highlight for 'Preferences' menu item. [#14822](https://github.com/JabRef/jabref/issues/14822)
- We Improved detection of arXiv identifiers when pasting arXiv URLs that include URL fragments. [#14659](https://github.com/JabRef/jabref/issues/14659)
- We fixed an issue where exporting group chat to JSON resulted in empty entries array. [#14647](https://github.com/JabRef/jabref/issues/14647)
- We fixed an error on startup when using portable preferences. [#14729](https://github.com/JabRef/jabref/issues/14729)
- We fixed an issue when warning for duplicate entries in the "New Entry" dialog. [#14662](https://github.com/JabRef/jabref/pull/14662)
- We fixed the Quality > Automatically set file links button. Now if a file is moved, the button can relink the moved file to the broken linked file. [#9798](https://github.com/JabRef/jabref/issues/9798)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,6 @@
import javafx.scene.paint.Color;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.ai.components.aichat.chathistory.ChatHistoryComponent;
import org.jabref.gui.ai.components.aichat.chatprompt.ChatPromptComponent;
import org.jabref.gui.ai.components.util.Loadable;
Expand Down Expand Up @@ -99,7 +98,6 @@ public class AiChatComponent extends VBox {
public AiChatComponent(AiService aiService,
StringProperty name,
ObservableList<ChatMessage> chatHistory,
StateManager stateManager,
ObservableList<BibEntry> entries,
BibDatabaseContext bibDatabaseContext,
BibEntryTypesManager entryTypesManager,
Expand All @@ -109,7 +107,7 @@ public AiChatComponent(AiService aiService,
TaskExecutor taskExecutor
) {
this.aiService = aiService;
this.entries = stateManager.getSelectedEntries();
this.entries = entries;
this.bibDatabaseContext = bibDatabaseContext;
this.aiPreferences = aiPreferences;
this.entryTypesManager = entryTypesManager;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import javafx.scene.Node;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.ai.components.util.EmbeddingModelGuardedComponent;
import org.jabref.gui.entryeditor.AdaptVisibleTabs;
import org.jabref.gui.frame.ExternalApplicationsPreferences;
Expand All @@ -32,7 +31,6 @@ public class AiChatGuardedComponent extends EmbeddingModelGuardedComponent {

private final ObservableList<ChatMessage> chatHistory;
private final BibDatabaseContext bibDatabaseContext;
private final StateManager stateManager;
private final ObservableList<BibEntry> entries;
private final AiService aiService;
private final DialogService dialogService;
Expand All @@ -44,7 +42,6 @@ public class AiChatGuardedComponent extends EmbeddingModelGuardedComponent {
public AiChatGuardedComponent(AiService aiService,
StringProperty name,
ObservableList<ChatMessage> chatHistory,
StateManager stateManager,
BibDatabaseContext bibDatabaseContext,
ObservableList<BibEntry> entries,
BibEntryTypesManager entryTypesManager,
Expand All @@ -60,7 +57,6 @@ public AiChatGuardedComponent(AiService aiService,
this.aiService = aiService;
this.name = name;
this.chatHistory = chatHistory;
this.stateManager = stateManager;
this.bibDatabaseContext = bibDatabaseContext;
this.entries = entries;
this.entryTypesManager = entryTypesManager;
Expand All @@ -78,7 +74,6 @@ protected Node showEmbeddingModelGuardedContent() {
aiService,
name,
chatHistory,
stateManager,
entries,
bibDatabaseContext,
entryTypesManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
import javafx.scene.Scene;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.gui.entryeditor.AdaptVisibleTabs;
import org.jabref.gui.frame.ExternalApplicationsPreferences;
import org.jabref.gui.util.BaseWindow;
Expand All @@ -29,7 +28,6 @@ public class AiChatWindow extends BaseWindow {
private final DialogService dialogService;
private final AdaptVisibleTabs adaptVisibleTabs;
private final TaskExecutor taskExecutor;
private final StateManager stateManager;
// This field is used for finding an existing AI chat window when user wants to chat with the same group again.
private String chatName;

Expand All @@ -40,8 +38,7 @@ public AiChatWindow(BibEntryTypesManager entryTypesManager,
AiService aiService,
DialogService dialogService,
AdaptVisibleTabs adaptVisibleTabs,
TaskExecutor taskExecutor,
StateManager stateManager
TaskExecutor taskExecutor
) {
this.entryTypesManager = entryTypesManager;
this.aiPreferences = aiPreferences;
Expand All @@ -51,7 +48,6 @@ public AiChatWindow(BibEntryTypesManager entryTypesManager,
this.dialogService = dialogService;
this.adaptVisibleTabs = adaptVisibleTabs;
this.taskExecutor = taskExecutor;
this.stateManager = stateManager;
}

public void setChat(StringProperty name, ObservableList<ChatMessage> chatHistory, BibDatabaseContext bibDatabaseContext, ObservableList<BibEntry> entries) {
Expand All @@ -63,7 +59,6 @@ public void setChat(StringProperty name, ObservableList<ChatMessage> chatHistory
aiService,
name,
chatHistory,
stateManager,
bibDatabaseContext,
entries,
entryTypesManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,6 @@ private void showChatPanel(BibDatabaseContext bibDatabaseContext, BibEntry entry
aiService,
chatName,
aiService.getChatHistoryService().getChatHistoryForEntry(bibDatabaseContext, entry),
stateManager,
bibDatabaseContext,
FXCollections.observableArrayList(new ArrayList<>(List.of(entry))),
entryTypesManager,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -494,8 +494,7 @@ private void openAiChat(StringProperty name, ObservableList<ChatMessage> chatHis
aiService,
dialogService,
adaptVisibleTabs,
taskExecutor,
stateManager
taskExecutor
);

aiChatWindow.setOnCloseRequest(event ->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import javafx.collections.FXCollections;

import org.jabref.gui.DialogService;
import org.jabref.gui.StateManager;
import org.jabref.logic.ai.AiPreferences;
import org.jabref.logic.ai.AiService;
import org.jabref.logic.ai.chatting.AiChatLogic;
Expand Down Expand Up @@ -95,14 +94,11 @@ void setUp() {
private AiChatComponent createComponent() throws Exception {
CountDownLatch latch = new CountDownLatch(1);
final AiChatComponent[] holder = new AiChatComponent[1];
StateManager mockStateManager = mock(StateManager.class);
when(mockStateManager.getSelectedEntries()).thenReturn(FXCollections.observableArrayList());
Platform.runLater(() -> {
holder[0] = new AiChatComponent(
aiService,
new SimpleStringProperty("entry"),
FXCollections.observableArrayList(),
mockStateManager,
FXCollections.observableArrayList(),
bibDatabaseContext,
mock(BibEntryTypesManager.class),
Expand Down
Loading