-
Notifications
You must be signed in to change notification settings - Fork 87
feat: change mcpm edit arguments from CSV to space-separated format #213
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
- Updated argument parsing from comma-separated to space-separated
- Changed prompts from "Arguments (comma-separated)" to "Arguments (space-separated)"
- Modified parsing logic from .split(",") to .split()
- Updated table display format to show space-separated arguments
- Updated tests to expect space-separated output
Fixes #212
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
|||||||||||||
SummarySwitches STDIOServerConfig argument handling from comma-separated to space-separated strings, updating the ReviewNice quality-of-life tweak—code, prompts, and tests stay in sync and the diff is clean.
|
- Import shlex module for proper shell-like argument parsing - Replace .split() with shlex.split() for argument parsing - Update prompts to indicate quote support for arguments with spaces - Add tests for arguments containing spaces - Add unit tests to verify shlex parsing behavior This addresses the review feedback about handling arguments with spaces correctly. Arguments like "path with spaces" are now properly parsed as single arguments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
🔧 Review Feedback AddressedThank you for the thorough review! I've addressed the concerns about handling arguments with spaces: Changes Made:
Examples of what now works:
Testing:
The implementation now correctly handles the edge cases mentioned in the review while maintaining backward compatibility for simple space-separated arguments. |
|
🎉 This PR is included in version 2.4.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
User description
Summary
mcpm editcommand from comma-separated to space-separated formatContext
This change improves the user experience by making argument input more natural. Users can now enter arguments separated by spaces instead of commas.
Before
After
Changes Made
.split(",")to.split()in all relevant locationsTest Plan
mcpm editcommand works as expectedFixes #212
🤖 Generated with Claude Code
PR Type
Bug fix
Description
Changed argument parsing from comma-separated to space-separated format
Updated prompts and display messages to reflect new format
Modified tests to expect space-separated output
Changes diagram
flowchart LR A["CSV Format"] -- "Replace .split(',')" --> B["Space Format"] B -- "Update prompts" --> C["User Interface"] B -- "Update display" --> D["Table Output"] B -- "Update tests" --> E["Test Expectations"]Changes walkthrough 📝
edit.py
Convert CSV argument parsing to space-separatedsrc/mcpm/commands/edit.py
.split(",")to.split()test_edit.py
Update test to expect space-separated outputtests/test_edit.py