mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2026-05-30 02:49:12 -04:00
feat: Add max continuation tools settings
This commit is contained in:
@@ -242,6 +242,9 @@ void ClientInterface::sendMessage(
|
||||
useTools,
|
||||
useThinking);
|
||||
|
||||
provider->client()->setMaxToolContinuations(
|
||||
Settings::toolsSettings().maxToolContinuations());
|
||||
|
||||
connect(
|
||||
provider->client(),
|
||||
&::LLMQore::BaseClient::chunkReceived,
|
||||
|
||||
@@ -19,6 +19,7 @@
|
||||
#include <settings/ChatAssistantSettings.hpp>
|
||||
#include <settings/GeneralSettings.hpp>
|
||||
#include <settings/QuickRefactorSettings.hpp>
|
||||
#include <settings/ToolsSettings.hpp>
|
||||
|
||||
namespace QodeAssist {
|
||||
|
||||
@@ -139,6 +140,9 @@ void QuickRefactorHandler::prepareAndSendRequest(
|
||||
enableTools,
|
||||
enableThinking);
|
||||
|
||||
provider->client()->setMaxToolContinuations(
|
||||
Settings::toolsSettings().maxToolContinuations());
|
||||
|
||||
m_isRefactoringInProgress = true;
|
||||
|
||||
connect(
|
||||
|
||||
@@ -87,6 +87,7 @@ const char CA_ENABLE_CHAT_IN_BOTTOM_TOOLBAR[] = "QodeAssist.caEnableChatInBottom
|
||||
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 TOOLS_MAX_CONTINUATIONS[] = "QodeAssist.toolsMaxContinuations";
|
||||
const char CA_ALLOW_ACCESS_OUTSIDE_PROJECT[] = "QodeAssist.caAllowAccessOutsideProject";
|
||||
const char CA_ENABLE_LIST_PROJECT_FILES_TOOL[] = "QodeAssist.caEnableListProjectFilesTool";
|
||||
const char CA_ENABLE_FIND_FILE_TOOL[] = "QodeAssist.caEnableFindFileTool";
|
||||
|
||||
@@ -40,6 +40,15 @@ ToolsSettings::ToolsSettings()
|
||||
"When disabled, each edit is staged for manual approval."));
|
||||
autoApplyFileEdits.setDefaultValue(false);
|
||||
|
||||
maxToolContinuations.setSettingsKey(Constants::TOOLS_MAX_CONTINUATIONS);
|
||||
maxToolContinuations.setLabelText(Tr::tr("Max tool continuations:"));
|
||||
maxToolContinuations.setToolTip(
|
||||
Tr::tr("Maximum number of consecutive tool-use rounds in a single request. "
|
||||
"Each round lets the model call tools and receive results before continuing. "
|
||||
"Higher values allow more complex multi-step tasks but increase token usage."));
|
||||
maxToolContinuations.setRange(1, 100);
|
||||
maxToolContinuations.setDefaultValue(30);
|
||||
|
||||
enableListProjectFilesTool.setSettingsKey(Constants::CA_ENABLE_LIST_PROJECT_FILES_TOOL);
|
||||
enableListProjectFilesTool.setLabelText(Tr::tr("List Project Files"));
|
||||
enableListProjectFilesTool.setToolTip(
|
||||
@@ -174,6 +183,7 @@ ToolsSettings::ToolsSettings()
|
||||
title(Tr::tr("Tool Settings")),
|
||||
Column{
|
||||
allowAccessOutsideProject,
|
||||
Row{maxToolContinuations, Stretch{1}},
|
||||
Space{4},
|
||||
Group{
|
||||
title(Tr::tr("Edit File")),
|
||||
@@ -206,6 +216,7 @@ void ToolsSettings::resetSettingsToDefaults()
|
||||
if (reply == QMessageBox::Yes) {
|
||||
resetAspect(allowAccessOutsideProject);
|
||||
resetAspect(autoApplyFileEdits);
|
||||
resetAspect(maxToolContinuations);
|
||||
resetAspect(enableListProjectFilesTool);
|
||||
resetAspect(enableFindFileTool);
|
||||
resetAspect(enableReadFileTool);
|
||||
|
||||
@@ -18,6 +18,7 @@ public:
|
||||
|
||||
Utils::BoolAspect allowAccessOutsideProject{this};
|
||||
Utils::BoolAspect autoApplyFileEdits{this};
|
||||
Utils::IntegerAspect maxToolContinuations{this};
|
||||
|
||||
Utils::BoolAspect enableListProjectFilesTool{this};
|
||||
Utils::BoolAspect enableFindFileTool{this};
|
||||
|
||||
Reference in New Issue
Block a user