mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-02 09:06:03 +00:00
Display DeepSeek-R1 thinking like Reasoner (#3440)
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:
@@ -13,6 +13,8 @@ ColumnLayout {
|
||||
property alias textContent: innerTextItem.textContent
|
||||
property bool isCurrent: false
|
||||
property bool isError: false
|
||||
property bool isThinking: false
|
||||
property int thinkingTime: 0
|
||||
|
||||
Layout.topMargin: 10
|
||||
Layout.bottomMargin: 10
|
||||
@@ -26,16 +28,20 @@ ColumnLayout {
|
||||
anchors.bottom: parent.bottom
|
||||
|
||||
Item {
|
||||
width: myTextArea.width
|
||||
height: myTextArea.height
|
||||
Layout.preferredWidth: myTextArea.implicitWidth
|
||||
Layout.preferredHeight: myTextArea.implicitHeight
|
||||
TextArea {
|
||||
id: myTextArea
|
||||
text: {
|
||||
if (isError)
|
||||
return qsTr("Analysis encountered error");
|
||||
if (isCurrent)
|
||||
return qsTr("Analyzing");
|
||||
return qsTr("Analyzed");
|
||||
return isThinking ? qsTr("Thinking") : qsTr("Analyzing");
|
||||
return isThinking
|
||||
? qsTr("Thought for %1 %2")
|
||||
.arg(Math.ceil(thinkingTime / 1000.0))
|
||||
.arg(Math.ceil(thinkingTime / 1000.0) === 1 ? qsTr("second") : qsTr("seconds"))
|
||||
: qsTr("Analyzed");
|
||||
}
|
||||
padding: 0
|
||||
font.pixelSize: theme.fontSizeLarger
|
||||
|
Reference in New Issue
Block a user