Conversation
|
Warning Review limit reached
More reviews will be available in 37 minutes. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more in the billing tab. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (4)
📝 WalkthroughWalkthroughThis PR enhances the TUI chat interface by adding system clipboard support, enabling exit/quit commands via direct chat input, changing the quit keyboard shortcut from ctrl+c to ctrl+q/super+q, and adjusting approval prompt layout and anchoring. The changes span clipboard helpers, chat input widgets, application bindings, and UI styling. ChangesChat Input and Exit Flow Enhancements
Sequence Diagram(s)sequenceDiagram
participant User
participant ChatInput
participant Clipboard as clipboard.py
participant App as MTVApp
User->>ChatInput: Press ctrl+v or paste action
ChatInput->>Clipboard: read_system_clipboard()
Clipboard-->>ChatInput: clipboard text
ChatInput->>ChatInput: Insert first line at selection
sequenceDiagram
participant User
participant ChatInput
participant App as MTVApp
User->>ChatInput: Type "exit" or "quit"
ChatInput->>App: on_chat_submitted(message)
App->>App: Detect exit/quit keyword
App->>App: self.exit()
App-->>User: Application closes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@mtv_agent/tui/app.py`:
- Around line 129-131: The bare-text exit handling calls self.exit() but never
closes self.client, creating inconsistent cleanup compared to action_quit()
which closes the client; update the handler that checks if
message.strip().lower() in ("exit","quit") to close or await closing of
self.client (same way action_quit() does) before calling self.exit(), or
refactor both the message handler and action_quit() to call a single cleanup
method (e.g., close_client_or_cleanup()) so all exit paths (the message branch,
slash commands, and action_quit()) perform the same client shutdown.
- Around line 230-235: Update the help text in mtv_agent/tui/app.py to
explicitly state that typing "exit" or "quit" (without a leading slash) will
also quit the application; add a short line alongside the existing "cmd+q /
ctrl+q Quit the application" or near the "/quit" and "/exit" entries so
users see that bare exit/quit (which are included in SLASH_COMMANDS and handled
by the input handling logic that triggers immediate exit) will close the app.
In `@mtv_agent/tui/clipboard.py`:
- Around line 10-18: The clipboard handlers read_system_clipboard and
write_system_clipboard currently treat non-macOS platforms as using xclip
(silently failing on Windows); update these functions to detect sys.platform ==
"win32" and use the native Windows clipboard commands (e.g., PowerShell
Get-Clipboard for read and Set-Clipboard or clip for write) while keeping macOS
pbpaste/pbcopy and Linux xclip paths; add explicit error handling so missing
tooling raises/logs a clear message (and return the same fallback values) and
add a short note to the README or project docs stating that Linux requires xclip
(or xsel) as an external dependency and Windows uses PowerShell clipboard
commands.
🪄 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: c44c734a-06f6-4598-8fda-baf07ccf66c6
⛔ Files ignored due to path filters (1)
uv.lockis excluded by!**/*.lock
📒 Files selected for processing (4)
mtv_agent/tui/app.pymtv_agent/tui/clipboard.pymtv_agent/tui/widgets/approval.pymtv_agent/tui/widgets/input.py
Signed-off-by: yaacov <yzamir@redhat.com>
Summary by CodeRabbit
New Features
exitorquitin chat input (case-insensitive)UI/UX Updates