Refactor historical context handling and remove unused initialization function

This commit is contained in:
tomt610
2026-01-09 20:51:28 +00:00
parent b43cca5b6f
commit fea59efe4e
3 changed files with 12 additions and 64 deletions
+1 -4
View File
@@ -55,7 +55,7 @@ import {
} from './src/systems/generation/promptBuilder.js';
import { parseResponse, parseUserStats } from './src/systems/generation/parser.js';
import { updateRPGData, testExternalAPIConnection } from './src/systems/generation/apiClient.js';
import { onGenerationStarted, initHistoricalContextInjection } from './src/systems/generation/injector.js';
import { onGenerationStarted } from './src/systems/generation/injector.js';
// Rendering modules
import { getSafeThumbnailUrl } from './src/utils/avatars.js';
@@ -1031,9 +1031,6 @@ jQuery(async () => {
[event_types.USER_MESSAGE_RENDERED]: updatePersonaAvatar,
[event_types.SETTINGS_UPDATED]: updatePersonaAvatar
});
// Initialize historical context injection (uses CHAT_COMPLETION_PROMPT_READY event)
initHistoricalContextInjection();
} catch (error) {
console.error('[RPG Companion] Event registration failed:', error);
throw error; // This is critical - can't continue without events