Skip to content

Conversation

kmruiz
Copy link
Collaborator

@kmruiz kmruiz commented Sep 4, 2025

Proposed changes

Checklist

@Copilot Copilot AI review requested due to automatic review settings September 4, 2025 14:01
@kmruiz kmruiz requested a review from a team as a code owner September 4, 2025 14:01
@kmruiz kmruiz self-assigned this Sep 4, 2025
Copilot

This comment was marked as outdated.

@kmruiz kmruiz requested a review from Copilot September 4, 2025 14:25
Copy link
Collaborator

@himanshusinghs himanshusinghs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Look good 💯 Left a suggestion for the type.

Copy link
Contributor

@Copilot Copilot AI left a 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 PR enhances the CLI argument validation by adding functionality to detect invalid command line flags and suggest correct alternatives when users make typos. The implementation uses Levenshtein distance to find the closest valid flag names and provides helpful error messages.

  • Adds new validation function validateConfigKey that checks for valid CLI arguments and suggests corrections
  • Enhances the existing deprecated argument warning system to also handle unknown/invalid arguments
  • Integrates the fast-levenshtein library for fuzzy string matching to suggest corrections

Reviewed Changes

Copilot reviewed 4 out of 5 changed files in this pull request and generated 1 comment.

File Description
src/common/config.ts Implements CLI argument validation with typo detection and suggestion logic using Levenshtein distance
tests/unit/common/config.test.ts Updates test suite to cover new invalid argument detection and suggestion functionality
package.json Adds fast-levenshtein dependency and its TypeScript types for string similarity calculations

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@coveralls
Copy link
Collaborator

coveralls commented Sep 4, 2025

Pull Request Test Coverage Report for Build 17487477238

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 59 of 59 (100.0%) changed or added relevant lines in 1 file are covered.
  • 13 unchanged lines in 2 files lost coverage.
  • Overall coverage increased (+0.2%) to 81.348%

Files with Coverage Reduction New Missed Lines %
src/transports/base.ts 3 96.77%
src/telemetry/telemetry.ts 10 89.47%
Totals Coverage Status
Change from base Build 17464149391: 0.2%
Covered Lines: 4724
Relevant Lines: 5718

💛 - Coveralls

@kmruiz kmruiz enabled auto-merge (squash) September 5, 2025 08:08
@kmruiz kmruiz merged commit 0912f39 into main Sep 5, 2025
17 checks passed
@kmruiz kmruiz deleted the mcp-121 branch September 5, 2025 08:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants