( t *testing.T, mockConn *agentconnmock.MockAgentConn, storeFile chattool.StoreFileFunc, )
| 269 | } |
| 270 | |
| 271 | func 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 | |
| 285 | func decodeAttachFileResponse(t *testing.T, resp fantasy.ToolResponse) attachFileResponse { |
| 286 | t.Helper() |
no test coverage detected