mirror of
https://github.com/MindWorkAI/AI-Studio.git
synced 2026-11-05 00:07:21 +00:00
Added a way to read what the AI received from your sources (#1100)
Co-authored-by: Thorsten Sommer <SommerEngineering@users.noreply.github.com>
This commit is contained in:
1 parent
e0d8e18f34
commit
cbc4ce5413
229 files changed
+12739
-1269
No files matched your search
@@ -2,6 +2,7 @@ using System.Globalization;
|
||||
|
||||
using AIStudio.Dialogs;
|
||||
using AIStudio.Tools.ChatArchive;
|
||||
using AIStudio.Tools.Databases;
|
||||
using AIStudio.Tools.DataBackup;
|
||||
using AIStudio.Tools.Rust;
|
||||
using AIStudio.Tools.Services;
|
||||
@@ -43,6 +44,9 @@ public partial class DataBackupPanel : MSGComponentBase
|
||||
[Inject]
|
||||
private DataRestoreService DataRestoreService { get; init; } = null!;
|
||||
|
||||
[Inject]
|
||||
private DatabaseClientProvider DatabaseClientProvider { get; init; } = null!;
|
||||
|
||||
private ChatArchiveCollisionBehavior collisionBehavior = ChatArchiveCollisionBehavior.SKIP;
|
||||
private CancellationTokenSource? importCancellation;
|
||||
private ChatArchiveProgress importProgress;
|
||||
@@ -253,7 +257,8 @@ public partial class DataBackupPanel : MSGComponentBase
|
||||
var archivePath = this.selectedArchivePath;
|
||||
var token = this.importCancellation.Token;
|
||||
var reporter = this.CreateImportProgressReporter();
|
||||
this.importResult = await Task.Run(() => ChatArchiveImporter.ImportAsync(archivePath, this.collisionBehavior, reporter, token), token);
|
||||
var provenanceStore = await this.DatabaseClientProvider.GetProvenanceStoreAsync(token);
|
||||
this.importResult = await Task.Run(() => ChatArchiveImporter.ImportAsync(archivePath, provenanceStore, this.collisionBehavior, reporter, token), token);
|
||||
|
||||
//
|
||||
// Drop the preview once every chat was added. Otherwise, another click on the button
|
||||
|
||||
Reference in new issue
Block a user