ajustes coder

This commit is contained in:
Jordan Diaz
2026-04-21 16:55:37 +00:00
parent 362666295f
commit 62239cb0a5
7 changed files with 97 additions and 2 deletions

View File

@@ -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 registerAcaiLineReplaceTool(server) {
server.tool(
@@ -24,6 +25,10 @@ export function registerAcaiLineReplaceTool(server) {
);
if (validationError) return validationError;
if (isProtectedLayoutPath(file_path)) {
return buildProtectedLayoutPathError(file_path);
}
const { projectSlug, projectDir } = getCurrentProjectInfo();
const result = await callLocalFileEndpoint("POST", "/api/files/line-replace", {
project: projectSlug,