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
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:
@@ -20,19 +20,17 @@ class WebFetchTool : public LlmTool {
|
||||
static constexpr int MaxResponseBytes = 5 * 1024 * 1024;
|
||||
static constexpr int DefaultTimeoutSeconds = 30;
|
||||
static constexpr int MaxTimeoutSeconds = 120;
|
||||
static const QString StoragePath;
|
||||
|
||||
explicit WebFetchTool(QObject* parent = nullptr);
|
||||
explicit WebFetchTool(ToolRegistry* registry, QObject* parent = nullptr);
|
||||
~WebFetchTool() override;
|
||||
|
||||
QString name() const override;
|
||||
QString description() const override;
|
||||
QJsonObject parameters() 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 QString extractTextFromHtml(const QString& html);
|
||||
@@ -46,11 +44,12 @@ class WebFetchTool : public LlmTool {
|
||||
bool tooLarge = false;
|
||||
QString format;
|
||||
QString toolCallId;
|
||||
QString storagePath;
|
||||
int budgetChars = 0;
|
||||
std::function<void(const QJsonObject& result)> done;
|
||||
ToolDone done;
|
||||
};
|
||||
|
||||
void completeJob(Job* job, QJsonObject result);
|
||||
void completeJob(Job* job, ToolResult result);
|
||||
QString saveToFile(
|
||||
const Job& job, const QString& content, const QString& mime) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user