assistant2: Include the thread summary in the Markdown representation (#26693)

This PR adds the thread's summary (if it has one) as a heading in the
Markdown representation.

Release Notes:

- N/A
This commit is contained in:
Marshall Bowers 2025-03-13 12:59:35 -04:00 committed by GitHub
parent 2eb4d6b7eb
commit 1be3f81920
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -799,6 +799,10 @@ impl Thread {
pub fn to_markdown(&self) -> Result<String> {
let mut markdown = Vec::new();
if let Some(summary) = self.summary() {
writeln!(markdown, "# {summary}\n")?;
};
for message in self.messages() {
writeln!(
markdown,