Merge pull request #404 from devchat-ai/bugfix/commands-not-visible-#156
Fix: Command list not displaying due to async/await issues
This commit is contained in:
commit
30f4880fff
@ -288,16 +288,11 @@ export function registerInstallCommandsCommand(context: vscode.ExtensionContext)
|
||||
sendCommandListByDevChatRun();
|
||||
} else {
|
||||
// Directory exists, execute sendCommandListByDevChatRun immediately
|
||||
sendCommandListByDevChatRun();
|
||||
await sendCommandListByDevChatRun();
|
||||
|
||||
// Then asynchronously execute updateSysCommand
|
||||
devchat.updateSysCommand().then(() => {
|
||||
// After updateSysCommand finishes, execute sendCommandListByDevChatRun again
|
||||
sendCommandListByDevChatRun();
|
||||
}).catch((error) => {
|
||||
// Handle any errors that occur during updateSysCommand
|
||||
console.error('Error updating sys command:', error);
|
||||
});
|
||||
await devchat.updateSysCommand();
|
||||
await sendCommandListByDevChatRun();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -56,7 +56,7 @@ export async function getWorkflowCommandList(message: any, panel: vscode.Webview
|
||||
|
||||
export async function sendCommandListByDevChatRun() {
|
||||
if (existPannel) {
|
||||
getWorkflowCommandList({}, existPannel!);
|
||||
await getWorkflowCommandList({}, existPannel!);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user