mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-09-10 12:59:09 +00:00
Support attaching an Excel spreadsheet to a chat message (#3007)
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:
19
gpt4all-chat/qml/MyFileDialog.qml
Normal file
19
gpt4all-chat/qml/MyFileDialog.qml
Normal file
@@ -0,0 +1,19 @@
|
||||
import QtCore
|
||||
import QtQuick
|
||||
import QtQuick.Dialogs
|
||||
|
||||
FileDialog {
|
||||
id: fileDialog
|
||||
title: qsTr("Please choose a file")
|
||||
property var acceptedConnection: null
|
||||
|
||||
function openFileDialog(currentFolder, onAccepted) {
|
||||
fileDialog.currentFolder = currentFolder;
|
||||
if (acceptedConnection !== null) {
|
||||
fileDialog.accepted.disconnect(acceptedConnection);
|
||||
}
|
||||
acceptedConnection = function() { onAccepted(fileDialog.selectedFile); };
|
||||
fileDialog.accepted.connect(acceptedConnection);
|
||||
fileDialog.open();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user