Open
Conversation
- Reorganize helper functions into logical groups with section comments - Fix nil check for previousLines in TUI render logic - Reorder parameters in renderChangedLines for better consistency
Restructure code by extracting overlay-related types and functions from type.go to a new overlay.go file to improve code organization and maintainability.
Move regex pattern compilation to package level to avoid repeated compilation
- Add proper signal handling for graceful shutdown in both input and chat examples - Enhance chat responses with markdown formatting for better visual distinction
Move the cursor rendering logic from Render method to a new renderLineWithCursor function to improve code organization and maintainability. The new method handles all cursor-related display logic including cursor position calculation, marker placement, and padding checks.
Move VisibleWidth and AnsiCodeTracker functionality from utils.go to dedicated files visible_width.go and ansi_tracker.go respectively
…nctions - Replace custom string splitting and joining with standard library functions - Use strings.Builder for more efficient string concatenation - Remove unused helper functions parseCode, splitSemicolon and joinStrings
Add detailed documentation including struct description, method explanations, and complete usage examples. The documentation covers all functionality including text formatting, color handling, and line wrapping scenarios.
- Split large Process method into smaller, focused methods - Add input validation for ANSI code format - Improve handling of extended color codes (256-color and RGB) - Better organize standard SGR code processing - Add comments to clarify code sections
Add new method to clear previous render state and force a fresh render. This is useful when the UI needs to be completely redrawn due to significant changes.
- Extract ANSI code handling into dedicated ansi.go module - Create text_segment.go for segment type definitions and grapheme utilities - Add text_slice.go with column-based slicing and segment extraction logic - Implement text_truncate.go for width-aware text truncation with ellipsis - Add text_utils.go with background application and whitespace utilities - Implement text_wrap.go for intelligent text wrapping functionality - Remove consolidated utils.go file in favor of focused modules - Improves code organization and maintainability by separating concerns
- Extract ResolveLayout method from TUI to OverlayOption receiver - Move overlay layout calculation logic to overlay.go for better separation of concerns - Update compositeOverlays to call options.ResolveLayout instead of t.ResolveOverlayLayout - Simplify TUI by removing 69-line ResolveOverlayLayout method - Improves code organization by keeping overlay-specific logic with overlay types
Replace iterative padding with direct slice allocation to improve performance when compositing overlays. Also comment out IDE directories in gitignore.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.