Add bots files handling logic
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
import type { HarnessTool } from "../../types";
|
||||
import copyFileTool from "./copy-file-tool";
|
||||
import deleteFileTool from "./delete-file-tool";
|
||||
import ingestFileTool from "./ingest-file-tool";
|
||||
import listFilesTool from "./list-files-tool";
|
||||
import moveFileTool from "./move-file-tool";
|
||||
import readFileTool from "./read-file-tool";
|
||||
import searchFilesTool from "./search-files-tool";
|
||||
import type { StorageToolContext } from "./storage-tool-context";
|
||||
import writeFileTool from "./write-file-tool";
|
||||
|
||||
/**
|
||||
* The file tools a bot works with on every run, bound to its own
|
||||
* directories (and, for the coordinator, every bot's and workspace's).
|
||||
* `copy_file` only shows when the run reaches more than one directory.
|
||||
*/
|
||||
export default function grabStorageTools(context: StorageToolContext): HarnessTool[] {
|
||||
return [
|
||||
listFilesTool(context),
|
||||
readFileTool(context),
|
||||
writeFileTool(context),
|
||||
searchFilesTool(context),
|
||||
moveFileTool(context),
|
||||
deleteFileTool(context),
|
||||
ingestFileTool(context),
|
||||
...(context.scopes.length > 1 ? [copyFileTool(context)] : []),
|
||||
];
|
||||
}
|
||||
Reference in New Issue
Block a user