MCPcopy Index your code
hub / github.com/coder/coder / newExecuteTool

Function newExecuteTool

coderd/x/chatd/chattool/execute_test.go:632–639  ·  view source on GitHub ↗

newExecuteTool creates an Execute tool wired to the given mock.

(t *testing.T, mockConn *agentconnmock.MockAgentConn)

Source from the content-addressed store, hash-verified

630
631// newExecuteTool creates an Execute tool wired to the given mock.
632func newExecuteTool(t *testing.T, mockConn *agentconnmock.MockAgentConn) fantasy.AgentTool {
633 t.Helper()
634 return chattool.Execute(chattool.ExecuteOptions{
635 GetWorkspaceConn: func(_ context.Context) (workspacesdk.AgentConn, error) {
636 return mockConn, nil
637 },
638 })
639}
640
641func ptr[T any](v T) *T {
642 return &v

Callers 2

TestExecuteToolFunction · 0.85
TestDetectFileDumpFunction · 0.85

Calls 2

ExecuteFunction · 0.92
HelperMethod · 0.65

Tested by

no test coverage detected