refactor: Simplified edit tool (#242)

refactor: Re-work edit file tool
This commit is contained in:
Petr Mironychev
2025-10-26 11:47:16 +01:00
committed by GitHub
parent 608103b92e
commit 43b64b9166
29 changed files with 739 additions and 817 deletions

View File

@ -39,6 +39,13 @@ struct PendingTool
bool complete = false;
};
struct ToolQueue
{
QList<PendingTool> queue;
QHash<QString, PendingTool> completed;
bool isExecuting = false;
};
class ToolsManager : public QObject
{
Q_OBJECT
@ -67,9 +74,9 @@ private slots:
private:
ToolsFactory *m_toolsFactory;
ToolHandler *m_toolHandler;
QHash<QString, QHash<QString, PendingTool>> m_pendingTools;
QHash<QString, ToolQueue> m_toolQueues;
bool isExecutionComplete(const QString &requestId) const;
void executeNextTool(const QString &requestId);
QHash<QString, QString> getToolResults(const QString &requestId) const;
};