diff --git a/gpt4all-chat/qml/ChatView.qml b/gpt4all-chat/qml/ChatView.qml index 38a66c1f..76956141 100644 --- a/gpt4all-chat/qml/ChatView.qml +++ b/gpt4all-chat/qml/ChatView.qml @@ -844,6 +844,16 @@ Rectangle { } } + onLinkActivated: function(link) { + if (!currentResponse || !currentChat.responseInProgress) + Qt.openUrlExternally(link) + } + + onLinkHovered: function (link) { + if (!currentResponse || !currentChat.responseInProgress) + statusBar.hoveredLink = link + } + Menu { id: conversationContextMenu MenuItem { @@ -1320,7 +1330,8 @@ Rectangle { } Text { - id: device + id: statusBar + property string hoveredLink: "" anchors.top: textInputView.bottom anchors.bottom: parent.bottom anchors.right: parent.right @@ -1330,10 +1341,13 @@ Rectangle { horizontalAlignment: Qt.AlignRight verticalAlignment: Qt.AlignVCenter color: theme.mutedTextColor - visible: currentChat.tokenSpeed !== "" + visible: currentChat.tokenSpeed !== "" || hoveredLink !== "" elide: Text.ElideRight wrapMode: Text.WordWrap text: { + if (hoveredLink !== "") + return hoveredLink + const segments = [currentChat.tokenSpeed]; const device = currentChat.device; const backend = currentChat.deviceBackend;