diff --git a/src/ide_services/endpoints/getServicePort.ts b/src/ide_services/endpoints/getServicePort.ts index a2a42a4..0f91fba 100644 --- a/src/ide_services/endpoints/getServicePort.ts +++ b/src/ide_services/endpoints/getServicePort.ts @@ -7,3 +7,10 @@ export async function getServicePort() { // return await UiUtilWrapper.getLSPBrigePort(); return process.env.DEVCHAT_IDE_SERVICE_PORT; } + +export async function getLocalServicePort() { + logger + .channel() + ?.info(`get local service port: ${process.env.DC_LOCALSERVICE_PORT}`); + return process.env.DC_LOCALSERVICE_PORT; +} \ No newline at end of file diff --git a/src/ide_services/services.ts b/src/ide_services/services.ts index f97c27a..b137f9f 100644 --- a/src/ide_services/services.ts +++ b/src/ide_services/services.ts @@ -3,7 +3,7 @@ import * as http from "http"; import * as querystring from "querystring"; import { logger } from "../util/logger"; -import { getServicePort } from "./endpoints/getServicePort"; +import { getServicePort, getLocalServicePort } from "./endpoints/getServicePort"; import { installPythonEnv } from "./endpoints/installPythonEnv"; import { ideLogging} from "./endpoints/ideLogging"; import { updateSlashCommands } from "./endpoints/updateSlashCommands"; @@ -26,6 +26,10 @@ const functionRegistry: any = { keys: [], handler: getServicePort, }, + "/get_local_service_port": { + keys: [], + handler: getLocalServicePort, + }, "/install_python_env": { keys: ["command_name", "requirements_file"], handler: installPythonEnv,