diff --git a/app/MindWork AI Studio/Components/ChatComponent.razor.cs b/app/MindWork AI Studio/Components/ChatComponent.razor.cs index fff2a9f5..b1b9e2f0 100644 --- a/app/MindWork AI Studio/Components/ChatComponent.razor.cs +++ b/app/MindWork AI Studio/Components/ChatComponent.razor.cs @@ -293,6 +293,12 @@ public partial class ChatComponent : MSGComponentBase, IAsyncDisposable // We select the first 10 words of the user input: var words = firstUserInput.Split(' ', StringSplitOptions.RemoveEmptyEntries); var threadName = string.Join(' ', words.Take(10)); + threadName = threadName.Trim(); + + // Remove all line breaks: + threadName = threadName.Replace("\r", string.Empty); + threadName = threadName.Replace("\n", " "); + threadName = threadName.Replace("\t", " "); // If the thread name is empty, we use a default name: if (string.IsNullOrWhiteSpace(threadName)) diff --git a/app/MindWork AI Studio/wwwroot/changelog/v0.9.42.md b/app/MindWork AI Studio/wwwroot/changelog/v0.9.42.md index d69edced..ef529ad5 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v0.9.42.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v0.9.42.md @@ -4,6 +4,7 @@ - Improved the model selection for OpenAI by removing all `o1-pro` models. These models cannot be used right now, since OpenAI introduced a new API, which is not yet supported by MindWork AI Studio. - Improved the internal plugin maintenance so that removed resources are now removed from the file system. - Improved the app settings to apply the chosen language immediately. +- Improved chat name generation to prevent the inclusion of line breaks, tabs, and other special characters. - Fixed an issue where empty lines in source code were being ignored by the Markdown renderer. Thanks My Nihongo for fixing this bug in the `MudBlazor.Markdown` repository. - Fixed the localization assistant not being able to load the localization file when used in the release app. - Upgraded Rust & .NET dependencies. \ No newline at end of file