feat: Add custom avatar upload for NPCs in Present Characters panel

- Add npcAvatars storage to extension settings for custom NPC images
- Implement getCharacterAvatar() to check custom avatars first
- Add uploadNpcAvatar() function with file validation (2MB max, images only)
- Make character avatars clickable with visual feedback
- Support left-click to upload and right-click to remove custom avatars
- Add camera icon overlay on hover with smooth animations
- Store avatars as base64 data URIs for persistence across sessions
This commit is contained in:
Spicy_Marinara
2025-12-18 14:14:49 +01:00
parent 5bc7bfe22f
commit ab7dfeaf8b
3 changed files with 210 additions and 61 deletions
+2 -1
View File
@@ -164,7 +164,8 @@ export let extensionSettings = {
assets: 'list' // 'list' or 'grid' view mode for Assets section
},
debugMode: false, // Enable debug logging visible in UI (for mobile debugging)
memoryMessagesToProcess: 16 // Number of messages to process per batch in memory recollection
memoryMessagesToProcess: 16, // Number of messages to process per batch in memory recollection
npcAvatars: {} // Store custom avatar images for NPCs (key: character name, value: base64 data URI)
};
/**