perf: code-split xterm bundle and gate terminal features for cloud

- Gate logs-terminal keybinding (Ctrl+`) registration for cloud builds
- Filter out ToggleBottomPanel command for cloud builds
- Gate terminal tab registration in bottomPanelStore for cloud
- Convert terminal tab components to async imports (defineAsyncComponent)
- Dynamic import of useTerminalTabs module ensures xterm bundle is tree-shaken

The ~400KB xterm bundle (vendor-xterm-*.js) is now only loaded on
non-cloud distributions when terminal tabs are registered.

Fixes COM-14129

Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019c17af-8992-739f-be03-1e375de1b56b
This commit is contained in:
bymyself
2026-01-30 00:20:47 -08:00
parent 985d024a6e
commit 48cdd70b5c
5 changed files with 26 additions and 16 deletions

View File

@@ -8,6 +8,7 @@ import {
DEFAULT_DARK_COLOR_PALETTE,
DEFAULT_LIGHT_COLOR_PALETTE
} from '@/constants/coreColorPalettes'
import { tryToggleWidgetPromotion } from '@/core/graph/subgraph/proxyWidgetUtils'
import { t } from '@/i18n'
import {