Skip to content

Commit 219f6bc

Browse files
Fixed workspace settings access when workspaces are disabled (#611)
1 parent 0bb5b81 commit 219f6bc

File tree

4 files changed

+27
-19
lines changed

4 files changed

+27
-19
lines changed

app/MindWork AI Studio/Components/Workspaces.razor

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
case TreeItemData treeItem:
1313
@if (treeItem.Type is TreeItemType.CHAT)
1414
{
15-
<MudTreeViewItem T="ITreeItem" Icon="@treeItem.Icon" Value="@item.Value" Expanded="@item.Expanded" CanExpand="@treeItem.Expandable" Items="@treeItem.Children" OnClick="() => this.LoadChat(treeItem.Path, true)">
15+
<MudTreeViewItem T="ITreeItem" Icon="@treeItem.Icon" Value="@item.Value" Expanded="@item.Expanded" CanExpand="@treeItem.Expandable" Items="@treeItem.Children" OnClick="@(() => this.LoadChat(treeItem.Path, true))">
1616
<BodyContent>
1717
<div style="display: grid; grid-template-columns: 1fr auto; align-items: center; width: 100%">
1818
<MudText Style="justify-self: start;">
@@ -28,15 +28,15 @@
2828
<div style="justify-self: end;">
2929

3030
<MudTooltip Text="@T("Move to workspace")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
31-
<MudIconButton Icon="@Icons.Material.Filled.MoveToInbox" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.MoveChat(treeItem.Path)"/>
31+
<MudIconButton Icon="@Icons.Material.Filled.MoveToInbox" Size="Size.Medium" Color="Color.Inherit" OnClick="@(() => this.MoveChat(treeItem.Path))"/>
3232
</MudTooltip>
3333

3434
<MudTooltip Text="@T("Rename")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
35-
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.RenameChat(treeItem.Path)"/>
35+
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="@(() => this.RenameChat(treeItem.Path))"/>
3636
</MudTooltip>
3737

3838
<MudTooltip Text="@T("Delete")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
39-
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.DeleteChat(treeItem.Path)"/>
39+
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="@(() => this.DeleteChat(treeItem.Path))"/>
4040
</MudTooltip>
4141
</div>
4242
</div>
@@ -53,11 +53,11 @@
5353
</MudText>
5454
<div style="justify-self: end;">
5555
<MudTooltip Text="@T("Rename")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
56-
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.RenameWorkspace(treeItem.Path)"/>
56+
<MudIconButton Icon="@Icons.Material.Filled.Edit" Size="Size.Medium" Color="Color.Inherit" OnClick="@(() => this.RenameWorkspace(treeItem.Path))"/>
5757
</MudTooltip>
5858

5959
<MudTooltip Text="@T("Delete")" Placement="@WORKSPACE_ITEM_TOOLTIP_PLACEMENT">
60-
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="() => this.DeleteWorkspace(treeItem.Path)"/>
60+
<MudIconButton Icon="@Icons.Material.Filled.Delete" Size="Size.Medium" Color="Color.Inherit" OnClick="@(() => this.DeleteWorkspace(treeItem.Path))"/>
6161
</MudTooltip>
6262
</div>
6363
</div>
@@ -82,7 +82,7 @@
8282
<li>
8383
<div class="mud-treeview-item-content" style="background-color: unset;">
8484
<div class="mud-treeview-item-arrow"></div>
85-
<MudButton StartIcon="@treeButton.Icon" Variant="Variant.Filled" OnClick="treeButton.Action">
85+
<MudButton StartIcon="@treeButton.Icon" Variant="Variant.Filled" OnClick="@treeButton.Action">
8686
@treeButton.Text
8787
</MudButton>
8888
</div>

app/MindWork AI Studio/Dialogs/DocumentCheckDialog.razor

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,6 @@
7777
}
7878
</MudTabs>
7979
}
80-
8180
</DialogContent>
8281
<DialogActions>
8382
<MudButton OnClick="@this.Close" Variant="Variant.Filled" Color="Color.Primary">

app/MindWork AI Studio/Pages/Chat.razor

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,17 @@
1616
}
1717
</MudText>
1818

19-
<MudTooltip Text="@T("Show the chat options")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
20-
<MudIconButton Variant="Variant.Text" Icon="@Icons.Material.Filled.Settings" Color="Color.Default" OnClick="@this.OpenChatSettingsDialog"/>
21-
</MudTooltip>
19+
<MudToolBar WrapContent="false" Gutters="false">
20+
@if (this.SettingsManager.ConfigurationData.Workspace.StorageBehavior is WorkspaceStorageBehavior.DISABLE_WORKSPACES)
21+
{
22+
<MudTooltip Text="@T("Configure your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
23+
<MudIconButton Icon="@Icons.Material.Filled.Settings" OnClick="@(async () => await this.OpenWorkspacesSettingsDialog())"/>
24+
</MudTooltip>
25+
}
26+
<MudTooltip Text="@T("Show the chat options")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
27+
<MudIconButton Icon="@Icons.Material.Filled.Settings" Color="Color.Default" OnClick="@this.OpenChatSettingsDialog"/>
28+
</MudTooltip>
29+
</MudToolBar>
2230
</MudStack>
2331

