Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Dec 22, 2025

Summary

Replace string conversions with mcp.IconTheme typed constants to match SDK v1.2.0's type system.

Why

The Go SDK defines IconTheme as a typed string with constants IconThemeLight and IconThemeDark. Using string conversions caused type errors in CI.

What changed

  • Use mcp.IconThemeLight and mcp.IconThemeDark in pkg/octicons/octicons.go
  • Update test assertions in pkg/octicons/octicons_test.go to expect typed constants

MCP impact

  • No tool or API changes — Internal implementation detail only

Prompts tested (tool changes only)

N/A

Security / limits

  • No security or limits impact

Lint & tests

  • Linted locally with ./script/lint
  • Tested locally with ./script/test

Docs

  • Not needed
Original prompt

Update the icon theme to use typed strings from the Go SDK to fix CI.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Replace string conversions with mcp.IconThemeLight and mcp.IconThemeDark
constants to match the SDK's typed IconTheme field. This fixes the CI build
errors where string literals were being used instead of the proper IconTheme type.

Co-authored-by: SamMorrowDrums <[email protected]>
@SamMorrowDrums SamMorrowDrums marked this pull request as ready for review December 22, 2025 23:10
@SamMorrowDrums SamMorrowDrums requested a review from a team as a code owner December 22, 2025 23:10
Copilot AI review requested due to automatic review settings December 22, 2025 23:10
Copilot AI changed the title [WIP] Update icon theme using typed strings from Go SDK Use typed IconTheme constants from Go SDK Dec 22, 2025
Copilot AI requested a review from SamMorrowDrums December 22, 2025 23:11
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 updates the octicons package to use typed string constants from the MCP Go SDK instead of manual string conversions, improving type safety and consistency with the SDK's API.

  • Replaced manual string conversions string(ThemeLight) and string(ThemeDark) with SDK constants
  • Updated test assertions to use typed constants instead of string literals
  • No functional changes, only improved type safety

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
pkg/octicons/octicons.go Updated Icons() function to use mcp.IconThemeLight and mcp.IconThemeDark constants directly instead of converting local Theme constants to strings
pkg/octicons/octicons_test.go Updated test assertions to use typed mcp.IconThemeLight and mcp.IconThemeDark constants instead of string literals, and added import for the mcp package

@SamMorrowDrums SamMorrowDrums merged commit 110be36 into dependabot/go_modules/github.com/modelcontextprotocol/go-sdk-1.2.0 Dec 22, 2025
19 checks passed
@SamMorrowDrums SamMorrowDrums deleted the copilot/update-icon-theme-typed-strings branch December 22, 2025 23: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.

2 participants