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

Function newAttachFileTool

coderd/x/chatd/chattool/attachfile_test.go:271–283  ·  view source on GitHub ↗
(
	t *testing.T,
	mockConn *agentconnmock.MockAgentConn,
	storeFile chattool.StoreFileFunc,
)

Source from the content-addressed store, hash-verified

269}
270
271func newAttachFileTool(
272 t *testing.T,
273 mockConn *agentconnmock.MockAgentConn,
274 storeFile chattool.StoreFileFunc,
275) fantasy.AgentTool {
276 t.Helper()
277 return chattool.AttachFile(chattool.AttachFileOptions{
278 GetWorkspaceConn: func(_ context.Context) (workspacesdk.AgentConn, error) {
279 return mockConn, nil
280 },
281 StoreFile: storeFile,
282 })
283}
284
285func decodeAttachFileResponse(t *testing.T, resp fantasy.ToolResponse) attachFileResponse {
286 t.Helper()

Callers 1

TestAttachFileFunction · 0.85

Calls 2

AttachFileFunction · 0.92
HelperMethod · 0.65

Tested by

no test coverage detected