mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-07-14 02:54:48 -04:00
Add settings for cache of changes
This commit is contained in:
@ -32,6 +32,7 @@
|
||||
#include "LLMClientInterface.hpp"
|
||||
#include "LLMSuggestion.hpp"
|
||||
#include "core/ChangesManager.h"
|
||||
#include "settings/ContextSettings.hpp"
|
||||
#include "settings/GeneralSettings.hpp"
|
||||
|
||||
using namespace LanguageServerProtocol;
|
||||
@ -85,7 +86,11 @@ void QodeAssistClient::openDocument(TextEditor::TextDocument *document)
|
||||
if (!textEditor || textEditor->document() != document)
|
||||
return;
|
||||
|
||||
ChangesManager::instance().addChange(document, position, charsRemoved, charsAdded);
|
||||
if (Settings::contextSettings().useProjectChangesCache())
|
||||
ChangesManager::instance().addChange(document,
|
||||
position,
|
||||
charsRemoved,
|
||||
charsAdded);
|
||||
|
||||
TextEditorWidget *widget = textEditor->editorWidget();
|
||||
if (widget->isReadOnly() || widget->multiTextCursor().hasMultipleCursors())
|
||||
|
Reference in New Issue
Block a user