feat(inventory): wire up v2 system to main panel with full interactivity
- Add inventory section to template.html between Thoughts and bottom controls - Wire up renderInventory() to all event handlers (message received, character changed, swipes) - Initialize inventory container reference and event listeners in index.js - Add showInventory toggle checkbox to settings with visibility control - Update layout.js to handle inventory section and divider visibility - Add renderInventory parameter to updateRPGData for separate mode support - Update state.js and config.js with inventory container and showInventory setting Inventory is now fully integrated as a visible, interactive panel section that persists across all user interactions.
This commit is contained in:
@@ -25,8 +25,9 @@ import { parseResponse, parseUserStats } from './parser.js';
|
||||
* @param {Function} renderUserStats - UI function to render user stats
|
||||
* @param {Function} renderInfoBox - UI function to render info box
|
||||
* @param {Function} renderThoughts - UI function to render character thoughts
|
||||
* @param {Function} renderInventory - UI function to render inventory
|
||||
*/
|
||||
export async function updateRPGData(renderUserStats, renderInfoBox, renderThoughts) {
|
||||
export async function updateRPGData(renderUserStats, renderInfoBox, renderThoughts, renderInventory) {
|
||||
if (isGenerating) {
|
||||
// console.log('[RPG Companion] Already generating, skipping...');
|
||||
return;
|
||||
@@ -123,6 +124,7 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough
|
||||
renderUserStats();
|
||||
renderInfoBox();
|
||||
renderThoughts();
|
||||
renderInventory();
|
||||
} else {
|
||||
// No assistant message to attach to - just update display
|
||||
if (parsedData.userStats) {
|
||||
@@ -131,6 +133,7 @@ export async function updateRPGData(renderUserStats, renderInfoBox, renderThough
|
||||
renderUserStats();
|
||||
renderInfoBox();
|
||||
renderThoughts();
|
||||
renderInventory();
|
||||
}
|
||||
|
||||
// Save to chat metadata
|
||||
|
||||
Reference in New Issue
Block a user