Refactor CLI and file handling tools for improved functionality. Update CLI interrogation command for better clarity and adjust logging format. Modify list_files.js to enhance path display logic and update read_file.js schema to allow null values for optional parameters, improving flexibility in file reading operations.
This commit is contained in:
@@ -8,12 +8,12 @@ const virtual_chroot = '/workspaces/aiTools/root';
|
||||
// Ensures reads are confined to `virtual_chroot`.
|
||||
|
||||
export default {
|
||||
type: "function", name: "read_file", description: "read a file", strict: true,
|
||||
type: "function", name: "read_file", description: "read a file", strict: false,
|
||||
parameters: {
|
||||
type: "object", required: ["path","linesToSkip","linesToRead"], additionalProperties: false, properties: {
|
||||
type: "object", required: ["path"], additionalProperties: false, properties: {
|
||||
path: { type: "string", description: "The path to the file to read.", },
|
||||
linesToSkip: { type: "integer", description: "The number of lines to skip. Use 0 to read from the beginning.", minimum: 0 },
|
||||
linesToRead: { type: "integer", description: "1-400 The number of lines to read.", minimum: 1, maximum: 400 }
|
||||
linesToSkip: { type: ["integer", "null"], description: "The number of lines to skip. Use 0 to read from the beginning, which is the default.", minimum: 0 },
|
||||
linesToRead: { type: ["integer", "null"], description: "1-400 The number of lines to read. 400 is the default.", minimum: 1, maximum: 400 }
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user