diff --git a/app/MindWork AI Studio/Components/ReadFileContent.razor b/app/MindWork AI Studio/Components/ReadFileContent.razor
index 05a63722..302224de 100644
--- a/app/MindWork AI Studio/Components/ReadFileContent.razor
+++ b/app/MindWork AI Studio/Components/ReadFileContent.razor
@@ -1,5 +1,5 @@
@inherits MSGComponentBase
-
+
@if (string.IsNullOrWhiteSpace(this.Text))
{
@T("Use file content as input")
@@ -8,4 +8,4 @@
{
@this.Text
}
-
\ No newline at end of file
+
diff --git a/app/MindWork AI Studio/Components/ReadFileContent.razor.cs b/app/MindWork AI Studio/Components/ReadFileContent.razor.cs
index 5db85e21..d3248937 100644
--- a/app/MindWork AI Studio/Components/ReadFileContent.razor.cs
+++ b/app/MindWork AI Studio/Components/ReadFileContent.razor.cs
@@ -15,6 +15,9 @@ public partial class ReadFileContent : MSGComponentBase
[Parameter]
public EventCallback FileContentChanged { get; set; }
+
+ [Parameter]
+ public bool Disabled { get; set; }
[Inject]
private RustService RustService { get; init; } = null!;
@@ -30,6 +33,9 @@ public partial class ReadFileContent : MSGComponentBase
private async Task SelectFile()
{
+ if (this.Disabled)
+ return;
+
// Ensure that Pandoc is installed and ready:
var pandocState = await this.PandocAvailabilityService.EnsureAvailabilityAsync(
showSuccessMessage: false,
@@ -73,4 +79,4 @@ public partial class ReadFileContent : MSGComponentBase
await MessageBus.INSTANCE.SendError(new(Icons.Material.Filled.Error, T("Failed to load file content")));
}
}
-}
\ No newline at end of file
+}