Omit empty description from task prompt (#867)

This commit is contained in:
Solomon
2025-09-26 16:00:20 +01:00
committed by GitHub
parent 2374e470d4
commit 4a40387660

View File

@@ -80,7 +80,7 @@ pub struct UpdateTask {
impl Task {
pub fn to_prompt(&self) -> String {
if let Some(description) = &self.description {
if let Some(description) = self.description.as_ref().filter(|d| !d.trim().is_empty()) {
format!("Title: {}\n\nDescription:{}", &self.title, description)
} else {
self.title.clone()