v0.2.14 : cadres aux couleurs du theme - bordures des tableaux (list, search, status, doctor, ls, dir, ps, help), version, menu d autocompletion et banniere colorees par theme (border)

This commit is contained in:
2026-08-16 13:17:07 -04:00
parent 79143e197d
commit 4b0f02a7c4
5 changed files with 45 additions and 12 deletions
+17 -8
View File
@@ -340,7 +340,7 @@ impl Highlighter for AmCompleter {
use std::borrow::Cow;
let _ = completion;
match candidate.chars().next() {
Some('╭') | Some('╰') | Some('├') => Cow::Owned(self.theme.dimmed(candidate)),
Some('╭') | Some('╰') | Some('├') => Cow::Owned(self.theme.frame(candidate)),
Some('│') => {
let cells: Vec<&str> = candidate.split('│').collect();
if cells.len() >= 4 {
@@ -461,8 +461,16 @@ pub fn banner_box(
let mut rows: Vec<String> = Vec::new();
let inner = |content: String| format!("│ {} │", pad_visible(content, w));
let blank = || inner(" ".to_string());
let frame = |s: &str| -> String {
if color {
theme.frame(s)
} else {
s.to_string()
}
};
// Top border with the centered header (title in the theme header color).
// Top border with the centered header (title in the theme header color,
// border in the theme frame color).
let title = format!(" Agent Manager v{version} · shell gateway ");
let title = if color {
theme.hdr(&title)
@@ -472,11 +480,12 @@ pub fn banner_box(
let fill = w + 2 - visible_len(&title);
let left = fill / 2;
let right = fill - left;
rows.push(dim(
&format!("╭{}{}{}╮", "─".repeat(left), title, "─".repeat(right)),
theme,
color,
));
rows.push(frame(&format!(
"╭{}{}{}╮",
"─".repeat(left),
title,
"─".repeat(right)
)));
// Block-art title, painted in the theme accent color.
for art in banner_art() {
@@ -587,7 +596,7 @@ pub fn banner_box(
theme,
color,
)));
rows.push(dim(&format!("╰{}╯", "─".repeat(w + 2)), theme, color));
rows.push(frame(&format!("╰{}╯", "─".repeat(w + 2))));
rows.join("\n")
}