-
Notifications
You must be signed in to change notification settings - Fork 3
Merge PRs: #4898 #4791 #4900 #4709 #65
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Added a search input component to allow users to search through messages. - Implemented logic to highlight search matches and navigate between them. - Updated the theme syntax rules to include strikethrough styling. - Enhanced message rendering to support search highlighting for text and markdown parts.
Adds an bash output viewer with full ANSI color support. When bash commands produce more than 20 lines of output, users can click to expand into a full-screen viewer with syntax highlighting and keyboard navigation. Key features: - Full ANSI/VT color rendering using opentui-ansi-vt terminal emulation - Truncated preview (20 lines) with 'Click to view full output' expansion - Prompt text preservation when entering/exiting viewer - Force color output in bash commands (FORCE_COLOR, CLICOLOR, TERM env vars) Technical changes: - Added opentui-ansi-vt dependency for terminal buffer rendering - Added initialValue prop to Prompt component to restore draft text - Strip ANSI codes for search to match actual text content
- Refactored match navigation logic to prevent scrolling to the same message when navigating through matches. - Enhanced search highlighting to correctly identify and highlight query text within code blocks. - Updated rendering of Assistant messages to include IDs for better scrolling functionality during searches.
…t get it working in Assistant Messages (markdown)
Merge upstream PR anomalyco#4898 from OpeOginni: - Add SearchInput component for searching through messages - Implement match navigation with highlighting - Add strikethrough styling in theme syntax rules - Enable Ctrl+F keybind to toggle search mode
Merges upstream PR anomalyco#4791 which adds: - Bash output viewer with full ANSI color support using opentui-ansi-vt - Terminal emulation for accurate color rendering - Page up/down and Home/End navigation in bash output viewer - Click to view full output for truncated bash results - Forces color output in bash commands (FORCE_COLOR=1) - Adds initialValue prop to Prompt component for restoring drafts Preserves our local features: - Token tracking and context percentage display - Search in messages (Ctrl+F) from PR anomalyco#4898
…malyco#4900) Merge upstream PR anomalyco#4900 from AmineGuitouni: - Require pressing Ctrl+C twice within 2 seconds to exit - Show warning toast on first press: 'Press again to exit' - Prevents accidental exit during active sessions
…omalyco#4709) Cherry-pick fix from upstream PR anomalyco#4709 by arsham: - Use 'ignored' flag instead of 'synthetic' for accurate token counts - Fix sentEstimate formula to prevent double-counting tool result tokens - Add null checks in calculateToolResultTokens for safety - Prevents exponential growth from double-counting in session totals
- Add header explaining this is a fork for PR integration testing - Include table of merged PRs with upstream status - Preserve original opencode documentation below
…#4900, anomalyco#4709 fixes Merged upstream PRs: - anomalyco#4898: Search in messages (Ctrl+F) - anomalyco#4791: Bash output viewer with ANSI color support - anomalyco#4900: Double Ctrl+C to exit - anomalyco#4709: Token counting fixes for synthetic/noReply messages Updated README for shuvcode fork project.
|
Caution Review failedThe pull request is closed. WalkthroughPull request introduces a global search subsystem for TUI sessions with per-match highlighting across messages, a Bash command output viewer with pagination, enhancements to prompt components, and updates to token calculation and output processing logic. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SearchInput
participant SessionContext
participant MessageRenderer
participant TextPart
User->>SearchInput: Ctrl+F triggers search
SearchInput->>SessionContext: Update searchQuery
Note over SessionContext: Compute matches over all messages
SessionContext->>MessageRenderer: New matches available
User->>SearchInput: Type search term
SearchInput->>SessionContext: searchQuery updated
SessionContext->>SessionContext: Recompute matches<br/>(memoized)
SessionContext->>MessageRenderer: Render with highlighting
MessageRenderer->>TextPart: Pass query & messageID
TextPart->>TextPart: Choose renderer<br/>(SearchHighlighter or<br/>MarkdownSearchHighlighter)
TextPart-->>MessageRenderer: Render with match highlight
User->>SearchInput: Press Up/Down navigation
SearchInput->>SessionContext: handleNextMatch/<br/>handlePrevMatch
SessionContext->>SessionContext: Update currentMatchIndex
SessionContext->>MessageRenderer: Scroll to matched message
MessageRenderer->>MessageRenderer: Highlight active match
sequenceDiagram
participant User
participant BashTool
participant SessionContext
participant BashDisplay
participant TerminalRenderer
BashTool->>BashTool: Execute bash command
BashTool->>BashTool: Collect output<br/>(apply truncation)
BashTool->>BashTool: Convert via ptyToText
BashTool-->>SessionContext: Return processed output
SessionContext->>SessionContext: Store output in<br/>bashOutput context
SessionContext->>BashDisplay: Render preview (20 lines)
BashDisplay->>TerminalRenderer: Terminal buffer render
TerminalRenderer-->>BashDisplay: Rendered preview UI
User->>BashDisplay: Click "view full output"
BashDisplay->>SessionContext: showBashOutput(full)
SessionContext->>BashDisplay: Switch to full view
BashDisplay->>TerminalRenderer: Render full terminal
TerminalRenderer-->>User: Display paginated output
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Areas requiring extra attention:
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: CodeRabbit UI Review profile: CHILL Plan: Pro ⛔ Files ignored due to path filters (2)
📒 Files selected for processing (11)
Comment |
anomalyco#4898 - Search in messages - High utility, well-implemented, enhances navigation
anomalyco#4791 - Bash output with ANSI - Solid DX improvement, token-efficient
anomalyco#4900 - Double Ctrl+C - Simple safety feature, prevents frustration
anomalyco#4709 - Show live token usage during streaming
Summary by CodeRabbit
New Features
Bug Fixes
Style
✏️ Tip: You can customize this high-level summary in your review settings.