diff --git a/app/MindWork AI Studio/Pages/Chat.razor b/app/MindWork AI Studio/Pages/Chat.razor
index 8162231a..5a386cc7 100644
--- a/app/MindWork AI Studio/Pages/Chat.razor
+++ b/app/MindWork AI Studio/Pages/Chat.razor
@@ -16,82 +16,125 @@
-
-
- @if (this.chatThread is not null)
+
+ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES
+ && this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.TOGGLE_SIDEBAR
+ && !this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible)
+ {
+
+
+
+
+
+ }
+ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
+ {
+ @if ((this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.TOGGLE_SIDEBAR && this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible) || this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.SIDEBAR_ALWAYS_VISIBLE)
{
- foreach (var block in this.chatThread.Blocks.OrderBy(n => n.Time))
+ @if (this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.TOGGLE_SIDEBAR && this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible)
{
- @if (!block.HideFromUser)
- {
-
- }
+
+
+
+
+
+
+
+
+
+
+ }
+ else
+ {
+
+
+
+
+
}
}
-
-
-
-
-
-
- @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
+ }
+
+
+ @if (this.chatThread is not null)
{
-
-
+ foreach (var block in this.chatThread.Blocks.OrderBy(n => n.Time))
+ {
+ @if (!block.HideFromUser)
+ {
+
+ }
+ }
+ }
+
+
+
+
+
+
+ @if (
+ this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES
+ && this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.TOGGLE_OVERLAY)
+ {
+
+
+
+ }
+
+ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY)
+ {
+
+
+
+ }
+
+
+
- }
- @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_MANUALLY)
- {
-
-
-
- }
+ @if (!string.IsNullOrWhiteSpace(this.currentWorkspaceName))
+ {
+
+
+
+ }
-
-
-
+ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
+ {
+
+
+
+ }
- @if (!string.IsNullOrWhiteSpace(this.currentWorkspaceName))
- {
-
-
-
- }
-
- @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.STORE_CHATS_AUTOMATICALLY)
- {
-
-
-
- }
+ @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
+ {
+
+
+
+ }
- @if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is not WorkspaceStorageBehavior.DISABLE_WORKSPACES)
- {
-
-
-
- }
+ @if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
+ {
+
+ }
- @if (this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence)
- {
-
- }
+
+
+
+
+
-
-
-
-
-
-@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior != WorkspaceStorageBehavior.DISABLE_WORKSPACES)
+@if (
+ this.SettingsManager.ConfigurationData.Workspace.StorageBehavior != WorkspaceStorageBehavior.DISABLE_WORKSPACES
+ && this.SettingsManager.ConfigurationData.Workspace.DisplayBehavior is WorkspaceDisplayBehavior.TOGGLE_OVERLAY)
{
-
+
Your workspaces
-
+
diff --git a/app/MindWork AI Studio/Pages/Chat.razor.cs b/app/MindWork AI Studio/Pages/Chat.razor.cs
index 909b3cb1..6452dc9b 100644
--- a/app/MindWork AI Studio/Pages/Chat.razor.cs
+++ b/app/MindWork AI Studio/Pages/Chat.razor.cs
@@ -42,7 +42,7 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
private string userInput = string.Empty;
private string currentWorkspaceName = string.Empty;
private Guid currentWorkspaceId = Guid.Empty;
- private bool workspacesVisible;
+ private bool workspaceOverlayVisible;
private Workspaces? workspaces;
private bool mustScrollToBottomAfterRender;
private bool mustStoreChat;
@@ -157,6 +157,8 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
private string UserInputStyle => this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence ? this.providerSettings.UsedLLMProvider.GetConfidence(this.SettingsManager).SetColorStyle(this.SettingsManager) : string.Empty;
private string UserInputClass => this.SettingsManager.ConfigurationData.LLMProviders.ShowProviderConfidence ? "confidence-border" : string.Empty;
+
+ private string WorkspaceSidebarToggleIcon => this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible ? Icons.Material.Filled.ArrowCircleLeft : Icons.Material.Filled.ArrowCircleRight;
private void ProfileWasChanged(Profile profile)
{
@@ -308,9 +310,15 @@ public partial class Chat : MSGComponentBase, IAsyncDisposable
}
}
- private void ToggleWorkspaces()
+ private void ToggleWorkspaceOverlay()
{
- this.workspacesVisible = !this.workspacesVisible;
+ this.workspaceOverlayVisible = !this.workspaceOverlayVisible;
+ }
+
+ private async Task ToggleWorkspaceSidebar()
+ {
+ this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible = !this.SettingsManager.ConfigurationData.Workspace.IsSidebarVisible;
+ await this.SettingsManager.StoreSettings();
}
private async Task SaveThread()