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.
This commit is contained in:
parent
3cf88d64ff
commit
60cc1e376e
2
gui
2
gui
@ -1 +1 @@
|
||||
Subproject commit 87c6c104db80991e818b1a9e5ab5ef4bfdb8fcf3
|
||||
Subproject commit 2499ff53123e059d74a32770482ee9dce9d6a010
|
@ -3,7 +3,7 @@ import { insertCodeBlockToFile } from './codeBlockHandler';
|
||||
import { replaceCodeBlockToFile } from './codeBlockHandler';
|
||||
import { doCommit } from './commitHandler';
|
||||
import { getHistoryMessages } from './historyMessagesHandler';
|
||||
import { handleRegCommandList,handleUpdateWorkflowList } from './workflowCommandHandler';
|
||||
import { handleRegCommandList } from './workflowCommandHandler';
|
||||
import { sendMessage, stopDevChat, regeneration, deleteChatMessage, userInput } from './sendMessage';
|
||||
import { applyCodeWithDiff } from './diffHandler';
|
||||
import { addConext } from './contextHandler';
|
||||
@ -37,7 +37,6 @@ messageHandler.registerHandler('historyMessages', getHistoryMessages);
|
||||
// Register the command list
|
||||
// Response: { command: 'regCommandList', result: <command list> }
|
||||
messageHandler.registerHandler('regCommandList', handleRegCommandList);
|
||||
messageHandler.registerHandler('updateWorkflowList', handleUpdateWorkflowList);
|
||||
// Send a message, send the message entered by the user to AI
|
||||
// Response:
|
||||
// { command: 'receiveMessagePartial', text: <response message text>, user: <user>, date: <date> }
|
||||
|
@ -58,13 +58,3 @@ export async function sendCommandListByDevChatRun() {
|
||||
await getWorkflowCommandList({}, existPannel!);
|
||||
}
|
||||
}
|
||||
|
||||
export async function handleUpdateWorkflowList(){
|
||||
|
||||
const dcClient = new DevChatClient();
|
||||
|
||||
await dcClient.updateWorkflows();
|
||||
await dcClient.updateCustomWorkflows();
|
||||
|
||||
await sendCommandListByDevChatRun();
|
||||
}
|
2
tools
2
tools
@ -1 +1 @@
|
||||
Subproject commit 488bc13fe0ee22dcee6eeafd023147e137a9eddf
|
||||
Subproject commit dd0bb94be17a315e490856373d78b146de0fd8de
|
Loading…
x
Reference in New Issue
Block a user