new chatlistview component, file attachments, performance & primitive test
C++ / fmt (pull_request) Failing after 5s
C++ / build (pull_request) Failing after 9s
C++ / clang-tidy (pull_request) Failing after 10s
JS/TS / fmt (pull_request) Failing after 11s
JS/TS / lint (pull_request) Successful in 9s
Python / static (pull_request) Failing after 31s
Rust / build (pull_request) Successful in 49s
Python / verify (pull_request) Successful in 1m37s
Rust / fmt (pull_request) Successful in 27s
Rust / clippy (pull_request) Successful in 58s

This commit is contained in:
2026-09-17 15:20:41 +02:00
parent a3178ad9cd
commit 99949ff255
36 changed files with 4368 additions and 310 deletions
+21
View File
@@ -6,6 +6,8 @@
#include <QDateTime>
#include <QObject>
#include <QString>
#include <QStringList>
#include <QVariantList>
#include <QtQml>
namespace ZShell::llm {
@@ -27,6 +29,10 @@ class ChatSession : public QObject {
Q_PROPERTY(int messageCount READ messageCount NOTIFY messageCountChanged)
Q_PROPERTY(
ZShell::llm::ChatMessageModel* messagesModel READ messagesModel CONSTANT)
Q_PROPERTY(QString workspace READ workspacePath CONSTANT)
Q_PROPERTY(
QString attachmentError READ attachmentError NOTIFY
attachmentErrorChanged)
public:
explicit ChatSession(const QString& id, QObject* parent = nullptr);
@@ -55,6 +61,13 @@ class ChatSession : public QObject {
[[nodiscard]] int lastTokenCount() const { return m_lastTokenCount; }
void setLastTokenCount(int value);
[[nodiscard]] QString workspacePath() const { return m_workspace; }
[[nodiscard]] QString attachmentError() const { return m_attachmentError; }
void setAttachmentError(const QString& value);
static QString sandboxDirFor(const QString& sessionId);
void ensureWorkspace();
void setTitle(const QString& value);
void setIcon(const QString& value);
void setUpdatedAt(qint64 value);
@@ -71,7 +84,12 @@ class ChatSession : public QObject {
void removeMessage(ChatMessage* message);
void clearMessages();
Q_INVOKABLE QVariantList addAttachments(const QStringList& paths);
Q_INVOKABLE bool clipboardHasAttachment();
Q_INVOKABLE QVariantList pasteAttachments();
Q_INVOKABLE void sendMessage(const QString& text);
Q_INVOKABLE void sendMessage(
const QString& text, const QVariantList& attachments);
Q_INVOKABLE void retry(ZShell::llm::ChatMessage* target);
Q_INVOKABLE void continueFrom(ZShell::llm::ChatMessage* message);
Q_INVOKABLE void clear();
@@ -83,6 +101,7 @@ class ChatSession : public QObject {
void pinnedChanged();
void messageCountChanged();
void loaded();
void attachmentErrorChanged();
private:
void onModelRowsChanged();
@@ -103,6 +122,8 @@ class ChatSession : public QObject {
bool m_loaded = false;
bool m_clearPending = false;
int m_lastTokenCount = 0;
QString m_workspace;
QString m_attachmentError;
};
} // namespace ZShell::llm