2432
<ProviderSelection @bind-ProviderSettings="@this.providerSettings"/>
@@ -36,10 +44,10 @@
3644
@T("Your workspaces")
3745
</MudText>
3846
<MudTooltip Text="@T("Configure your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
39-
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="async () => await this.OpenWorkspacesSettingsDialog()"/>
47+
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="@(async () => await this.OpenWorkspacesSettingsDialog())"/>
4048
</MudTooltip>
4149
<MudTooltip Text="@T("Hide your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
42-
<MudIconButton Size="Size.Medium" Icon="@this.WorkspaceSidebarToggleIcon" Class="me-1" OnClick="() => this.ToggleWorkspaceSidebar()"/>
50+
<MudIconButton Size="Size.Medium" Icon="@this.WorkspaceSidebarToggleIcon" Class="me-1" OnClick="@(() => this.ToggleWorkspaceSidebar())"/>
4351
</MudTooltip>
4452
</MudStack>
4553
</HeaderContent>
@@ -59,7 +67,7 @@
5967
</MudText>
6068
<MudSpacer/>
6169
<MudTooltip Text="@T("Configure your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
62-
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="async () => await this.OpenWorkspacesSettingsDialog()"/>
70+
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="@(async () => await this.OpenWorkspacesSettingsDialog())"/>
6371
</MudTooltip>
6472
</MudStack>
6573
</HeaderContent>
@@ -85,13 +93,13 @@
8593
<MudPaper Class="border border-solid rounded-lg mb-3 d-flex">
8694
<MudStack Row="false" AlignItems="AlignItems.Center" StretchItems="StretchItems.Middle" Wrap="Wrap.NoWrap">
8795
<MudTooltip Text="@T("Show your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
88-
<MudIconButton Size="Size.Medium" Icon="@this.WorkspaceSidebarToggleIcon" OnClick="() => this.ToggleWorkspaceSidebar()"/>
96+
<MudIconButton Size="Size.Medium" Icon="@this.WorkspaceSidebarToggleIcon" OnClick="@(() => this.ToggleWorkspaceSidebar())"/>
8997
</MudTooltip>
9098
<MudText Typo="Typo.h6" Style="writing-mode: vertical-lr; word-spacing: 0.5em;">
9199
@T("Your workspaces")
92100
</MudText>
93101
<MudTooltip Text="@T("Configure your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
94-
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="async () => await this.OpenWorkspacesSettingsDialog()"/>
102+
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="@(async () => await this.OpenWorkspacesSettingsDialog())"/>
95103
</MudTooltip>
96104
</MudStack>
97105
</MudPaper>
@@ -125,9 +133,9 @@
125133
</MudText>
126134

127135
<MudTooltip Text="@T("Configure your workspaces")" Placement="@TOOLBAR_TOOLTIP_PLACEMENT">
128-
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="async () => await this.OpenWorkspacesSettingsDialog()"/>
136+
<MudIconButton Icon="@Icons.Material.Filled.Settings" Size="Size.Medium" OnClick="@(async () => await this.OpenWorkspacesSettingsDialog())"/>
129137
</MudTooltip>
130-
<MudIconButton Icon="@Icons.Material.Filled.Close" Color="Color.Error" Size="Size.Medium" OnClick="() => this.ToggleWorkspacesOverlay()"/>
138+
<MudIconButton Icon="@Icons.Material.Filled.Close" Color="Color.Error" Size="Size.Medium" OnClick="@(() => this.ToggleWorkspacesOverlay())"/>
131139
</MudStack>
132140
</MudDrawerHeader>
133141
<MudDrawerContainer Class="ml-6">

app/MindWork AI Studio/wwwroot/changelog/v0.9.55.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
- Added support for newer Mistral models (Mistral 3, Voxtral, and Magistral).
33
- Added support for the new OpenAI model GPT 5.2.
44
- Added support for OpenRouter as LLM and embedding provider.
5-
- Added support for multimodal processing (documents and images for now), when the selected LLM supports it.
5+
- Added support for multimodal processing (documents and images, for now) when the selected LLM supports it.
66
- Added a description field to local data sources (preview feature) so that the data selection agent has more information about which data each local source contains when selecting data sources.
77
- Added the ability to use file attachments (including images) in chat. This is the initial implementation of this feature. We will continue to develop this feature and refine it further based on user feedback. Many thanks to Sabrina `Sabrina-devops` for this wonderful contribution.
88
- Improved the document analysis assistant (in preview) by adding descriptions to the different sections.
@@ -21,4 +21,5 @@
2121
- Fixed a rare bug in the Microsoft Word export for huge documents.
2222
- Fixed a bug in the chat options that occurred when selecting default data sources. Under certain conditions, selecting data sources caused an error that required restarting the app. This preview-only feature (RAG preview) had not been released yet.
2323
- Fixed a bug in the chat template selection where the "No chat template" entry could not be localized, causing English text to appear in languages such as German. This behavior has now been fixed.
24+
- Fixed a workspace-related bug where disabling workspaces completely prevented access to the workspace settings. Workspace settings now appear next to chat settings in this case. Thanks to Paul `PaulKoudelka` for reporting.
2425
- Upgraded dependencies such as Rust, MudBlazor, and others.

0 commit comments

Comments
 (0)