cherry-studio/src/main/utils
Pleasure1234 1df6e8c732
refactor(notes): improve notes management with local state and file handling (#10395)
* refactor(notes): improve notes management with local state and file handling

- Replace UUID-based IDs with SHA1 hash of file paths for better consistency
- Remove database storage for notes tree, use local state management instead
- Add localStorage persistence for starred and expanded states
- Improve cross-platform path normalization (replace backslashes with forward slashes)
- Refactor tree operations to use optimized in-memory operations
- Enhance file watcher integration for better sync performance
- Simplify notes service with direct file system operations
- Remove database dependencies from notes tree management

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

Co-Authored-By: Claude <noreply@anthropic.com>

* Revert "Merge remote-tracking branch 'origin/main' into refactor/note"

This reverts commit 389386ace8, reversing
changes made to 4428f511b0.

* fix: format error

* refactor: noteservice

* refactor(notes): 完成笔记状态从localStorage向Redux的迁移

- 将starred和expanded路径状态从localStorage迁移到Redux store
- 添加版本159迁移逻辑,自动从localStorage迁移现有数据到Redux
- 优化NotesPage组件,使用Redux状态管理替代本地localStorage操作
- 改进SaveToKnowledgePopup的错误处理和验证逻辑
- 删除NotesTreeService中已废弃的localStorage写入函数
- 增强组件性能,使用ref避免不必要的依赖更新

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

Co-Authored-By: Claude <noreply@anthropic.com>

* fix: ci

* feat(notes): add in-place renaming for notes in HeaderNavbar

- Implemented an input field for renaming the current note directly in the HeaderNavbar.
- Added handlers for title change, blur, and key events to manage renaming logic.
- Updated the breadcrumb display to accommodate the new title input.
- Enhanced styling for the title input to ensure seamless integration with the existing UI.

This feature improves user experience by allowing quick edits without navigating away from the notes list.

* Update NotesEditor.tsx

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: kangfenmao <kangfenmao@qq.com>
2025-09-28 13:50:52 +08:00
..
__tests__ fix: change jschardet to chardet (#8577) 2025-07-29 17:27:36 +08:00
aes.ts feat: add aihubmix oauth 2025-02-07 22:27:28 +08:00
file.ts refactor(notes): improve notes management with local state and file handling (#10395) 2025-09-28 13:50:52 +08:00
index.ts feat: use oxlint to speed up lint (#10168) 2025-09-15 19:42:13 +08:00
init.ts refactor: move initAppDataDir function to a new utils module (#8337) 2025-07-21 15:46:14 +08:00
ipService.ts refactor: replace axios and node fetch with electron's net module (#9212) 2025-08-15 22:48:22 +08:00
knowledge.ts feat: refactor Knowledge Base (#8384) 2025-09-04 17:23:31 +08:00
locales.ts ci: auto i18n (#9889) 2025-09-04 19:51:15 +08:00
mcp.ts refactor: improve sanitization and formatting in buildFunctionCallToo… (#6152) 2025-05-19 11:20:38 +08:00
ocr.ts refactor: Improve linux build for system-ocr (#9775) 2025-09-02 12:59:14 +08:00
process.ts refactor: Unified Logger / 统一日志管理 (#8207) 2025-07-18 09:40:56 +08:00
systemInfo.ts feat(AppUpdater): integrate User-Agent generation for autoUpdater req… (#7751) 2025-07-02 16:18:44 +08:00
windowUtil.ts fix: font-family changed in Windows with new Electron (#6079) 2025-05-17 21:27:29 +08:00
zip.ts refactor[Logger]: strict type check for Logger (#8363) 2025-07-23 13:24:03 +08:00
zoom.ts style: set eol to lf, code formatting (#7923) 2025-07-08 09:50:33 +08:00