From 1be3f819205f07491e8952e4719742f8ae1832b5 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 13 Mar 2025 12:59:35 -0400 Subject: [PATCH] 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 --- crates/assistant2/src/thread.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/crates/assistant2/src/thread.rs b/crates/assistant2/src/thread.rs index ae2ffa3502..2cad563ab5 100644 --- a/crates/assistant2/src/thread.rs +++ b/crates/assistant2/src/thread.rs @@ -799,6 +799,10 @@ impl Thread { pub fn to_markdown(&self) -> Result { let mut markdown = Vec::new(); + if let Some(summary) = self.summary() { + writeln!(markdown, "# {summary}\n")?; + }; + for message in self.messages() { writeln!( markdown,