Show live terminal status in chat
Gitea Smoke / smoke (push) Successful in 1s
Gitea Android APK / build (push) Successful in 12m9s

This commit is contained in:
Codex
2026-07-12 09:03:14 +00:00
parent 1d9492aff5
commit c0904e6aaa
2 changed files with 83 additions and 6 deletions
@@ -130,6 +130,20 @@ final class TerminalScreenBuffer {
return output;
}
String renderTail(int maxRows) {
List<String> visible = new ArrayList<>();
for (int row = rows - 1; row >= 0 && visible.size() < maxRows; row--) {
String text = rowText(row).trim();
if (!text.isEmpty()) {
visible.add(0, text);
}
}
if (visible.isEmpty()) {
return "Waiting for terminal output";
}
return String.join("\n", visible);
}
CharSequence renderFocused(Set<String> expandedBlocks, FocusToggle toggle) {
SpannableStringBuilder output = new SpannableStringBuilder();
List<String> hiddenRows = new ArrayList<>();