A better animation for when the model is thinking/responding. (#2557)

* A better animation for when the model is thinking/responding.
* ChatView: remove redundant ternary ops

Signed-off-by: Adam Treat <treat.adam@gmail.com>
Signed-off-by: Jared Van Bortel <jared@nomic.ai>
Co-authored-by: Jared Van Bortel <jared@nomic.ai>
This commit is contained in:
AT 2024-07-09 12:13:51 -04:00 committed by GitHub
parent ce4dc2e789
commit ccb98f34e0
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -813,9 +813,20 @@ Rectangle {
}
ColorOverlay {
id: colorOver
anchors.fill: logo
source: logo
color: theme.conversationHeader
RotationAnimation {
id: rotationAnimation
target: colorOver
property: "rotation"
from: 0
to: 360
duration: 1000
loops: Animation.Infinite
running: currentResponse && (currentChat.responseInProgress || currentChat.isRecalc)
}
}
}
@ -845,14 +856,7 @@ Rectangle {
color: theme.mutedTextColor
}
RowLayout {
visible: (currentResponse ? true : false) && ((value === "" && currentChat.responseInProgress) || currentChat.isRecalc)
MyBusyIndicator {
size: 24
color: theme.conversationProgress
Accessible.role: Accessible.Animation
Accessible.name: qsTr("Busy indicator")
Accessible.description: qsTr("The model is thinking")
}
visible: currentResponse && ((value === "" && currentChat.responseInProgress) || currentChat.isRecalc)
Text {
color: theme.mutedTextColor
font.pixelSize: theme.fontSizeLarger