feat: Add auto sync open files with model context

This commit is contained in:
Petr Mironychev
2025-01-24 00:22:44 +01:00
parent 9add61c805
commit bf3c0b3aa0
9 changed files with 93 additions and 41 deletions

View File

@ -188,7 +188,10 @@ ChatRootView {
sendButton.onClicked: root.sendChatMessage()
stopButton.onClicked: root.cancelRequest()
sharingCurrentFile.checked: root.isSharingCurrentFile
syncOpenFiles {
checked: root.isSyncOpenFiles
onCheckedChanged: root.setIsSyncOpenFiles(bottomBar.syncOpenFiles.checked)
}
attachFiles.onClicked: root.showAttachFilesDialog()
linkFiles.onClicked: root.showLinkFilesDialog()
}
@ -197,7 +200,6 @@ ChatRootView {
function clearChat() {
root.chatModel.clear()
root.clearAttachmentFiles()
root.clearLinkedFiles()
}
function scrollToBottom() {
@ -205,7 +207,7 @@ ChatRootView {
}
function sendChatMessage() {
root.sendMessage(messageInput.text, bottomBar.sharingCurrentFile.checked)
root.sendMessage(messageInput.text)
messageInput.text = ""
scrollToBottom()
}

View File

@ -27,7 +27,7 @@ Rectangle {
property alias sendButton: sendButtonId
property alias stopButton: stopButtonId
property alias sharingCurrentFile: sharingCurrentFileId
property alias syncOpenFiles: syncOpenFilesId
property alias attachFiles: attachFilesId
property alias linkFiles: linkFilesId
@ -61,9 +61,9 @@ Rectangle {
}
CheckBox {
id: sharingCurrentFileId
id: syncOpenFilesId
text: qsTr("Share current file with models")
text: qsTr("Sync open files with model context")
}
QoAButton {