fix: AI SUGGEST auto-updates after saving preset in manager

Add aiPresetVersion counter. Increment on modal close. AI panel
compares version and calls loadPresets() to sync from localStorage.
This commit is contained in:
2026-07-29 11:45:31 +07:00
parent fa7917cf54
commit 41b5a70a60
3 changed files with 17 additions and 4 deletions
+6
View File
@@ -801,3 +801,9 @@
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---
### [2026-07-29 11:45] Task: AI SUGGEST auto-update after saving preset in AI Preset Manager
- **Tóm tắt thay đổi:** Thêm `aiPresetVersion` counter, increment khi AIPresetModal đóng. Trong AI panel, so sánh version với `window.__aiPresetVersion`, nếu khác thì gọi `aiPromptMgrRef.current.loadPresets()` để reload từ localStorage.
- **Các file ảnh hưởng:** `app/static/js/app.jsx`
- **Ghi chú/Test (nếu có):** `npm run build` — build passes.
---