cambios mcp remoto
This commit is contained in:
@@ -6,6 +6,7 @@ import { handleToolError, validateRequired, handleApiResponse } from "../helpers
|
||||
import { withAuthParams } from "../helpers/authSchema.js";
|
||||
import { AcaiHttpClient } from "../helpers/acaiHttpClient.js";
|
||||
import { pythonPost } from "../helpers/pythonServerClient.js";
|
||||
import { resolveCurrentProjectDir } from "../files/helpers.js";
|
||||
|
||||
/**
|
||||
* Helper: POST to mcp_respond.php via viewer_functions.php
|
||||
@@ -78,7 +79,7 @@ async function resolveLocalImageAsBase64(imageUrl) {
|
||||
}
|
||||
|
||||
// Intento B: resolver el pathname contra ACAI_PROJECT_DIR y leer del disco
|
||||
const projectDir = process.env.ACAI_PROJECT_DIR || "";
|
||||
const projectDir = resolveCurrentProjectDir();
|
||||
if (projectDir && parsed.pathname) {
|
||||
try {
|
||||
const localPath = path.join(projectDir, parsed.pathname);
|
||||
@@ -118,7 +119,7 @@ export function registerUploadRecordImageTool(server) {
|
||||
);
|
||||
if (validationError) return validationError;
|
||||
|
||||
const projectSlug = path.basename(process.env.ACAI_PROJECT_DIR || "");
|
||||
const projectSlug = path.basename(resolveCurrentProjectDir());
|
||||
|
||||
// Intentar via Python server (tiene sync + optimizacion)
|
||||
let result;
|
||||
|
||||
Reference in New Issue
Block a user