feat: add HasRecording method to Recorder and update RunInteractive t… - #6
Conversation
…o check for recordings
📝 WalkthroughWalkthroughThis change adds a Changes
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@internal/session/session.go`:
- Around line 130-134: HasRecording() currently checks r.file != nil which
becomes false after Recorder.Close() clears r.file; instead introduce/persist a
boolean field on Recorder (e.g., hasRecording or recordingExists) that is set
true when a recording is created/opened and is not cleared by Close(), update
the recording creation/opening site to set this flag, change HasRecording() to
return that boolean, and ensure Close() only closes/clears r.file but does not
reset the persistent recording flag so downstream callers still get the resume
hint.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro
Run ID: e7791acb-e8e6-4541-a5cd-6a8c8d377a14
📒 Files selected for processing (2)
internal/command/interactive.gointernal/session/session.go
feat: add HasRecording method to Recorder and update RunInteractive t…
…o check for recordings
Summary by CodeRabbit