mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-11-30 22:43:00 -05:00
refactor: Change top bar layout and tools/thinking settings
This commit is contained in:
@ -68,6 +68,10 @@ ChatAssistantSettings::ChatAssistantSettings()
|
||||
enableChatInNavigationPanel.setLabelText(Tr::tr("Enable chat in navigation panel"));
|
||||
enableChatInNavigationPanel.setDefaultValue(false);
|
||||
|
||||
enableChatTools.setSettingsKey(Constants::CA_ENABLE_CHAT_TOOLS);
|
||||
enableChatTools.setLabelText(Tr::tr("Enable tools/function calling"));
|
||||
enableChatTools.setToolTip(Tr::tr("When enabled, AI can use tools to read files, search project, and build code"));
|
||||
enableChatTools.setDefaultValue(false);
|
||||
|
||||
// General Parameters Settings
|
||||
temperature.setSettingsKey(Constants::CA_TEMPERATURE);
|
||||
@ -146,10 +150,11 @@ ChatAssistantSettings::ChatAssistantSettings()
|
||||
|
||||
// Extended Thinking Settings
|
||||
enableThinkingMode.setSettingsKey(Constants::CA_ENABLE_THINKING_MODE);
|
||||
enableThinkingMode.setLabelText(Tr::tr("Enable extended thinking mode (Claude, Ollama).\n Temperature is 1.0 accordingly API requirement for Claude"));
|
||||
enableThinkingMode.setLabelText(Tr::tr("Enable extended thinking mode."));
|
||||
enableThinkingMode.setToolTip(
|
||||
Tr::tr("Enable extended thinking mode for complex reasoning tasks. "
|
||||
"This provides step-by-step reasoning before the final answer. "));
|
||||
Tr::tr("Enable extended thinking mode for complex reasoning tasks."
|
||||
"This provides step-by-step reasoning before the final answer."
|
||||
"Temperature is 1.0 accordingly API requirement"));
|
||||
enableThinkingMode.setDefaultValue(false);
|
||||
|
||||
thinkingBudgetTokens.setSettingsKey(Constants::CA_THINKING_BUDGET_TOKENS);
|
||||
@ -283,6 +288,14 @@ ChatAssistantSettings::ChatAssistantSettings()
|
||||
enableChatInBottomToolBar,
|
||||
enableChatInNavigationPanel}},
|
||||
Space{8},
|
||||
Group{
|
||||
title(Tr::tr("Tools")),
|
||||
Column{enableChatTools}},
|
||||
Space{8},
|
||||
Group{
|
||||
title(Tr::tr("Extended Thinking (if provider/model supports)")),
|
||||
Column{enableThinkingMode, Row{thinkingGrid, Stretch{1}}}},
|
||||
Space{8},
|
||||
Group{
|
||||
title(Tr::tr("General Parameters")),
|
||||
Row{genGrid, Stretch{1}},
|
||||
@ -297,9 +310,6 @@ ChatAssistantSettings::ChatAssistantSettings()
|
||||
systemPrompt,
|
||||
}},
|
||||
Group{title(Tr::tr("Ollama Settings")), Column{Row{ollamaGrid, Stretch{1}}}},
|
||||
Group{
|
||||
title(Tr::tr("Extended Thinking (Claude, Ollama)")),
|
||||
Column{enableThinkingMode, Row{thinkingGrid, Stretch{1}}}},
|
||||
Group{title(Tr::tr("Chat Settings")), Row{chatViewSettingsGrid, Stretch{1}}},
|
||||
Stretch{1}};
|
||||
});
|
||||
@ -343,6 +353,7 @@ void ChatAssistantSettings::resetSettingsToDefaults()
|
||||
resetAspect(thinkingBudgetTokens);
|
||||
resetAspect(thinkingMaxTokens);
|
||||
resetAspect(linkOpenFiles);
|
||||
resetAspect(enableChatTools);
|
||||
resetAspect(textFontFamily);
|
||||
resetAspect(codeFontFamily);
|
||||
resetAspect(textFontSize);
|
||||
|
||||
@ -38,6 +38,7 @@ public:
|
||||
Utils::BoolAspect autosave{this};
|
||||
Utils::BoolAspect enableChatInBottomToolBar{this};
|
||||
Utils::BoolAspect enableChatInNavigationPanel{this};
|
||||
Utils::BoolAspect enableChatTools{this};
|
||||
|
||||
// General Parameters Settings
|
||||
Utils::DoubleAspect temperature{this};
|
||||
|
||||
@ -102,6 +102,7 @@ const char CC_CUSTOM_LANGUAGES[] = "QodeAssist.ccCustomLanguages";
|
||||
|
||||
const char CA_ENABLE_CHAT_IN_BOTTOM_TOOLBAR[] = "QodeAssist.caEnableChatInBottomToolbar";
|
||||
const char CA_ENABLE_CHAT_IN_NAVIGATION_PANEL[] = "QodeAssist.caEnableChatInNavigationPanel";
|
||||
const char CA_ENABLE_CHAT_TOOLS[] = "QodeAssist.caEnableChatTools";
|
||||
const char CA_USE_TOOLS[] = "QodeAssist.caUseTools";
|
||||
const char CA_ALLOW_FILE_SYSTEM_READ[] = "QodeAssist.caAllowFileSystemRead";
|
||||
const char CA_ALLOW_FILE_SYSTEM_WRITE[] = "QodeAssist.caAllowFileSystemWrite";
|
||||
|
||||
@ -42,13 +42,6 @@ ToolsSettings::ToolsSettings()
|
||||
|
||||
setDisplayName(Tr::tr("Tools"));
|
||||
|
||||
useTools.setSettingsKey(Constants::CA_USE_TOOLS);
|
||||
useTools.setLabelText(Tr::tr("Enable tools"));
|
||||
useTools.setToolTip(Tr::tr(
|
||||
"Enable tool use capabilities for the assistant (OpenAI function calling, Claude tools "
|
||||
"and etc) if plugin and provider support"));
|
||||
useTools.setDefaultValue(true);
|
||||
|
||||
allowFileSystemRead.setSettingsKey(Constants::CA_ALLOW_FILE_SYSTEM_READ);
|
||||
allowFileSystemRead.setLabelText(Tr::tr("Allow File System Read Access for tools"));
|
||||
allowFileSystemRead.setToolTip(
|
||||
@ -120,8 +113,6 @@ ToolsSettings::ToolsSettings()
|
||||
Group{
|
||||
title(Tr::tr("Tool Settings")),
|
||||
Column{
|
||||
useTools,
|
||||
Space{8},
|
||||
allowFileSystemRead,
|
||||
allowFileSystemWrite,
|
||||
allowAccessOutsideProject
|
||||
@ -158,7 +149,6 @@ void ToolsSettings::resetSettingsToDefaults()
|
||||
QMessageBox::Yes | QMessageBox::No);
|
||||
|
||||
if (reply == QMessageBox::Yes) {
|
||||
resetAspect(useTools);
|
||||
resetAspect(allowFileSystemRead);
|
||||
resetAspect(allowFileSystemWrite);
|
||||
resetAspect(allowAccessOutsideProject);
|
||||
|
||||
@ -32,7 +32,6 @@ public:
|
||||
|
||||
ButtonAspect resetToDefaults{this};
|
||||
|
||||
Utils::BoolAspect useTools{this};
|
||||
Utils::BoolAspect allowFileSystemRead{this};
|
||||
Utils::BoolAspect allowFileSystemWrite{this};
|
||||
Utils::BoolAspect allowAccessOutsideProject{this};
|
||||
|
||||
Reference in New Issue
Block a user