Skip to content

fix(mcp): exclude constructor from methods setion#1722

Open
onlyexeption wants to merge 2 commits into
masterfrom
ibarakov/fix-api-ref-tool
Open

fix(mcp): exclude constructor from methods setion#1722
onlyexeption wants to merge 2 commits into
masterfrom
ibarakov/fix-api-ref-tool

Conversation

@onlyexeption
Copy link
Copy Markdown
Contributor

Description

Related Issue

Closes #

Type of Change

  • Bug fix (non-breaking change that fixes an issue)
  • New feature (non-breaking change that adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update
  • Refactoring / code cleanup
  • Build / CI configuration change

Affected Packages

  • igniteui-cli (packages/cli)
  • @igniteui/cli-core (packages/core)
  • @igniteui/angular-templates (packages/igx-templates)
  • @igniteui/angular-schematics (packages/ng-schematics)
  • @igniteui/mcp-server (packages/igniteui-mcp)

Checklist

  • I have tested my changes locally (npm run test)
  • I have built the project successfully (npm run build)
  • I have run the linter (npm run lint)
  • I have added/updated tests as needed
  • My changes do not introduce new warnings or errors

Additional Context

Copy link
Copy Markdown
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

Updates the Ignite UI MCP server’s API-doc section extraction logic to avoid treating class constructor entries as regular methods when parsing “flat” llms-full.txt-style markdown (no explicit ## Methods headings).

Changes:

  • Switches the fallback bullet scan to use a captured member name (via RegExp.exec) instead of test().
  • Skips bullets whose captured member name is exactly constructor, preventing it from appearing in extracted method lists.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +175 to 178
const bullet = MEMBER_BULLET_RE.exec(line);
if (!bullet) continue;
if (bullet[1] === 'constructor') continue;
if (inferSectionFromBullet(line) === targetKind) {
@coveralls
Copy link
Copy Markdown

coveralls commented Jun 3, 2026

Coverage Status

coverage: 88.077%. remained the same — ibarakov/fix-api-ref-tool into master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants