ajustes coder
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
import { z } from "zod";
|
||||
import { handleToolError, validateRequired } from "../helpers/errorHandler.js";
|
||||
import { getCurrentProjectInfo, callLocalFileEndpoint, buildLocalFileErrorResponse } from "./helpers.js";
|
||||
import { isProtectedLayoutPath, buildProtectedLayoutPathError } from "./protectedPaths.js";
|
||||
|
||||
export function registerAcaiDeleteTool(server) {
|
||||
server.tool(
|
||||
@@ -16,6 +17,10 @@ export function registerAcaiDeleteTool(server) {
|
||||
const validationError = validateRequired({ file_path }, ["file_path"], "acai-delete");
|
||||
if (validationError) return validationError;
|
||||
|
||||
if (isProtectedLayoutPath(file_path)) {
|
||||
return buildProtectedLayoutPathError(file_path);
|
||||
}
|
||||
|
||||
const { projectSlug, projectDir } = getCurrentProjectInfo();
|
||||
const result = await callLocalFileEndpoint("POST", "/api/files/delete", {
|
||||
project: projectSlug,
|
||||
|
||||
Reference in New Issue
Block a user