From 3769712cd272c58742af1bbf7e9f49678a92f7fe Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 23:01:54 +0000 Subject: [PATCH 1/2] Initial plan From 61913bbb12fb5703cafe6b9bf89bdae5c3c40b51 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Mon, 22 Dec 2025 23:08:55 +0000 Subject: [PATCH 2/2] Use typed IconTheme constants from Go SDK 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 <4811358+SamMorrowDrums@users.noreply.github.com> --- pkg/octicons/octicons.go | 4 ++-- pkg/octicons/octicons_test.go | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/pkg/octicons/octicons.go b/pkg/octicons/octicons.go index 3c56f09c0..5954a8c22 100644 --- a/pkg/octicons/octicons.go +++ b/pkg/octicons/octicons.go @@ -73,12 +73,12 @@ func Icons(name string) []mcp.Icon { { Source: DataURI(name, ThemeLight), MIMEType: "image/png", - Theme: string(ThemeLight), + Theme: mcp.IconThemeLight, }, { Source: DataURI(name, ThemeDark), MIMEType: "image/png", - Theme: string(ThemeDark), + Theme: mcp.IconThemeDark, }, } } diff --git a/pkg/octicons/octicons_test.go b/pkg/octicons/octicons_test.go index 27fc135ee..078eb744f 100644 --- a/pkg/octicons/octicons_test.go +++ b/pkg/octicons/octicons_test.go @@ -4,6 +4,7 @@ import ( "strings" "testing" + "github.com/modelcontextprotocol/go-sdk/mcp" "github.com/stretchr/testify/assert" ) @@ -87,13 +88,13 @@ func TestIcons(t *testing.T) { assert.Equal(t, DataURI(tc.icon, ThemeLight), result[0].Source) assert.Equal(t, "image/png", result[0].MIMEType) assert.Empty(t, result[0].Sizes) // Sizes field omitted for backward compatibility - assert.Equal(t, "light", result[0].Theme) + assert.Equal(t, mcp.IconThemeLight, result[0].Theme) // Verify second icon is dark theme assert.Equal(t, DataURI(tc.icon, ThemeDark), result[1].Source) assert.Equal(t, "image/png", result[1].MIMEType) assert.Empty(t, result[1].Sizes) // Sizes field omitted for backward compatibility - assert.Equal(t, "dark", result[1].Theme) + assert.Equal(t, mcp.IconThemeDark, result[1].Theme) }) } }