fix: register shortcuts tabs synchronously before async terminal import

Amp-Thread-ID: https://ampcode.com/threads/T-019c17e3-96d4-754b-8a41-9257d73720f1
This commit is contained in:
bymyself
2026-02-01 16:59:19 -08:00
parent d3ce345d06
commit d3f616f8e7

View File

@@ -119,6 +119,9 @@ export const useBottomPanelStore = defineStore('bottomPanel', () => {
}
const registerCoreBottomPanelTabs = async () => {
// Register shortcuts tabs first (synchronous, always available)
useShortcutsTab().forEach(registerBottomPanelTab)
// Use __DISTRIBUTION__ directly for proper dead code elimination
if (__DISTRIBUTION__ !== 'cloud') {
try {
@@ -132,7 +135,6 @@ export const useBottomPanelStore = defineStore('bottomPanel', () => {
console.error('Failed to load terminal tabs:', error)
}
}
useShortcutsTab().forEach(registerBottomPanelTab)
}
const registerExtensionBottomPanelTabs = (extension: ComfyExtension) => {