Skip to content

Release/1.6.0#26

Merged
MasonChow merged 2 commits intomainfrom
release/1.6.0
Sep 28, 2025
Merged

Release/1.6.0#26
MasonChow merged 2 commits intomainfrom
release/1.6.0

Conversation

@MasonChow
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings September 28, 2025 14:57
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

❌ Patch coverage is 1.31579% with 150 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.03%. Comparing base (54638cc) to head (0302384).

Files with missing lines Patch % Lines
src/tools.ts 0.00% 109 Missing ⚠️
src/parser.ts 4.65% 41 Missing ⚠️
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

❗ There is a different number of reports uploaded between BASE (54638cc) and HEAD (0302384). Click for more details.

HEAD has 2 uploads less than BASE
Flag BASE (54638cc) HEAD (0302384)
3 1
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #26       +/-   ##
===========================================
- Coverage   51.13%   40.03%   -11.10%     
===========================================
  Files           6        6               
  Lines         397      512      +115     
  Branches       63       63               
===========================================
+ Hits          203      205        +2     
- Misses        193      306      +113     
  Partials        1        1               

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Contributor

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 implements version 1.6.0 of the source map parser MCP server, adding two new tools and improving the overall architecture. The main purpose is to expand functionality beyond just stack trace parsing to include general source map operations.

Key changes:

  • Added lookup_context and unpack_sources tools alongside the existing parse_stack tool
  • Implemented a declarative tool registration system with filtering capabilities
  • Enhanced documentation and type definitions

Reviewed Changes

Copilot reviewed 6 out of 8 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
src/tools.ts Major refactoring to declarative tool system with new tool definitions and filtering logic
src/parser.ts Added lookupContext and unpackSources methods to support new tools
src/index.ts Exported additional ToolName type for external consumers
package.json Version bump to 1.6.0
README.md Documentation updates for new tools with usage examples
README.zh-CN.md Chinese documentation updates with reorganized content structure

Comment on lines +85 to +99
function shouldRegisterTool(toolName: ToolName, filter?: ToolFilterOptions): boolean {
if (!filter) {
return true;
}

if (filter.allowList && filter.allowList.length > 0) {
return filter.allowList.includes(toolName);
}

if (filter.blockList && filter.blockList.length > 0) {
return !filter.blockList.includes(toolName);
}

return true;
}
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The filtering logic could be confusing when both allowList and blockList are provided. Consider adding validation to ensure only one filter type is used at a time, or document the precedence more clearly in the JSDoc.

Copilot uses AI. Check for mistakes.

return result;
} catch (error) {
throw new Error("lookup context error: " + (error instanceof Error ? error.message : error), {
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The error message 'lookup context error:' should be more descriptive. Consider using 'Failed to lookup source context:' to better indicate what operation failed.

Suggested change
throw new Error("lookup context error: " + (error instanceof Error ? error.message : error), {
throw new Error("Failed to lookup source context: " + (error instanceof Error ? error.message : error), {

Copilot uses AI. Check for mistakes.
totalSources: sourceMap.sources.length
};
} catch (error) {
throw new Error("unpack sources error: " + (error instanceof Error ? error.message : error), {
Copy link

Copilot AI Sep 28, 2025

Choose a reason for hiding this comment

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

The error message 'unpack sources error:' should be more descriptive. Consider using 'Failed to unpack source map sources:' to better indicate what operation failed.

Suggested change
throw new Error("unpack sources error: " + (error instanceof Error ? error.message : error), {
throw new Error("Failed to unpack source map sources: " + (error instanceof Error ? error.message : error), {

Copilot uses AI. Check for mistakes.
@MasonChow MasonChow merged commit 2c21e0b into main Sep 28, 2025
2 checks passed
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