diff --git a/oAI/Views/Main/MarkdownContentView.swift b/oAI/Views/Main/MarkdownContentView.swift index 4772519..7c60873 100644 --- a/oAI/Views/Main/MarkdownContentView.swift +++ b/oAI/Views/Main/MarkdownContentView.swift @@ -61,8 +61,15 @@ struct MarkdownContentView: View { .markdownBlockStyle(\.paragraph) { configuration in configuration.label .markdownMargin(top: 0, bottom: 8) + // MarkdownUI builds mixed-style paragraphs (bold/italic runs alongside + // plain text) as concatenated Text(+) segments, which on macOS report + // their ideal (unwrapped, single-line) size instead of wrapping to the + // width actually available — truncating with "…" mid-word. Forcing the + // height to be recomputed for the given (flexible) width fixes it. + .fixedSize(horizontal: false, vertical: true) } .textSelection(.enabled) + .frame(maxWidth: .infinity, alignment: .leading) } // MARK: - Parsing diff --git a/oAI/Views/Main/MessageRow.swift b/oAI/Views/Main/MessageRow.swift index 16f554c..ee42c0c 100644 --- a/oAI/Views/Main/MessageRow.swift +++ b/oAI/Views/Main/MessageRow.swift @@ -185,6 +185,7 @@ struct MessageRow: View { .foregroundColor(.oaiSecondary) } } + .frame(maxWidth: .infinity, alignment: .leading) } .padding(16) .background(Color.messageBackground(for: message.role))