mirror of
https://github.com/QwenLM/qwen-code.git
synced 2026-04-29 04:00:36 +00:00
- Add streaming-insight scenario for /insight command demo - Add progress.sh script to test PTY carriage return handling - Simplify generateGif with fixed frame durations (300ms normal, 1s edges) This enhances terminal capture testing with a real-world streaming scenario and cleaner GIF generation logic. Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
16 lines
No EOL
473 B
Bash
Executable file
16 lines
No EOL
473 B
Bash
Executable file
#!/bin/bash
|
|
# Progress bar script that overwrites the same line using \r
|
|
# Tests PTY's ability to handle carriage return / cursor movement
|
|
|
|
total=20
|
|
for ((i = 1; i <= total; i++)); do
|
|
pct=$((i * 100 / total))
|
|
filled=$((pct / 5))
|
|
empty=$((20 - filled))
|
|
bar=$(printf '%0.s#' $(seq 1 $filled 2>/dev/null))
|
|
space=$(printf '%0.s-' $(seq 1 $empty 2>/dev/null))
|
|
printf "\r[%s%s] %3d%% (%d/%d)" "$bar" "$space" "$pct" "$i" "$total"
|
|
sleep 0.5
|
|
done
|
|
echo ""
|
|
echo "Done!" |