u
This commit is contained in:
@@ -4,6 +4,7 @@ import fs from 'fs';
|
||||
import { defineTool, ToolError } from 'llmorbiter';
|
||||
import { resolveSafe } from '../sandbox.js';
|
||||
import { pushUndo } from '../undo.js';
|
||||
import { emitToolCall, clip } from './notify.js';
|
||||
|
||||
export const mkdirTool = defineTool({
|
||||
name: 'mkdir',
|
||||
@@ -32,3 +33,10 @@ export const mkdirTool = defineTool({
|
||||
return { message: `Directory created: "${dirname}"`, created: true };
|
||||
},
|
||||
});
|
||||
|
||||
/**
|
||||
* Call notification: the directory to create.
|
||||
*/
|
||||
export function notifyCall(args = {}) {
|
||||
emitToolCall(mkdirTool.name, clip(JSON.stringify(args.dirname ?? '')));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user