mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-07-21 10:40:57 -04:00
refactor: Restructure project into sources/tests layout and dissolve PluginLLMCore
This commit is contained in:
91
sources/settings/CodeCompletionSettings.hpp
Normal file
91
sources/settings/CodeCompletionSettings.hpp
Normal file
@@ -0,0 +1,91 @@
|
||||
// Copyright (C) 2024-2026 Petr Mironychev
|
||||
// SPDX-License-Identifier: GPL-3.0-or-later
|
||||
// Additional attribution terms under GPLv3 §7(b) apply — see LICENSE
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <utils/aspects.h>
|
||||
|
||||
#include "ButtonAspect.hpp"
|
||||
|
||||
namespace QodeAssist::Settings {
|
||||
|
||||
class CodeCompletionSettings : public Utils::AspectContainer
|
||||
{
|
||||
public:
|
||||
CodeCompletionSettings();
|
||||
|
||||
ButtonAspect resetToDefaults{this};
|
||||
|
||||
// Auto Completion Settings
|
||||
Utils::BoolAspect autoCompletion{this};
|
||||
Utils::BoolAspect multiLineCompletion{this};
|
||||
Utils::SelectionAspect modelOutputHandler{this};
|
||||
Utils::SelectionAspect completionTriggerMode{this};
|
||||
Utils::SelectionAspect completionMode{this};
|
||||
Utils::BoolAspect smartContextTrigger{this};
|
||||
Utils::BoolAspect respectQtcPopup{this};
|
||||
Utils::BoolAspect cancelOnInput{this};
|
||||
|
||||
Utils::IntegerAspect startSuggestionTimer{this};
|
||||
Utils::IntegerAspect autoCompletionCharThreshold{this};
|
||||
Utils::IntegerAspect autoCompletionTypingInterval{this};
|
||||
Utils::IntegerAspect hintCharThreshold{this};
|
||||
Utils::IntegerAspect hintHideTimeout{this};
|
||||
Utils::SelectionAspect hintTriggerKey{this};
|
||||
Utils::BoolAspect ignoreWhitespaceInCharCount{this};
|
||||
|
||||
Utils::StringListAspect customLanguages{this};
|
||||
|
||||
Utils::BoolAspect showProgressWidget{this};
|
||||
Utils::BoolAspect abortAssistOnRequest{this};
|
||||
Utils::BoolAspect useOpenFilesContext{this};
|
||||
|
||||
// General Parameters Settings
|
||||
Utils::DoubleAspect temperature{this};
|
||||
Utils::IntegerAspect maxTokens{this};
|
||||
|
||||
// Advanced Parameters
|
||||
Utils::BoolAspect useTopP{this};
|
||||
Utils::DoubleAspect topP{this};
|
||||
|
||||
Utils::BoolAspect useTopK{this};
|
||||
Utils::IntegerAspect topK{this};
|
||||
|
||||
Utils::BoolAspect usePresencePenalty{this};
|
||||
Utils::DoubleAspect presencePenalty{this};
|
||||
|
||||
Utils::BoolAspect useFrequencyPenalty{this};
|
||||
Utils::DoubleAspect frequencyPenalty{this};
|
||||
|
||||
// Context Settings
|
||||
Utils::BoolAspect readFullFile{this};
|
||||
Utils::BoolAspect readFileParts{this};
|
||||
Utils::IntegerAspect readStringsBeforeCursor{this};
|
||||
Utils::IntegerAspect readStringsAfterCursor{this};
|
||||
Utils::BoolAspect useSystemPrompt{this};
|
||||
Utils::StringAspect systemPrompt{this};
|
||||
Utils::BoolAspect useUserMessageTemplateForCC{this};
|
||||
Utils::StringAspect systemPromptForNonFimModels{this};
|
||||
Utils::StringAspect userMessageTemplateForCC{this};
|
||||
Utils::BoolAspect useProjectChangesCache{this};
|
||||
Utils::IntegerAspect maxChangesCacheSize{this};
|
||||
|
||||
// Ollama Settings
|
||||
Utils::StringAspect ollamaLivetime{this};
|
||||
Utils::IntegerAspect contextWindow{this};
|
||||
|
||||
// OpenAI Responses API Settings
|
||||
Utils::SelectionAspect openAIResponsesReasoningEffort{this};
|
||||
|
||||
QString processMessageToFIM(const QString &prefix, const QString &suffix) const;
|
||||
|
||||
private:
|
||||
void setupConnections();
|
||||
void resetSettingsToDefaults();
|
||||
void migrateCompletionMode();
|
||||
};
|
||||
|
||||
CodeCompletionSettings &codeCompletionSettings();
|
||||
|
||||
} // namespace QodeAssist::Settings
|
||||
Reference in New Issue
Block a user