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

Function runAdvisorTool

coderd/x/chatd/chatadvisor/tool_test.go:441–458  ·  view source on GitHub ↗
(
	t *testing.T,
	tool fantasy.AgentTool,
	args chatadvisor.AdvisorArgs,
)

Source from the content-addressed store, hash-verified

439}
440
441func runAdvisorTool(
442 t *testing.T,
443 tool fantasy.AgentTool,
444 args chatadvisor.AdvisorArgs,
445) fantasy.ToolResponse {
446 t.Helper()
447
448 data, err := json.Marshal(args)
449 require.NoError(t, err)
450
451 resp, err := tool.Run(t.Context(), fantasy.ToolCall{
452 ID: "call-1",
453 Name: "advisor",
454 Input: string(data),
455 })
456 require.NoError(t, err)
457 return resp
458}

Calls 4

HelperMethod · 0.65
RunMethod · 0.65
ContextMethod · 0.65
MarshalMethod · 0.45

Tested by

no test coverage detected