Add sharing current file with model

This commit is contained in:
Petr Mironychev
2024-11-11 00:38:55 +01:00
parent bc93bce03b
commit 61f1f0ae4f
9 changed files with 89 additions and 11 deletions

View File

@ -35,6 +35,8 @@ class ChatRootView : public QQuickItem
Q_PROPERTY(QColor primaryColor READ primaryColor CONSTANT FINAL)
Q_PROPERTY(QColor secondaryColor READ secondaryColor CONSTANT FINAL)
Q_PROPERTY(QColor codeColor READ codeColor CONSTANT FINAL)
Q_PROPERTY(bool isSharingCurrentFile READ isSharingCurrentFile NOTIFY
isSharingCurrentFileChanged FINAL)
QML_ELEMENT
public:
@ -49,8 +51,10 @@ public:
QColor codeColor() const;
bool isSharingCurrentFile() const;
public slots:
void sendMessage(const QString &message) const;
void sendMessage(const QString &message, bool sharingCurrentFile = false) const;
void copyToClipboard(const QString &text);
void cancelRequest();
@ -58,6 +62,8 @@ signals:
void chatModelChanged();
void currentTemplateChanged();
void isSharingCurrentFileChanged();
private:
void generateColors();
QColor generateColor(const QColor &baseColor,