stringadmin
|
59efc78c0e
|
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>
|
2026-06-02 14:18:26 +08:00 |
|