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
36 lines
721 B
C++
36 lines
721 B
C++
#pragma once
|
|
|
|
#include "attachment.hpp"
|
|
|
|
#include <QObject>
|
|
#include <QString>
|
|
#include <QStringList>
|
|
|
|
namespace ZShell::llm {
|
|
|
|
class ChatSession;
|
|
|
|
class Workspace : public QObject {
|
|
Q_OBJECT
|
|
|
|
public:
|
|
explicit Workspace(ChatSession* session, QObject* parent = nullptr);
|
|
|
|
[[nodiscard]] QString path() const { return m_path; }
|
|
[[nodiscard]] static QString pathFor(const QString& sessionId);
|
|
|
|
[[nodiscard]] bool ensure();
|
|
|
|
[[nodiscard]] QList<Attachment*> importFiles(
|
|
const QStringList& paths, QString& error);
|
|
|
|
static constexpr qint64 MaxImageBytes = 20 * 1024 * 1024;
|
|
static constexpr qint64 MaxFileBytes = 100 * 1024 * 1024;
|
|
|
|
private:
|
|
ChatSession* m_session;
|
|
QString m_path;
|
|
};
|
|
|
|
} // namespace ZShell::llm
|