mirror of
https://github.com/nomic-ai/gpt4all.git
synced 2025-10-28 20:30:26 +00:00
Add a collection immediately and show a placeholder + busy indicator in localdocs settings.
This commit is contained in:
@@ -33,11 +33,13 @@ LocalDocs::LocalDocs()
|
||||
void LocalDocs::addFolder(const QString &collection, const QString &path)
|
||||
{
|
||||
const QUrl url(path);
|
||||
if (url.isLocalFile()) {
|
||||
emit requestAddFolder(collection, url.toLocalFile());
|
||||
} else {
|
||||
emit requestAddFolder(collection, path);
|
||||
}
|
||||
const QString localPath = url.isLocalFile() ? url.toLocalFile() : path;
|
||||
// Add a placeholder collection that is not installed yet
|
||||
CollectionItem i;
|
||||
i.collection = collection;
|
||||
i.folder_path = localPath;
|
||||
m_localDocsModel->addCollectionItem(i);
|
||||
emit requestAddFolder(collection, localPath);
|
||||
}
|
||||
|
||||
void LocalDocs::removeFolder(const QString &collection, const QString &path)
|
||||
|
||||
Reference in New Issue
Block a user