diff --git a/app/MindWork AI Studio/Chat/ContentBlockComponent.razor b/app/MindWork AI Studio/Chat/ContentBlockComponent.razor index 8d0689da..52999549 100644 --- a/app/MindWork AI Studio/Chat/ContentBlockComponent.razor +++ b/app/MindWork AI Studio/Chat/ContentBlockComponent.razor @@ -103,7 +103,7 @@ var segmentContent = segment.GetContent(renderPlan.Source); if (segment.Type is MarkdownRenderSegmentType.MARKDOWN) { - + } else { diff --git a/app/MindWork AI Studio/Tools/Markdown.cs b/app/MindWork AI Studio/Tools/Markdown.cs index 10a90163..e1f87d9c 100644 --- a/app/MindWork AI Studio/Tools/Markdown.cs +++ b/app/MindWork AI Studio/Tools/Markdown.cs @@ -10,6 +10,12 @@ public static class Markdown .DisableHtml() .Build(); + public static readonly MarkdownPipeline CHAT_MARKDOWN_PIPELINE = new MarkdownPipelineBuilder() + .UseAdvancedExtensions() + .UseSoftlineBreakAsHardlineBreak() + .DisableHtml() + .Build(); + public static MudMarkdownProps DefaultConfig => new() { Heading = diff --git a/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md b/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md index 8f16774a..e90be42a 100644 --- a/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md +++ b/app/MindWork AI Studio/wwwroot/changelog/v26.6.3.md @@ -4,4 +4,5 @@ - Improved the assistant overview so it shows which assistants are still running or have a result ready. - Improved the activity indicators for running chats and assistants so they use a consistent blue highlight. - Improved the chat experience by automatically focusing the message composer again when it becomes available. Thanks, Dominic Neuburg (`donework`), for the contribution. +- Improved the chat message formatting so line breaks in responses are preserved more closely, making structured text easier to read. Thanks, Dominic Neuburg (`donework`), for the contribution. - Upgraded Rust to v1.96.1 \ No newline at end of file