chore: format llm c files

This commit is contained in:
2026-09-30 15:01:19 +02:00
parent 88bb413f9a
commit 2df1cfe9aa
27 changed files with 741 additions and 1190 deletions
-9
View File
@@ -13,11 +13,6 @@ class QTimer;
namespace ZShell::llm {
// Fetches an http(s) URL and returns its content as plain text or raw
// HTML. Read-only. Mirrors opencode's webfetch tool, without markdown
// conversion and the permission prompt. Concurrent fetches are
// supported; results are always delivered on a later event loop
// iteration, never synchronously from execute().
class WebFetchTool : public LlmTool {
Q_OBJECT
@@ -25,8 +20,6 @@ class WebFetchTool : public LlmTool {
static constexpr int MaxResponseBytes = 5 * 1024 * 1024;
static constexpr int DefaultTimeoutSeconds = 30;
static constexpr int MaxTimeoutSeconds = 120;
// Caps the characters handed to the model so a large page cannot
// blow out the context.
static constexpr int MaxOutputChars = 64 * 1024;
explicit WebFetchTool(QObject* parent = nullptr);
@@ -40,8 +33,6 @@ class WebFetchTool : public LlmTool {
std::function<void(const QJsonObject& result)> done) override;
void cancel() override;
// Strips tags (skipping script/style/noscript/iframe/object/embed/
// head) and decodes common entities.
static QString extractTextFromHtml(const QString& html);
static QString decodeEntities(const QString& text);