Add new editable text prompt to make the edit experience better#53
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #53 +/- ##
===========================================
+ Coverage 66.28% 68.92% +2.63%
===========================================
Files 9 10 +1
Lines 436 502 +66
Branches 65 81 +16
===========================================
+ Hits 289 346 +57
- Misses 108 112 +4
- Partials 39 44 +5 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Pull request overview
This PR introduces a new EditableTextPrompt class that provides an improved text input experience with full cursor navigation support (arrow keys, Home/End, Backspace/Delete) and the ability to cancel with Escape. This replaces the simple Ask<string> prompts previously used for adding and editing secrets.
- Added
EditableTextPromptclass with comprehensive cursor navigation and editing capabilities - Updated
Tool.csto use the new editable prompt for secret key and value input with escape-to-cancel support - Modified integration tests to simulate the new editing behavior by manually clearing default values and entering new text
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Karls.BetterSecretsTool/Prompts/EditableTextPrompt.cs | New prompt class implementing IPrompt<string?> with full cursor navigation, editing capabilities, and Escape-to-cancel functionality |
| src/Karls.BetterSecretsTool/Extensions/AnisConsoleExtensions.cs | Added EditablePrompt extension method to IAnsiConsole for convenient access to the new prompt |
| src/Karls.BetterSecretsTool/Tool.cs | Updated EditSecret and AddSecret methods to use EditablePrompt instead of Ask, with null checks for cancelled operations |
| test/Karls.BetterSecretsTool.Tests/Prompts/EditableTextPromptTests.cs | Comprehensive test suite covering all navigation keys, editing operations, default values, and edge cases |
| test/Karls.BetterSecretsTool.Tests/ConsoleUIIntegrationTests.cs | Updated integration tests to simulate new editable prompt behavior by clearing existing values before entering new text |
| test/Karls.BetterSecretsTool.Tests/EndToEndIntegrationTests.cs | Updated end-to-end tests to match the new prompt's input requirements |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 6 out of 6 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
No description provided.