diff --git a/gui b/gui index d3ae07d..87fb8b5 160000 --- a/gui +++ b/gui @@ -1 +1 @@ -Subproject commit d3ae07dc82798ba0679629ddf4feb79339458e6d +Subproject commit 87fb8b5d9d6cd937c449e00218b1777c38ee1ba2 diff --git a/src/contributes/commands.ts b/src/contributes/commands.ts index 46bb95f..83f5056 100644 --- a/src/contributes/commands.ts +++ b/src/contributes/commands.ts @@ -208,6 +208,7 @@ export function registerInstallCommandsCommand( if (!fs.existsSync(sysDirPath)) { // Directory does not exist, wait for updateWorkflows to finish await dcClient.updateWorkflows(); + await dcClient.updateCustomWorkflows(); sendCommandListByDevChatRun(); } else { // Directory exists, execute sendCommandListByDevChatRun immediately @@ -215,6 +216,8 @@ export function registerInstallCommandsCommand( // Then asynchronously execute updateWorkflows await dcClient.updateWorkflows(); + await dcClient.updateCustomWorkflows(); + await sendCommandListByDevChatRun(); } } diff --git a/src/handler/handlerRegister.ts b/src/handler/handlerRegister.ts index 12545cf..90b80ae 100644 --- a/src/handler/handlerRegister.ts +++ b/src/handler/handlerRegister.ts @@ -82,3 +82,5 @@ messageHandler.registerHandler('getIDEServicePort', getIDEServicePort); messageHandler.registerHandler('readServerConfigBase', readServerConfigBase); messageHandler.registerHandler('writeServerConfigBase', writeServerConfigBase); + + diff --git a/src/handler/workflowCommandHandler.ts b/src/handler/workflowCommandHandler.ts index c886116..df3d076 100644 --- a/src/handler/workflowCommandHandler.ts +++ b/src/handler/workflowCommandHandler.ts @@ -57,4 +57,4 @@ export async function sendCommandListByDevChatRun() { if (existPannel) { await getWorkflowCommandList({}, existPannel!); } -} +} \ No newline at end of file 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, diff --git a/src/toolwrapper/devchatClient.ts b/src/toolwrapper/devchatClient.ts index a599ccd..2b65fc3 100644 --- a/src/toolwrapper/devchatClient.ts +++ b/src/toolwrapper/devchatClient.ts @@ -229,6 +229,19 @@ export class DevChatClient { ); } + @timeThis + @catchAndReturn(undefined) + async updateCustomWorkflows(): Promise { + const response = await this._post("/workflows/custom_update"); + logger + .channel() + ?.trace( + `updateCustomWorkflows response data: \n${JSON.stringify( + response.data + )}` + ); + } + @timeThis async message( message: ChatRequest, diff --git a/tools b/tools index 0acb846..aac7c21 160000 --- a/tools +++ b/tools @@ -1 +1 @@ -Subproject commit 0acb8467457b463118465cb067b1216860fd9e6d +Subproject commit aac7c2116641f3086583661ffcba066c6bf02cf8