Add agent context compaction

This commit is contained in:
Georg Bauer
2026-07-26 10:48:29 +02:00
parent 1dcadeb882
commit 6aa45b2cf0
12 changed files with 625 additions and 2 deletions

View File

@@ -56,6 +56,20 @@ impl App {
);
} else {
let markdown_style = markdown::Style::from_palette(app_theme().palette());
if let Some(summary) = self.compaction_summary() {
messages = messages.push(
container(
column![
text("Compacted task state").size(11),
text(summary).size(13).color(muted_text()),
]
.spacing(5),
)
.padding(14)
.width(Length::Fill)
.style(preference_group_style),
);
}
for (index, message) in self.conversation.iter().enumerate() {
let label = if message.user {
"You"
@@ -113,7 +127,9 @@ impl App {
);
}
} else if active && message.reasoning.is_none() {
body = body.push(text("Loading model…").size(14));
body = body.push(
text(self.activity.as_deref().unwrap_or("Loading model…")).size(14),
);
}
if !message.user && !message.tool {
for summary in