new chatlistview component, file attachments, performance & primitive test
This commit is contained in:
@@ -21,6 +21,8 @@ class ChatGeneration : public QObject {
|
||||
Q_PROPERTY(
|
||||
QString content READ content WRITE setContent NOTIFY contentChanged)
|
||||
Q_PROPERTY(QString reasoning READ reasoning NOTIFY reasoningChanged)
|
||||
Q_PROPERTY(bool error READ error NOTIFY errorChanged)
|
||||
Q_PROPERTY(QString errorMessage READ errorMessage NOTIFY errorChanged)
|
||||
Q_PROPERTY(
|
||||
qint64 reasoningElapsedMs READ reasoningElapsedMs NOTIFY
|
||||
elapsedMsChanged)
|
||||
@@ -48,6 +50,8 @@ class ChatGeneration : public QObject {
|
||||
|
||||
[[nodiscard]] QString content() const;
|
||||
[[nodiscard]] QString reasoning() const;
|
||||
[[nodiscard]] bool error() const { return m_hasError; }
|
||||
[[nodiscard]] QString errorMessage() const { return m_errorMessage; }
|
||||
[[nodiscard]] bool reasoningActive() const;
|
||||
[[nodiscard]] qint64 reasoningElapsedMs() const;
|
||||
[[nodiscard]] qint64 contentElapsedMs() const;
|
||||
@@ -65,11 +69,13 @@ class ChatGeneration : public QObject {
|
||||
|
||||
Q_INVOKABLE void approveTools();
|
||||
Q_INVOKABLE void denyTools();
|
||||
Q_INVOKABLE void dismissError();
|
||||
|
||||
void setContent(const QString& value);
|
||||
void appendContent(const QString& piece);
|
||||
void appendReasoning(const QString& piece);
|
||||
void setStreaming(bool value);
|
||||
void setError(const QString& value);
|
||||
|
||||
[[nodiscard]] LlmSegment* openContentSegment();
|
||||
[[nodiscard]] LlmSegment* openReasoningSegment();
|
||||
@@ -81,6 +87,7 @@ class ChatGeneration : public QObject {
|
||||
Q_SIGNALS:
|
||||
void contentChanged();
|
||||
void reasoningChanged();
|
||||
void errorChanged();
|
||||
void reasoningActiveChanged();
|
||||
void elapsedMsChanged();
|
||||
void streamingChanged();
|
||||
@@ -98,6 +105,8 @@ class ChatGeneration : public QObject {
|
||||
bool m_streaming = false;
|
||||
bool m_approvalPending = false;
|
||||
qint64 m_timestamp;
|
||||
bool m_hasError = false;
|
||||
QString m_errorMessage;
|
||||
};
|
||||
|
||||
} // namespace ZShell::llm
|
||||
|
||||
Reference in New Issue
Block a user