Skip to content

Commit 60cc1e3

Browse files
author
Rankin Zheng
committed
workflow(update): refresh workflow commands on registration
Update the workflow command list automatically when new workflows are registered or modified. This ensures the command list displayed to the user is always current and accurate, eliminating the need for manual refreshes.
1 parent 3cf88d6 commit 60cc1e3

File tree

4 files changed

+3
-14
lines changed

4 files changed

+3
-14
lines changed

gui

src/handler/handlerRegister.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { insertCodeBlockToFile } from './codeBlockHandler';
33
import { replaceCodeBlockToFile } from './codeBlockHandler';
44
import { doCommit } from './commitHandler';
55
import { getHistoryMessages } from './historyMessagesHandler';
6-
import { handleRegCommandList,handleUpdateWorkflowList } from './workflowCommandHandler';
6+
import { handleRegCommandList } from './workflowCommandHandler';
77
import { sendMessage, stopDevChat, regeneration, deleteChatMessage, userInput } from './sendMessage';
88
import { applyCodeWithDiff } from './diffHandler';
99
import { addConext } from './contextHandler';
@@ -37,7 +37,6 @@ messageHandler.registerHandler('historyMessages', getHistoryMessages);
3737
// Register the command list
3838
// Response: { command: 'regCommandList', result: <command list> }
3939
messageHandler.registerHandler('regCommandList', handleRegCommandList);
40-
messageHandler.registerHandler('updateWorkflowList', handleUpdateWorkflowList);
4140
// Send a message, send the message entered by the user to AI
4241
// Response:
4342
// { command: 'receiveMessagePartial', text: <response message text>, user: <user>, date: <date> }

src/handler/workflowCommandHandler.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,14 +57,4 @@ export async function sendCommandListByDevChatRun() {
5757
if (existPannel) {
5858
await getWorkflowCommandList({}, existPannel!);
5959
}
60-
}
61-
62-
export async function handleUpdateWorkflowList(){
63-
64-
const dcClient = new DevChatClient();
65-
66-
await dcClient.updateWorkflows();
67-
await dcClient.updateCustomWorkflows();
68-
69-
await sendCommandListByDevChatRun();
7060
}

tools

Submodule tools updated 70 files

0 commit comments

Comments
 (0)