refactor(workbench): extract types, constants, utils, sub-components from WorkbenchPage

WorkbenchPage.tsx: 4146 → 3047 lines (-27%)

Extracted to 6 sibling modules:
- workbenchConstants.ts (403L): types, MODE_META, option arrays, shared helpers
- workbenchStorage.ts (172L): localStorage read/write/persist functions
- workbenchReferenceUtils.ts (210L): image compression, fingerprint, file helpers
- workbenchMentionUtils.tsx (79L): prompt mention parsing and token rendering
- WorkbenchPromptPreview.tsx (87L): ReferencePreview, PromptPreviewLayer components
- WorkbenchSelectChips.tsx (263L): SelectChip, CompoundSelectChip, InlineOptionChip

All extracted code is imported back via ES module imports — no logic changes.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-06-02 14:18:26 +08:00
parent bedee3ba8d
commit 59efc78c0e
7 changed files with 1335 additions and 1214 deletions
File diff suppressed because it is too large Load Diff