opencode/packages
Claude e320484774
perf: lazy-load CLI commands via dynamic import for code splitting
Replace 23 static command imports with lazy-loaded dynamic imports.
Each command's heavy dependencies (Provider, Session, MCP, TUI, AI SDKs)
are now only loaded when that specific command is invoked.

Combined with the Rollup tree-shaking pre-pass, this produces 45 chunks
instead of a single bundle. The entry chunk (what loads on startup) drops
from ~9.8MB to ~120KB — a 98.8% reduction in startup load.

- Add `lazyCmd` helper to `cli/cmd/cmd.ts` for type-safe lazy commands
- Inline all builder options (yargs metadata) in `index.ts`
- Dynamic `import()` in handlers defers heavy module loading
- `opencode --help` / `--version` no longer loads AI SDK, MCP, TUI, etc.

https://claude.ai/code/session_01R7zMpXjsq1R6uR7xpyJ14i
2026-04-16 13:03:44 +00:00
..
app app: start migrating bootstrap data fetching to TanStack Query (#22756) 2026-04-16 06:10:23 +00:00
console Fix desktop download asset names for beta channel (#22766) 2026-04-16 06:10:03 +00:00
containers chore: bump Bun to 1.3.11 (#18144) 2026-03-23 10:19:21 +10:00
desktop feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
desktop-electron beta badge for desktop app (#14471) 2026-04-16 06:03:41 +00:00
docs fix(web): favicon rename again 2026-01-21 14:36:21 -06:00
enterprise feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
extensions/zed release: v1.4.6 2026-04-15 07:26:23 +00:00
function feat: enable oxlint suspicious category, fix 24 violations (#22727) 2026-04-16 02:53:10 +00:00
identity chore: identity cleanup, vscode ext images 2025-12-08 06:47:57 -06:00
opencode perf: lazy-load CLI commands via dynamic import for code splitting 2026-04-16 13:03:44 +00:00
plugin fix: remove 10 unused type-only imports and declarations (#22696) 2026-04-16 02:17:59 +00:00
script refactor: replace bun semver with npm semver package 2026-03-09 15:29:55 -04:00
sdk chore: generate 2026-04-16 07:15:05 +00:00
shared CLI perf: reduce deps (#22652) 2026-04-16 02:03:03 -04:00
slack feat: enable type-aware no-floating-promises rule, fix all 177 violations (#22741) 2026-04-15 23:27:32 -04:00
storybook feat: enable type-aware no-base-to-string rule, fix 56 violations (#22750) 2026-04-16 03:50:47 +00:00
ui fix: clean up final 16 no-unused-vars warnings (#22751) 2026-04-16 03:54:21 +00:00
web feat: enable type-aware no-base-to-string rule, fix 56 violations (#22750) 2026-04-16 03:50:47 +00:00