Update GT_bindings.js

This commit is contained in:
2025-10-24 19:53:06 +08:00
committed by GitHub
parent fe55aa98c1
commit 051bcee3a0

View File

@@ -659,8 +659,9 @@ export function bindGlossaryEvents() {
bindReorganizeEvents(); bindReorganizeEvents();
loadWorldBooks(); loadWorldBooks();
eventSource.on(event_types.CHARACTER_PAGE_LOADED, () => { // 监听我们自己的世界书创建事件,而不是监听全局的角色加载事件,避免冲突
console.log('[Amily2-术语表] 检测到角色加载,重新加载世界书列表以确保同步。'); document.addEventListener('amily-lorebook-created', (event) => {
console.log(`[Amily2-术语表] 检测到新世界书《${event.detail.bookName}》创建,重新加载列表以确保同步。`);
loadWorldBooks(); loadWorldBooks();
}); });