-
Notifications
You must be signed in to change notification settings - Fork 15
fix issues and complete TODOs #29
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
base: main
Are you sure you want to change the base?
Conversation
- Implemented Set-CursorPosition, Save-CursorPosition, and Restore-CursorPosition cmdlets for cursor control. - Introduced ExpandVariableCommand for variable expansion in strings. - Created Position class to manage cursor positions and metadata serialization. - Added StringExtensions for UTF-32 conversion and PowerShell string escaping. - Updated Pansies.psd1 to include new cmdlets in export list. - Added Pester tests for new functionality.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This pull request introduces several new features and improvements to the Pansies codebase, focusing on enhanced color space configuration, cursor position management, PowerShell command capabilities, and codebase robustness. The changes primarily add new PowerShell cmdlets, improve XTerm color handling, and introduce thread-safe color space configuration.
- Added new PowerShell cmdlets for variable expansion and cursor control
- Implemented thread-safe XYZ color space white reference management
- Refactored RgbColor class for better maintainability and XTerm color handling
Reviewed Changes
Copilot reviewed 14 out of 14 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Tests/Commands.Tests.ps1 | Comprehensive test suite for new cursor commands, position helpers, and variable expansion functionality |
| Source/Pansies.psd1 | Updated module manifest to export new cmdlets and reformatted for consistency |
| Source/Pansies.deps.json | Added dependency configuration file for .NET Standard 2.0 |
| Source/Assembly/StringExtensions.cs | New utility class for UTF-32 conversion and PowerShell string escaping |
| Source/Assembly/RgbColor.cs | Refactored XTerm color initialization and added platform-aware color mode detection |
| Source/Assembly/Position.cs | New class for cursor position management with serialization support |
| Source/Assembly/IPsMetadataSerializable.cs | Interface for PowerShell metadata serialization |
| Source/Assembly/Commands/SetCursorPosition.cs | Cmdlet for setting cursor positions with absolute/relative positioning |
| Source/Assembly/Commands/SaveCursorPosition.cs | Cmdlet for saving current cursor position |
| Source/Assembly/Commands/RestoreCursorPosition.cs | Cmdlet for restoring saved cursor position |
| Source/Assembly/Commands/ExpandVariableCommand.cs | Complex cmdlet for expanding variables in code with multiple parameter sets |
| Source/Assembly/ColorSpaces/Conversions/XyzConverter.cs | Thread-safe white reference management for XYZ color space |
| Source/Assembly/ColorSpaceConfiguration.cs | Public API for color space configuration |
| Pansies.sln | Visual Studio solution file for project organization |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made changes
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
applied suggested fixes
This pull request introduces several new features and improvements to the Pansies codebase, focusing on enhanced color space configuration, cursor position management, PowerShell command capabilities, and codebase robustness. The most significant changes include new PowerShell cmdlets for cursor and variable management, thread-safe configuration for color spaces, and refactoring in the
RgbColorclass for better maintainability and reliability.PowerShell Cmdlets
ExpandVariableCommand,SaveCursorPositionCommand,RestoreCursorPositionCommand, andSetCursorPositionCommand, enabling advanced variable expansion and cursor control directly from PowerShell. (Source/Assembly/Commands/ExpandVariableCommand.cs[1]Source/Assembly/Commands/SaveCursorPosition.cs[2]Source/Assembly/Commands/RestoreCursorPosition.cs[3]Source/Assembly/Commands/SetCursorPosition.cs[4]Color Space Configuration
ColorSpaceConfigurationfor thread-safe management of the XYZ color space white reference, including methods to get, set, and reset the reference. (Source/Assembly/ColorSpaceConfiguration.cs[1]Source/Assembly/ColorSpaces/Conversions/XyzConverter.cs[2]Cursor Positioning and Metadata
Positionclass with serialization support via the newIPsMetadataSerializableinterface, allowing cursor positions to be represented, serialized, and deserialized for PowerShell integration. (Source/Assembly/Position.cs[1]Source/Assembly/IPsMetadataSerializable.cs[2]RgbColor Refactoring and Robustness
RgbColorto centralize XTerm color initialization usingSetXTermColor, improving maintainability and correctness. Added validation for XTerm index input and streamlined color mode assignment. (Source/Assembly/RgbColor.cs[1] [2] [3] [4] [5] [6]Solution File Addition
Pansies.slnto organize and build the project more easily in Visual Studio.