2.4.1 #7
@@ -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
|
||||
|
||||
@@ -185,6 +185,7 @@ struct MessageRow: View {
|
||||
.foregroundColor(.oaiSecondary)
|
||||
}
|
||||
}
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
}
|
||||
.padding(16)
|
||||
.background(Color.messageBackground(for: message.role))
|
||||
|
||||
Reference in New Issue
Block a user