mirror of
https://github.com/hanzoai/dev.git
synced 2026-10-25 03:32:32 +00:00
fix(tui/auto): keep summary footer without ellipsis
This commit is contained in:
@@ -577,20 +577,18 @@ impl AutoCoordinatorView {
|
||||
}
|
||||
}
|
||||
|
||||
if !content_lines.is_empty()
|
||||
&& !footer_lines.is_empty()
|
||||
&& has_button_block
|
||||
&& footer_lines
|
||||
if !content_lines.is_empty() && !footer_lines.is_empty() {
|
||||
if has_button_block {
|
||||
// keep the button snug against the prompt/status text
|
||||
} else if footer_lines
|
||||
.first()
|
||||
.map(|line| line.width() == 0)
|
||||
.unwrap_or(false)
|
||||
{
|
||||
// Already have leading spacer
|
||||
} else if !content_lines.is_empty()
|
||||
&& !footer_lines.is_empty()
|
||||
&& has_button_block
|
||||
{
|
||||
footer_lines.insert(0, Line::default());
|
||||
{
|
||||
// already spaced
|
||||
} else {
|
||||
footer_lines.insert(0, Line::default());
|
||||
}
|
||||
}
|
||||
|
||||
let available_height = inner.height as usize;
|
||||
|
||||
@@ -10402,7 +10402,8 @@ impl ChatWidget<'_> {
|
||||
.clone()
|
||||
};
|
||||
|
||||
let mut status_lines = vec![append_thought_ellipsis(&status_text)];
|
||||
let headline = self.auto_format_status_headline(&status_text);
|
||||
let mut status_lines = vec![headline];
|
||||
if self.auto_state.waiting_for_response && !self.auto_state.coordinator_waiting {
|
||||
if let Some(summary) = self.auto_state.last_decision_summary.as_ref() {
|
||||
let trimmed = summary.trim();
|
||||
@@ -10516,6 +10517,28 @@ impl ChatWidget<'_> {
|
||||
.send(AppEvent::ScheduleFrameIn(Duration::from_millis(interval)));
|
||||
}
|
||||
|
||||
fn auto_format_status_headline(&self, text: &str) -> String {
|
||||
let trimmed = text.trim_end();
|
||||
if trimmed.is_empty() {
|
||||
return String::new();
|
||||
}
|
||||
|
||||
let show_summary_without_ellipsis = self.auto_state.awaiting_submission
|
||||
&& self.auto_state.current_reasoning_title.is_none()
|
||||
&& self
|
||||
.auto_state
|
||||
.current_summary
|
||||
.as_ref()
|
||||
.map(|summary| !summary.trim().is_empty())
|
||||
.unwrap_or(false);
|
||||
|
||||
if show_summary_without_ellipsis {
|
||||
trimmed.to_string()
|
||||
} else {
|
||||
append_thought_ellipsis(trimmed)
|
||||
}
|
||||
}
|
||||
|
||||
fn auto_update_display_title(&mut self) {
|
||||
if !self.auto_state.active {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user