- Notifications
You must be signed in to change notification settings - Fork112
Pane.capture_pane helpers#568
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:master
Are you sure you want to change the base?
Uh oh!
There was an error while loading.Please reload this page.
Conversation
sourcery-aibot commentedFeb 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Reviewer's Guide by SourceryThis pull request introduces snapshot and recording functionality for tmux panes. It adds Sequence diagram for creating a PaneSnapshotsequenceDiagram participant User participant Pane participant PaneSnapshot User->>Pane: snapshot(start, end) Pane->>PaneSnapshot: from_pane(self, start, end) activate PaneSnapshot PaneSnapshot-->>Pane: PaneSnapshot instance deactivate PaneSnapshot Pane-->>User: PaneSnapshot instanceSequence diagram for creating a PaneRecording and adding a snapshotsequenceDiagram participant User participant Pane participant PaneRecording participant PaneSnapshot User->>Pane: record() Pane->>PaneRecording: PaneRecording() activate PaneRecording PaneRecording-->>Pane: PaneRecording instance deactivate PaneRecording User->>PaneRecording: add_snapshot(pane, start, end) PaneRecording->>Pane: snapshot(start, end) Pane->>PaneSnapshot: from_pane(self, start, end) activate PaneSnapshot PaneSnapshot-->>Pane: PaneSnapshot instance deactivate PaneSnapshot Pane->>PaneRecording: append(PaneSnapshot) PaneRecording-->>User: voidUpdated class diagram for Pane, PaneSnapshot, and PaneRecordingclassDiagram class Pane { +capture_pane() +snapshot() +record() } class PaneSnapshot { +content: list[str] +timestamp: datetime +pane_id: str +window_id: str +session_id: str +server_name: str +metadata: dict[str, str] +from_pane() +content_str } class PaneRecording { +snapshots: list[PaneSnapshot] +add_snapshot() +latest +get_snapshots_between() } Pane -- PaneSnapshot : creates Pane -- PaneRecording : creates PaneRecording -- PaneSnapshot : containsFile-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess yourdashboard to:
Getting Help
|
codecovbot commentedFeb 15, 2025 • edited
Loading Uh oh!
There was an error while loading.Please reload this page.
edited
Uh oh!
There was an error while loading.Please reload this page.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@## context-managers #568 +/- ##====================================================+ Coverage 88.84% 89.27% +0.42%==================================================== Files 36 38 +2 Lines 4080 4288 +208 Branches 376 378 +2 ====================================================+ Hits 3625 3828 +203- Misses 310 313 +3- Partials 145 147 +2 ☔ View full report in Codecov by Sentry. |
c58334b tofc1d7f4Comparefc1d7f4 toc61ba63Comparec305c76 to6d91728Compare6d91728 to3cc1d33Compare3cc1d33 to42e0ac8Compare0188aed toea5b0c4Compare
Uh oh!
There was an error while loading.Please reload this page.
Changes
feat: Add
test_snapshotTest plan
Coverage
Automatic
Summary by Sourcery
Introduce snapshot and recording functionality for tmux panes. This allows capturing and analyzing pane content and metadata at various points in time. Add tests to verify the correctness of the new features.
New Features:
Pane.snapshot()to create a snapshot of the pane's current state.Pane.record()to create a recording of pane snapshots.PaneSnapshotclass to store pane content and metadata.PaneRecordingclass to manage a time-series of pane snapshots.test_snapshotto test the snapshot functionality and ensure correctness of capturing pane content and metadata.test_pane_recordingto test the recording functionality, including adding snapshots, iterating through them, and filtering by time.Tests: