Add agent context compaction
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user