u
This commit is contained in:
@@ -1,7 +1,8 @@
|
||||
import fs from 'fs';
|
||||
import path from 'path';
|
||||
import { defineTool, ToolError } from 'libllmorbiter';
|
||||
import { isReadOnlyDatabasePath, prepareVfs } from './vfs.js';
|
||||
import { isReadOnlyDatabasePath, isProtectedAdminVfsPath, prepareVfs } from './vfs.js';
|
||||
import { requireSelectedCompanyAdmin } from '../db/companyuser.js';
|
||||
import { isSkillPath } from './skill.js';
|
||||
import { TOOL_DESCRIPTIONS, TOOL_PARAMETER_DESCRIPTIONS } from './prompts.js';
|
||||
|
||||
@@ -94,6 +95,10 @@ export function createRmTool({ googleAuthId }) {
|
||||
);
|
||||
}
|
||||
|
||||
if (isProtectedAdminVfsPath(clean)) {
|
||||
await requireSelectedCompanyAdmin(googleAuthId);
|
||||
}
|
||||
|
||||
const vfsRoot = await prepareVfs({ googleAuthId });
|
||||
const { abs, size } = deleteVfsFile(vfsRoot, clean);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user