Skip to content

[dotnet-code] Extract skill deduplication helper#351

Merged
qmuntal merged 2 commits into
mainfrom
dotnet-code-skill-dedup-helper-e9ee938de644c6e4
Jun 25, 2026
Merged

[dotnet-code] Extract skill deduplication helper#351
qmuntal merged 2 commits into
mainfrom
dotnet-code-skill-dedup-helper-e9ee938de644c6e4

Conversation

@michelle-clayton-work

@michelle-clayton-work michelle-clayton-work commented Jun 24, 2026

Copy link
Copy Markdown
Contributor

This pull request refactors the skill deduplication logic in provider.go to improve code organization and reusability. The deduplication code is extracted into a new helper function, making the main function cleaner and separating concerns.

Code organization and refactoring:

  • Extracted the skill deduplication logic from loadSkills into a new helper function deduplicateSkillsByName, improving readability and reusability. (agent/skills/provider.go, agent/skills/provider.goL311-R326)
  • Updated the deduplication process to use the new helper function, passing in the logger as a parameter instead of referencing it directly. (agent/skills/provider.go, agent/skills/provider.goL311-R326)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@michelle-clayton-work
michelle-clayton-work requested a review from a team as a code owner June 24, 2026 18:44
Copilot AI review requested due to automatic review settings June 24, 2026 18:44

Copilot AI left a comment

Copy link
Copy Markdown

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 refactors the skills provider to extract the skill name deduplication logic into a dedicated helper function, keeping the existing behavior while improving local readability and reuse within the skills package.

Changes:

  • Extracted source-skill deduplication logic into deduplicateSkillsByName.
  • Updated loadSkills to delegate deduplication and return the deduplicated slice.

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

@github-actions

This comment has been minimized.

@github-actions

Copy link
Copy Markdown
Contributor

Cross-Repo API Consistency Review

Result: ✅ No parity issues found — change is Go-internal only

This PR extracts inline skill deduplication logic from the unexported loadSkills method into a new unexported helper function deduplicateSkillsByName. The refactor:

  • Introduces no new exported identifiers
  • Changes no public types, options, or observable runtime behavior
  • Preserves identical deduplication semantics (case-insensitive name comparison, first-occurrence wins, slog.Warn on duplicate)

This change is out of scope for cross-repo parity review. No comparison against the upstream Python or .NET implementations is needed.

Generated by Go API Consistency Review Agent for issue #351 · 38 AIC · ⌖ 12.8 AIC · ⊞ 28.4K ·

@qmuntal
qmuntal added this pull request to the merge queue Jun 25, 2026
@qmuntal qmuntal linked an issue Jun 25, 2026 that may be closed by this pull request
@qmuntal
qmuntal removed this pull request from the merge queue due to a manual request Jun 25, 2026
@qmuntal
qmuntal added this pull request to the merge queue Jun 25, 2026
Merged via the queue into main with commit 94e24c8 Jun 25, 2026
18 checks passed
@qmuntal
qmuntal deleted the dotnet-code-skill-dedup-helper-e9ee938de644c6e4 branch June 25, 2026 08:32
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.

[dotnet-code] Extract skill deduplication helper

3 participants