Fix response generation which was broken by themeable syntax highlighting. (#2494)

Signed-off-by: Adam Treat <treat.adam@gmail.com>
This commit is contained in:
AT 2024-06-30 20:55:42 -04:00 committed by GitHub
parent ab46bd5739
commit 56834a28cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 1 deletions

View File

@ -188,6 +188,11 @@ public:
} }
} }
Q_INVOKABLE void forceUpdate(int index)
{
emit dataChanged(createIndex(index, 0), createIndex(index, 0), {ValueRole});
}
Q_INVOKABLE void updateValue(int index, const QString &value) Q_INVOKABLE void updateValue(int index, const QString &value)
{ {
if (index < 0 || index >= m_chatItems.size()) return; if (index < 0 || index >= m_chatItems.size()) return;

View File

@ -966,7 +966,7 @@ Rectangle {
textProcessor.codeColors.headerColor = theme.codeHeaderColor textProcessor.codeColors.headerColor = theme.codeHeaderColor
textProcessor.codeColors.backgroundColor = theme.codeBackgroundColor textProcessor.codeColors.backgroundColor = theme.codeBackgroundColor
textProcessor.textDocument = textDocument textProcessor.textDocument = textDocument
myTextArea.text = value chatModel.forceUpdate(index); // called to trigger a reprocessing of the text
} }
Component.onCompleted: { Component.onCompleted: {