From: Adrien Gallouët Date: Fri, 10 Apr 2026 06:24:53 +0000 (+0200) Subject: common : add fluidity to the progress bar (#21671) X-Git-Tag: upstream/0.0.10438~1697 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=e095a482a02301ae39d1468a6096a1516a2ed6ed;p=pkg%2Fggml%2Fsources%2Fllama.cpp common : add fluidity to the progress bar (#21671) Signed-off-by: Adrien Gallouët --- diff --git a/common/download.cpp b/common/download.cpp index 055f0038f..561164591 100644 --- a/common/download.cpp +++ b/common/download.cpp @@ -174,7 +174,7 @@ public: } int lines_up = max_line - lines[this]; - size_t bar = 55 - len; + size_t bar = (55 - len) * 2; size_t pct = (100 * current) / total; size_t pos = (bar * current) / total; @@ -183,8 +183,8 @@ public: } std::cout << '\r' << "Downloading " << filename << " "; - for (size_t i = 0; i < bar; ++i) { - std::cout << (i < pos ? "—" : " "); + for (size_t i = 0; i < bar; i += 2) { + std::cout << (i + 1 < pos ? "─" : (i < pos ? "╴" : " ")); } std::cout << std::setw(4) << pct << "%\033[K";