File tree Expand file tree Collapse file tree 4 files changed +8
-14
lines changed
Expand file tree Collapse file tree 4 files changed +8
-14
lines changed Original file line number Diff line number Diff line change @@ -297,9 +297,9 @@ func createMCPRequest(args any) mcp.CallToolRequest {
297297func createMCPRequestWithSession (t * testing.T , clientName string , args any ) mcp.CallToolRequest {
298298 t .Helper ()
299299
300- argsMap , ok := args .(map [string ]interface {} )
300+ argsMap , ok := args .(map [string ]any )
301301 if ! ok {
302- argsMap = make (map [string ]interface {} )
302+ argsMap = make (map [string ]any )
303303 }
304304 argsJSON , err := json .Marshal (argsMap )
305305 require .NoError (t , err )
Original file line number Diff line number Diff line change @@ -958,7 +958,7 @@ func Test_IssueWrite_InsidersMode_UIGate(t *testing.T) {
958958 handler := serverTool .Handler (deps )
959959
960960 t .Run ("UI client without _ui_submitted returns form message" , func (t * testing.T ) {
961- request := createMCPRequestWithSession (t , "Visual Studio Code - Insiders" , map [string ]interface {} {
961+ request := createMCPRequestWithSession (t , "Visual Studio Code - Insiders" , map [string ]any {
962962 "method" : "create" ,
963963 "owner" : "owner" ,
964964 "repo" : "repo" ,
@@ -972,7 +972,7 @@ func Test_IssueWrite_InsidersMode_UIGate(t *testing.T) {
972972 })
973973
974974 t .Run ("UI client with _ui_submitted executes directly" , func (t * testing.T ) {
975- request := createMCPRequestWithSession (t , "Visual Studio Code - Insiders" , map [string ]interface {} {
975+ request := createMCPRequestWithSession (t , "Visual Studio Code - Insiders" , map [string ]any {
976976 "method" : "create" ,
977977 "owner" : "owner" ,
978978 "repo" : "repo" ,
Original file line number Diff line number Diff line change @@ -2200,7 +2200,7 @@ func Test_CreatePullRequest_InsidersMode_UIGate(t *testing.T) {
22002200 handler := serverTool .Handler (deps )
22012201
22022202 t .Run ("UI client without _ui_submitted returns form message" , func (t * testing.T ) {
2203- request := createMCPRequestWithSession (t , "Visual Studio Code" , map [string ]interface {} {
2203+ request := createMCPRequestWithSession (t , "Visual Studio Code" , map [string ]any {
22042204 "owner" : "owner" ,
22052205 "repo" : "repo" ,
22062206 "title" : "Test PR" ,
@@ -2215,7 +2215,7 @@ func Test_CreatePullRequest_InsidersMode_UIGate(t *testing.T) {
22152215 })
22162216
22172217 t .Run ("UI client with _ui_submitted executes directly" , func (t * testing.T ) {
2218- request := createMCPRequestWithSession (t , "Visual Studio Code" , map [string ]interface {} {
2218+ request := createMCPRequestWithSession (t , "Visual Studio Code" , map [string ]any {
22192219 "owner" : "owner" ,
22202220 "repo" : "repo" ,
22212221 "title" : "Test PR" ,
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ package inventory
33import (
44 "context"
55 "fmt"
6+ "slices"
67 "sort"
78 "strings"
89)
@@ -392,14 +393,7 @@ func stripInsidersMetaFromTool(tool ServerTool) *ServerTool {
392393 toolCopy := tool
393394 newMeta := make (map [string ]any , len (tool .Tool .Meta ))
394395 for k , v := range tool .Tool .Meta {
395- isInsidersKey := false
396- for _ , insidersKey := range insidersOnlyMetaKeys {
397- if k == insidersKey {
398- isInsidersKey = true
399- break
400- }
401- }
402- if ! isInsidersKey {
396+ if ! slices .Contains (insidersOnlyMetaKeys , k ) {
403397 newMeta [k ] = v
404398 }
405399 }
You can’t perform that action at this time.
0 commit comments