Files
z-bar-qt/Plugins/ZShell/Llm/filetool.hpp
T
zach fcb848b6d2
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 2m18s
C++ / clang-tidy (pull_request) Failing after 2m7s
JS/TS / fmt (pull_request) Failing after 9s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Successful in 29s
Rust / build (pull_request) Successful in 50s
Python / verify (pull_request) Successful in 1m38s
Rust / fmt (pull_request) Successful in 26s
Rust / clippy (pull_request) Successful in 47s
fix: truncate webfetch content to fit context
2026-09-03 22:46:46 +02:00

27 lines
672 B
C++

#pragma once
#include "tool.hpp"
namespace ZShell::llm {
// Lets the model read text files from the local filesystem, in
// byte-offset windows small enough to fit the context. Primarily used to
// page through the full webfetch output stored under
// /tmp/zshell-llm/webfetch/.
class FileReadTool : public LlmTool {
Q_OBJECT
public:
explicit FileReadTool(QObject* parent = nullptr);
QString name() const override;
QString description() const override;
QJsonObject parameters() const override;
void execute(
const QString& toolCallId,
const QJsonObject& args,
std::function<void(const QJsonObject& result)> done) override;
};
} // namespace ZShell::llm