Added comprehensive test coverage for FilesystemTool (ReadFileTool, WriteFileTool, ListDirTool) with 10 test cases: - TestFilesystemTool_ReadFile_Success: Verifies file content goes to ForLLM - TestFilesystemTool_ReadFile_NotFound: Verifies error handling for missing files - TestFilesystemTool_ReadFile_MissingPath: Verifies missing parameter handling - TestFilesystemTool_WriteFile_Success: Verifies SilentResult behavior - TestFilesystemTool_WriteFile_CreateDir: Verifies automatic directory creation - TestFilesystemTool_WriteFile_MissingPath: Verifies missing path parameter handling - TestFilesystemTool_WriteFile_MissingContent: Verifies missing content parameter handling - TestFilesystemTool_ListDir_Success: Verifies directory listing functionality - TestFilesystemTool_ListDir_NotFound: Verifies error handling for invalid paths - TestFilesystemTool_ListDir_DefaultPath: Verifies default to current directory FilesystemTool implementation already conforms to ToolResult specification: - ReadFile/ListDir return NewToolResult (ForLLM only, ForUser empty) - WriteFile returns SilentResult (Silent=true, ForUser empty) - Errors return ErrorResult with IsError=true Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| base.go | ||
| cron.go | ||
| cron.go.bak2 | ||
| cron.go.broken | ||
| edit.go | ||
| filesystem.go | ||
| filesystem_test.go | ||
| message.go | ||
| message_test.go | ||
| registry.go | ||
| result.go | ||
| result_test.go | ||
| shell.go | ||
| shell_test.go | ||
| spawn.go | ||
| subagent.go | ||
| types.go | ||
| web.go | ||