Skip to content

Commit

Permalink
A better animation for when the model is thinking/responding. (#2557)
Browse files Browse the repository at this point in the history
* 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>
  • Loading branch information
manyoso and cebtenzzre committed Jul 9, 2024
1 parent ce4dc2e commit ccb98f3
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions gpt4all-chat/qml/ChatView.qml
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}
}
}

Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ccb98f3

Please sign in to comment.