mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-22 20:10:36 +00:00
Add context link to references.
This commit is contained in:
@@ -555,6 +555,14 @@ Window {
|
||||
}
|
||||
}
|
||||
|
||||
PopupDialog {
|
||||
id: referenceContextDialog
|
||||
anchors.centerIn: parent
|
||||
shouldTimeOut: false
|
||||
shouldShowBusy: false
|
||||
modal: true
|
||||
}
|
||||
|
||||
Rectangle {
|
||||
id: conversation
|
||||
color: theme.backgroundLight
|
||||
@@ -600,6 +608,7 @@ Window {
|
||||
width: listView.width
|
||||
color: theme.textColor
|
||||
wrapMode: Text.WordWrap
|
||||
textFormat: TextEdit.MarkdownText
|
||||
focus: false
|
||||
readOnly: true
|
||||
font.pixelSize: theme.fontSizeLarge
|
||||
@@ -621,6 +630,17 @@ Window {
|
||||
leftPadding: 100
|
||||
rightPadding: 100
|
||||
|
||||
onLinkActivated: function (link) {
|
||||
if (!link.startsWith("context://"))
|
||||
return;
|
||||
|
||||
console.log("link " + link);
|
||||
var integer = parseInt(link.split("://")[1]);
|
||||
console.log("context is" + referencesContext[integer - 1]);
|
||||
referenceContextDialog.text = referencesContext[integer - 1];
|
||||
referenceContextDialog.open();
|
||||
}
|
||||
|
||||
Item {
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 90
|
||||
|
Reference in New Issue
Block a user