Recently, I've been developing a VS Code extension that creates a button in the status bar to execute a script in the terminal. The state of these buttons and custom user commands is saved in context.workspaceState.
However, I've encountered an issue where the buttons only load when I trigger the command from the command palette, not during the initial load.
For example, when I open a project where I previously added a button, the status bar does not display the button. Only after I execute the "add button" command from the palette and close it, do the buttons appear in the status bar.
Does anyone know why this behavior is occurring?
extension.ts
/* code snippets */
butonScripts.ts
/* code snippets */
If you need further information or access to the complete repository, it can be found here - https://github.com/puyanwei/quick-scripts-v2