Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit8ac1eb4

Browse files
Use typed IconTheme constants from Go SDK
Replace string conversions with mcp.IconThemeLight and mcp.IconThemeDarkconstants to match the SDK's typed IconTheme field. This fixes the CI builderrors where string literals were being used instead of the proper IconTheme type.Co-authored-by: SamMorrowDrums <4811358+SamMorrowDrums@users.noreply.github.com>
1 parentb28d7fb commit8ac1eb4

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

‎pkg/octicons/octicons.go‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,12 @@ func Icons(name string) []mcp.Icon {
7373
{
7474
Source:DataURI(name,ThemeLight),
7575
MIMEType:"image/png",
76-
Theme:string(ThemeLight),
76+
Theme:mcp.IconThemeLight,
7777
},
7878
{
7979
Source:DataURI(name,ThemeDark),
8080
MIMEType:"image/png",
81-
Theme:string(ThemeDark),
81+
Theme:mcp.IconThemeDark,
8282
},
8383
}
8484
}

‎pkg/octicons/octicons_test.go‎

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"strings"
55
"testing"
66

7+
"github.com/modelcontextprotocol/go-sdk/mcp"
78
"github.com/stretchr/testify/assert"
89
)
910

@@ -87,13 +88,13 @@ func TestIcons(t *testing.T) {
8788
assert.Equal(t,DataURI(tc.icon,ThemeLight),result[0].Source)
8889
assert.Equal(t,"image/png",result[0].MIMEType)
8990
assert.Empty(t,result[0].Sizes)// Sizes field omitted for backward compatibility
90-
assert.Equal(t,"light",result[0].Theme)
91+
assert.Equal(t,mcp.IconThemeLight,result[0].Theme)
9192

9293
// Verify second icon is dark theme
9394
assert.Equal(t,DataURI(tc.icon,ThemeDark),result[1].Source)
9495
assert.Equal(t,"image/png",result[1].MIMEType)
9596
assert.Empty(t,result[1].Sizes)// Sizes field omitted for backward compatibility
96-
assert.Equal(t,"dark",result[1].Theme)
97+
assert.Equal(t,mcp.IconThemeDark,result[1].Theme)
9798
})
9899
}
99100
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp