mcp: switch icon theme to named string type (#733)
To be consistent with logging level, use a named string type for icon themes. This improves readability / discoverability, and is more consistent. Updates #552 For #725
This commit is contained in:
parent
76e6854375
commit
411d5a049a
1 changed files with 17 additions and 6 deletions
|
|
@ -121,7 +121,7 @@ func TestContent(t *testing.T) {
|
|||
Description: "This resource demonstrates all fields",
|
||||
MIMEType: "text/plain",
|
||||
Meta: mcp.Meta{"custom": "metadata"},
|
||||
Icons: []mcp.Icon{{Source: "foobar", MIMEType: "image/png", Sizes: []string{"48x48"}, Theme: "light"}},
|
||||
Icons: []mcp.Icon{{Source: "foobar", MIMEType: "image/png", Sizes: []string{"48x48"}, Theme: mcp.IconThemeLight}},
|
||||
},
|
||||
`{"type":"resource_link","mimeType":"text/plain","uri":"https://example.com/resource","name":"Example Resource","title":"A comprehensive example resource","description":"This resource demonstrates all fields","_meta":{"custom":"metadata"},"icons":[{"src":"foobar","mimeType":"image/png","sizes":["48x48"],"theme":"light"}]}`,
|
||||
},
|
||||
|
|
@ -217,7 +217,7 @@ func TestContentUnmarshal(t *testing.T) {
|
|||
// Meta: mcp.Meta{"custom": "metadata"},
|
||||
Size: &valInt64,
|
||||
Annotations: &mcp.Annotations{Audience: []mcp.Role{"user", "assistant"}, LastModified: "2025-01-12T15:00:58Z", Priority: 0.5},
|
||||
Icons: []mcp.Icon{{Source: "foobar", MIMEType: "image/png", Sizes: []string{"48x48"}, Theme: "light"}},
|
||||
Icons: []mcp.Icon{{Source: "foobar", MIMEType: "image/png", Sizes: []string{"48x48"}, Theme: mcp.IconThemeLight}},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue