cherry-studio/packages/shared
fullex fb51df99d0 feat(cache): add template key support for useCache with type inference
- Add type utilities for template key matching (IsTemplateKey, ExpandTemplateKey, ProcessKey)
- Add InferUseCacheValue<K> for automatic value type inference from template patterns
- Update useCache hook to support template keys with default value fallback
- Extend ESLint rule to validate template key syntax (e.g., 'scroll.position:${id}')
- Update CacheService.get() docs: clarify | undefined return is intentional
  (developers need to know when value doesn't exist after deletion/TTL expiry)
- Update cache documentation with template key usage examples

BREAKING CHANGE: CacheService.get() now explicitly returns T | undefined
(was implicit before). Callers should use ?? defaultValue for fallback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-05 12:23:19 +08:00
..
agents/claudecode ⬆️ chore: migrate from Claude Code SDK to Claude Agent SDK v0.1.1 2025-09-30 17:54:02 +08:00
anthropic fix: restore API version control with trailing # delimiter (addresses #11750) (#11773) 2025-12-10 13:42:15 +08:00
config Merge branch 'main' into v2 2025-12-24 17:30:49 +08:00
data feat(cache): add template key support for useCache with type inference 2026-01-05 12:23:19 +08:00
IpcChannel.ts Merge branch 'main' of github.com:CherryHQ/cherry-studio into v2 2026-01-01 13:57:42 +08:00
utils.ts fix: remove trailing api version in ANTHROPIC_BASE_URL (#12145) 2025-12-26 17:37:58 +08:00