Skip to content

Commit efc0cdb

Browse files
committed
lint
1 parent 1e0040b commit efc0cdb

File tree

6 files changed

+8
-7
lines changed

6 files changed

+8
-7
lines changed

cli/exp_mcp.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,4 +113,4 @@ func mcpHandler(inv *serpent.Invocation, client *codersdk.Client, instructions s
113113
}
114114
}
115115
return nil
116-
}
116+
}

cli/exp_mcp_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,4 +133,4 @@ func TestExpMcp(t *testing.T) {
133133
err := inv.Run()
134134
assert.ErrorContains(t, err, "your session has expired")
135135
})
136-
}
136+
}

go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ require (
320320
github.com/google/nftables v0.2.0 // indirect
321321
github.com/google/pprof v0.0.0-20230817174616-7a8ec2ada47b // indirect
322322
github.com/google/s2a-go v0.1.9 // indirect
323-
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
323+
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510
324324
github.com/googleapis/enterprise-certificate-proxy v0.3.6 // indirect
325325
github.com/googleapis/gax-go/v2 v2.14.1 // indirect
326326
github.com/gorilla/css v1.0.1 // indirect

mcp/tools/command_validator_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
)
1010

1111
func TestIsCommandAllowed(t *testing.T) {
12+
t.Parallel()
1213
tests := []struct {
1314
name string
1415
command string
@@ -65,6 +66,7 @@ func TestIsCommandAllowed(t *testing.T) {
6566

6667
for _, tt := range tests {
6768
t.Run(tt.name, func(t *testing.T) {
69+
t.Parallel()
6870
got, err := mcptools.IsCommandAllowed(tt.command, tt.allowedCommands)
6971
if tt.wantErr {
7072
require.Error(t, err)

mcp/tools/tools_coder.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ func handleCoderReportTask(deps ToolDeps) mcpserver.ToolHandlerFunc {
5050
}
5151

5252
// TODO: Waiting on support for tasks.
53-
deps.Logger.Info(ctx, "reporting task", slog.F("summary", summary), slog.F("link", link), slog.F("done", done), slog.F("emoji", emoji))
53+
deps.Logger.Info(ctx, "report task tool called", slog.F("summary", summary), slog.F("link", link), slog.F("done", done), slog.F("emoji", emoji))
5454
/*
5555
err := sdk.PostTask(ctx, agentsdk.PostTaskRequest{
5656
Reporter: "claude",

mcp/tools/tools_registry.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import (
55

66
"github.com/mark3labs/mcp-go/mcp"
77
"github.com/mark3labs/mcp-go/server"
8-
mcpserver "github.com/mark3labs/mcp-go/server"
98

109
"cdr.dev/slog"
1110
"github.com/coder/coder/v2/codersdk"
@@ -83,7 +82,7 @@ Good Summaries:
8382

8483
// ToolAdder interface for adding tools to a server
8584
type ToolAdder interface {
86-
AddTool(tool mcp.Tool, handler mcpserver.ToolHandlerFunc)
85+
AddTool(tool mcp.Tool, handler server.ToolHandlerFunc)
8786
}
8887

8988
// Ensure that MCPServer implements ToolAdder
@@ -99,7 +98,7 @@ type ToolDeps struct {
9998
// ToolHandler associates a tool with its handler creation function
10099
type ToolHandler struct {
101100
Tool mcp.Tool
102-
MakeHandler func(ToolDeps) mcpserver.ToolHandlerFunc
101+
MakeHandler func(ToolDeps) server.ToolHandlerFunc
103102
}
104103

105104
// ToolRegistry is a map of available tools with their handler creation

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy