Skip to content

Feature/iterm2 glimpse pane tail lines#1

Open
lehenbauer wants to merge 3 commits into
sumchattering:mainfrom
lehenbauer:feature/iterm2-glimpse-pane-tail-lines
Open

Feature/iterm2 glimpse pane tail lines#1
lehenbauer wants to merge 3 commits into
sumchattering:mainfrom
lehenbauer:feature/iterm2-glimpse-pane-tail-lines

Conversation

@lehenbauer

Copy link
Copy Markdown

Adds a new iterm2_glimpse_pane tool to read only the bottom lines of a pane's visible screen buffer. This is particularly useful for quickly checking the recent output of long-running processes or logs without consuming the tokens required to read the entire screen.

Key Features:

  • Targeted Reading: Reads the last tail_lines (default: 10, max: 200) from the visible screen buffer.
  • Smart Anchoring: Automatically ignores trailing empty lines, ensuring the "glimpse" anchored to the actual most recent output.
  • Isolated Implementation: The new functionality is completely self-contained within glimpse_pane. The existing read_pane logic and its underlying mechanisms remain strictlyuntouched to guarantee zero regressions for current users.

Example Usage:
"Give me a quick glimpse of t3p1" - Claude will read just the bottom tail of the pane.

Testing:

  • Added comprehensive integration tests for glimpse, verifying successful reads, line counting, truncation flags, and argument validation. All tests pass.

- Revert changes to `read_pane`
- Remove shared `read_visible_lines` helper
- Inline screen reading and trimming directly into `glimpse_pane` to keep the feature self-contained and avoid touching existing logic
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.

1 participant