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

Commitefc0cdb

Browse files
committed
lint
1 parent1e0040b commitefc0cdb

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
returnnil
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/nftablesv0.2.0// indirect
321321
github.com/google/pprofv0.0.0-20230817174616-7a8ec2ada47b// indirect
322322
github.com/google/s2a-gov0.1.9// indirect
323-
github.com/google/shlexv0.0.0-20191202100458-e7afc7fbc510// indirect
323+
github.com/google/shlexv0.0.0-20191202100458-e7afc7fbc510
324324
github.com/googleapis/enterprise-certificate-proxyv0.3.6// indirect
325325
github.com/googleapis/gax-go/v2v2.14.1// indirect
326326
github.com/gorilla/cssv1.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
funcTestIsCommandAllowed(t*testing.T) {
12+
t.Parallel()
1213
tests:= []struct {
1314
namestring
1415
commandstring
@@ -65,6 +66,7 @@ func TestIsCommandAllowed(t *testing.T) {
6566

6667
for_,tt:=rangetests {
6768
t.Run(tt.name,func(t*testing.T) {
69+
t.Parallel()
6870
got,err:=mcptools.IsCommandAllowed(tt.command,tt.allowedCommands)
6971
iftt.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
typeToolAdderinterface {
86-
AddTool(tool mcp.Tool,handlermcpserver.ToolHandlerFunc)
85+
AddTool(tool mcp.Tool,handlerserver.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
typeToolHandlerstruct {
101100
Tool mcp.Tool
102-
MakeHandlerfunc(ToolDeps)mcpserver.ToolHandlerFunc
101+
MakeHandlerfunc(ToolDeps)server.ToolHandlerFunc
103102
}
104103

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

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp