Skip to content

Commit 09d67bc

Browse files
Fixed the workspace name after re-rendering the chat component (#270)
1 parent 1681405 commit 09d67bc

File tree

2 files changed

+12
-3
lines changed

2 files changed

+12
-3
lines changed

app/MindWork AI Studio/Components/ChatComponent.razor.cs

+10-2
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,13 @@ protected override async Task OnInitializedAsync()
123123
this.mustLoadChat = true;
124124
this.Logger.LogInformation($"The loading of the chat '{this.loadChat.ChatId}' was deferred and will be loaded now.");
125125
}
126+
127+
if (this.ChatThread is not null)
128+
{
129+
this.currentWorkspaceId = this.ChatThread.WorkspaceId;
130+
this.currentWorkspaceName = await WorkspaceBehaviour.LoadWorkspaceName(this.ChatThread.WorkspaceId);
131+
this.WorkspaceName(this.currentWorkspaceName);
132+
}
126133

127134
await this.SelectProviderWhenLoadingChat();
128135
await base.OnInitializedAsync();
@@ -538,14 +545,15 @@ private async Task LoadedChatChanged()
538545
this.currentWorkspaceName = string.Empty;
539546
this.WorkspaceName(this.currentWorkspaceName);
540547
}
541-
548+
542549
await this.SelectProviderWhenLoadingChat();
543550
if (this.SettingsManager.ConfigurationData.Chat.ShowLatestMessageAfterLoading)
544551
{
545552
this.mustScrollToBottomAfterRender = true;
546553
this.scrollRenderCountdown = 2;
547-
this.StateHasChanged();
548554
}
555+
556+
this.StateHasChanged();
549557
}
550558

551559
private async Task ResetState()

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

+2-1
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,6 @@
33
- Improved message process debugging. This helps to identify issues related to the message handling.
44
- Fixed the hostname validation message for ERI v1 data sources.
55
- Fixed a memory leak in the chat component.
6-
- Fixed an issue with the workspace title not being updated when a chat was moved to another workspace.
6+
- Fixed an issue with the workspace title not being updated when a chat was moved to another workspace.
7+
- Fixed an issue with the chat component not loading the current workspace name when the component was refreshed.
78
- Removed the "send to" button from the ERI server assistant, since it is not supported.

0 commit comments

Comments
 (0)