Skip to content

feat(tui): add toggle to follow bash output in collapsed view#10

Closed
goniz wants to merge 1 commit intodevfrom
feat/bash-follow-collapsed
Closed

feat(tui): add toggle to follow bash output in collapsed view#10
goniz wants to merge 1 commit intodevfrom
feat/bash-follow-collapsed

Conversation

@goniz
Copy link
Copy Markdown
Owner

@goniz goniz commented Apr 3, 2026

Issue for this PR

Closes anomalyco#14247

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Added a new toggle in the TUI that allows to toggle the Bash collapsed output view between showing the head of the output (default today) and showing the tail -f view of the output.

How did you verify your code works?

Ran some long commands that output and used the toggle to check it works.

Eg find /

Screenshots / recordings

8607D626-CFD5-49A8-9D43-1CC0F4041E6D.Copy.mov

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

const limited = createMemo(() => {
if (expanded() || !overflow()) return output()
if (ctx.bashFollowCollapsed()) {
return ["…", ...lines().slice(-10)].join("\n")
Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be expensive cpu wise when a long and fast-pace output is streaming.
Propose a more efficient impl to stream the tail output

@goniz goniz force-pushed the feat/bash-follow-collapsed branch from 4347909 to 26bb119 Compare April 3, 2026 13:09
@goniz goniz force-pushed the feat/bash-follow-collapsed branch from 26bb119 to 9f60546 Compare April 3, 2026 13:54
@goniz goniz closed this Apr 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:Tool output preview should show last lines (tail -f effect) while streaming

1 participant