Merge pull request #589 from devchat-ai/auto_custom_workflow
Auto custom workflow
This commit is contained in:
commit
46e17b99c5
2
gui
2
gui
@ -1 +1 @@
|
||||
Subproject commit d3ae07dc82798ba0679629ddf4feb79339458e6d
|
||||
Subproject commit 87fb8b5d9d6cd937c449e00218b1777c38ee1ba2
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
@ -82,3 +82,5 @@ messageHandler.registerHandler('getIDEServicePort', getIDEServicePort);
|
||||
|
||||
messageHandler.registerHandler('readServerConfigBase', readServerConfigBase);
|
||||
messageHandler.registerHandler('writeServerConfigBase', writeServerConfigBase);
|
||||
|
||||
|
||||
|
@ -57,4 +57,4 @@ export async function sendCommandListByDevChatRun() {
|
||||
if (existPannel) {
|
||||
await getWorkflowCommandList({}, existPannel!);
|
||||
}
|
||||
}
|
||||
}
|
@ -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;
|
||||
}
|
@ -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,
|
||||
|
@ -229,6 +229,19 @@ export class DevChatClient {
|
||||
);
|
||||
}
|
||||
|
||||
@timeThis
|
||||
@catchAndReturn(undefined)
|
||||
async updateCustomWorkflows(): Promise<void> {
|
||||
const response = await this._post("/workflows/custom_update");
|
||||
logger
|
||||
.channel()
|
||||
?.trace(
|
||||
`updateCustomWorkflows response data: \n${JSON.stringify(
|
||||
response.data
|
||||
)}`
|
||||
);
|
||||
}
|
||||
|
||||
@timeThis
|
||||
async message(
|
||||
message: ChatRequest,
|
||||
|
2
tools
2
tools
@ -1 +1 @@
|
||||
Subproject commit 0acb8467457b463118465cb067b1216860fd9e6d
|
||||
Subproject commit aac7c2116641f3086583661ffcba066c6bf02cf8
|
Loading…
x
Reference in New Issue
Block a user