Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ReadDirTool chat.Tool = readDirTool{}
ReadDirTool is the tool definition for the ReadDir function
View Source
var ReadFileTool chat.Tool = readFileTool{}
ReadFileTool is the tool definition for the ReadFile function
View Source
var WriteFileTool chat.Tool = writeFileTool{}
WriteFileTool is the tool definition for the WriteFile function
Functions ¶
Types ¶
type FileInfo ¶
type FileInfo struct {
Name string `json:"name"`
IsDir bool `json:"isDir"`
Size int64 `json:"size"`
}
FileInfo contains information about a file
type ReadDirRequest ¶
type ReadDirRequest struct {
Path string `json:"path,omitzero"` // Directory path to read (defaults to "." for root)
}
ReadDirRequest is the input for ReadDir
type ReadDirResult ¶
type ReadDirResult struct {
Files []FileInfo `json:"files"`
}
ReadDirResult is the output of ReadDir
func ReadDir ¶
func ReadDir(ctx context.Context, req ReadDirRequest) (ReadDirResult, error)
ReadDir reads a directory from the test filesystem
type ReadFileRequest ¶
type ReadFileRequest struct {
FileName string `json:"fileName"`
}
ReadFileRequest is the input for ReadFile
type ReadFileResult ¶
type ReadFileResult struct {
Content string `json:"content"`
}
ReadFileResult is the output of ReadFile
func ReadFile ¶
func ReadFile(ctx context.Context, req ReadFileRequest) (ReadFileResult, error)
ReadFile reads a file from the test filesystem
type WriteFileRequest ¶
WriteFileRequest is the input for WriteFile
type WriteFileResult ¶
type WriteFileResult struct {
Success bool `json:"success"`
}
WriteFileResult is the output of WriteFile
func WriteFile ¶
func WriteFile(ctx context.Context, req WriteFileRequest) (WriteFileResult, error)
WriteFile writes a file to the test filesystem
Click to show internal directories.
Click to hide internal directories.