Fix tab trích dẫn/lưới ko hiển thị + Thêm viết bài theo chủ đề (laguna-s2.1free OpenRouter)
#1
by bep40 - opened
Fixes
- Tab trích dẫn / lưới ko hiển thị gì —
_gridQuotesđược khai báo ở cuối file nhưng được gọi từ đầu → di chuyển lên module scope; thêmwindow.openModalGridDesigner / closeModalGridexpose ra global. - Escape helper — rename
escape()→_esc()để không shadow globalescape()(chỉ escape được dấu nháy đơn). - Palette duplicate class — dùng
classList.toggle('active')đúng cách.
New feature
- Viết bài theo chủ đề — model
poolside/laguna-s-2.1:freequa OpenRouter (/api/pid/gen_text), văn phong báo chí Việt Nam; fallback lần lượt: ZeroGPU SenseNova → local RSS + KNOWLEDGE_BANK. Kích hoạt khi set envOPENROUTER_API_KEY.
Testing
- Server chạy, endpoint
/api/pid/gen_texttest OK (fallback synthesis). - All 3 JS files syntax validated.