Skip to content

Commit f5d740b

Browse files
committed
Format
1 parent e42f642 commit f5d740b

File tree

6 files changed

+693
-696
lines changed

6 files changed

+693
-696
lines changed

internal/client/client.go

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -280,7 +280,7 @@ func (c *Client) addToolsToServer(
280280
})
281281

282282
totalTools := 0
283-
283+
284284
var sessionWithTools server.SessionWithTools
285285
var sessionTools map[string]server.ServerTool
286286
if session != nil {
@@ -295,7 +295,7 @@ func (c *Client) addToolsToServer(
295295
"sessionID": session.SessionID(),
296296
})
297297
}
298-
298+
299299
for {
300300
tools, err := c.client.ListTools(ctx, toolsRequest)
301301
if err != nil {
@@ -333,7 +333,7 @@ func (c *Client) addToolsToServer(
333333
} else {
334334
handler = c.client.CallTool
335335
}
336-
336+
337337
if sessionTools != nil {
338338
sessionTools[tool.Name] = server.ServerTool{
339339
Tool: tool,
@@ -349,7 +349,7 @@ func (c *Client) addToolsToServer(
349349
}
350350
toolsRequest.Params.Cursor = tools.NextCursor
351351
}
352-
352+
353353
if len(sessionTools) > 0 {
354354
sessionWithTools.SetSessionTools(sessionTools)
355355
internal.LogInfoWithFields("client", "Registered session-specific tools", map[string]interface{}{

internal/client/client_session_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -395,4 +395,4 @@ func TestAddToMCPServerWithSession_ErrorHandling(t *testing.T) {
395395
assert.Contains(t, err.Error(), "failed to list tools")
396396
mockClient.AssertExpectations(t)
397397
})
398-
}
398+
}

internal/client/session_manager_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,13 @@ import (
77
"testing"
88
"time"
99

10-
"github.com/dgellow/mcp-front/internal/testutil"
1110
"github.com/dgellow/mcp-front/internal/config"
11+
"github.com/dgellow/mcp-front/internal/testutil"
1212
"github.com/mark3labs/mcp-go/mcp"
1313
"github.com/stretchr/testify/assert"
1414
"github.com/stretchr/testify/require"
1515
)
1616

17-
1817
func TestStdioSessionManager_CreateAndRetrieve(t *testing.T) {
1918
mockCreator := func(name string, config *config.MCPClientConfig) (*Client, error) {
2019
mockClient := new(testutil.MockMCPClient)

0 commit comments

Comments
 (0)