chore: restructure llm plugin to be more coherent & fix various bugs in llm ui
C++ / fmt (pull_request) Failing after 6s
C++ / build (pull_request) Failing after 10s
C++ / clang-tidy (pull_request) Failing after 9s
JS/TS / fmt (pull_request) Successful in 10s
JS/TS / lint (pull_request) Successful in 8s
Python / static (pull_request) Successful in 30s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Successful in 1m35s
Rust / fmt (pull_request) Successful in 36s
Rust / clippy (pull_request) Successful in 54s

This commit is contained in:
2026-10-18 12:58:38 +02:00
parent fc81be922f
commit 1fe8a3a959
54 changed files with 3022 additions and 2559 deletions
+5 -8
View File
@@ -11,23 +11,21 @@ class QTimer;
namespace ZShell::llm {
class LlmClient;
class ShellTool : public LlmTool {
Q_OBJECT
public:
explicit ShellTool(LlmClient* client, QObject* parent = nullptr);
explicit ShellTool(ToolRegistry* registry, QObject* parent = nullptr);
~ShellTool() override;
QString name() const override;
QString description() const override;
QJsonObject parameters() const override;
bool available(const ToolContext& context) const override;
void execute(
const QString& toolCallId,
const ToolContext& context,
const QJsonObject& args,
int outputBudgetChars,
std::function<void(const QJsonObject& result)> done) override;
ToolDone done) override;
void cancel() override;
static constexpr int DefaultTimeoutSeconds = 60;
@@ -39,7 +37,7 @@ class ShellTool : public LlmTool {
QPointer<QTimer> timer;
int timeoutSeconds = DefaultTimeoutSeconds;
int outputBudgetChars = 0;
std::function<void(const QJsonObject&)> done;
ToolDone done;
QString startError;
bool timedOut = false;
bool cancelled = false;
@@ -50,7 +48,6 @@ class ShellTool : public LlmTool {
void finishJob(Job* job);
QPointer<LlmClient> m_client;
QList<Job*> m_jobs;
};