mirror of
https://github.com/Palm1r/QodeAssist.git
synced 2025-12-11 11:52:45 -05:00
fix: Add pause between call tools
This commit is contained in:
@ -20,6 +20,11 @@
|
||||
#include "ToolsManager.hpp"
|
||||
#include "TodoTool.hpp"
|
||||
#include "logger/Logger.hpp"
|
||||
#include <QTimer>
|
||||
|
||||
namespace {
|
||||
constexpr int kToolExecutionDelayMs = 300;
|
||||
}
|
||||
|
||||
namespace QodeAssist::Tools {
|
||||
|
||||
@ -172,7 +177,13 @@ void ToolsManager::onToolFinished(
|
||||
.arg(success ? QString("completed") : QString("failed"))
|
||||
.arg(requestId));
|
||||
|
||||
executeNextTool(requestId);
|
||||
if (kToolExecutionDelayMs > 0 && !queue.queue.isEmpty()) {
|
||||
QTimer::singleShot(kToolExecutionDelayMs, this, [this, requestId]() {
|
||||
executeNextTool(requestId);
|
||||
});
|
||||
} else {
|
||||
executeNextTool(requestId);
|
||||
}
|
||||
}
|
||||
|
||||
ToolsFactory *ToolsManager::toolsFactory() const
|
||||
|
||||
Reference in New Issue
Block a user