diff --git a/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor b/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor
index 44e1cec4..e80bad6a 100644
--- a/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor
+++ b/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor
@@ -41,7 +41,7 @@
-
+
@if (this.directorySizeNumFiles > 100)
{
diff --git a/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor.cs b/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor.cs
index 839fd5b8..73bc8dc6 100644
--- a/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor.cs
+++ b/app/MindWork AI Studio/Dialogs/DataSourceLocalDirectoryInfoDialog.razor.cs
@@ -51,6 +51,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
private long directorySizeBytes;
private long directorySizeNumFiles;
private readonly StringBuilder directoryFiles = new();
+ private string directoryFilesText = string.Empty;
private Task directorySizeTask = Task.CompletedTask;
private bool IsOperationInProgress { get; set; } = true;
@@ -63,6 +64,7 @@ public partial class DataSourceLocalDirectoryInfoDialog : MSGComponentBase, IAsy
{
this.directoryFiles.Append("- ");
this.directoryFiles.AppendLine(file);
+ this.directoryFilesText = this.directoryFiles.ToString();
}
private void UpdateDirectorySize(long size)
diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.55.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.55.md
index 3b5a3599..fb8ab9d2 100644
--- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.55.md
+++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.55.md
@@ -4,3 +4,4 @@
- Improved the document analysis assistant (in preview) by adding descriptions to the different sections.
- Improved the document preview dialog for the document analysis assistant (in preview), providing Markdown and plain text views for attached files.
- Improved the ID handling for configuration plugins.
+- Fixed a bug in the local data sources info dialog (preview feature) for data directories that could cause the app to crash. The error was caused by a background thread producing data while the frontend attempted to display it.
\ No newline at end of file