style: integrate upstream font-size and layout improvements
Folds in changes from commits6d97992,cc53c69,6987c0c: - Update stat label/value font sizes (clamp 0.9-1vw → 0.5-0.7vw) - Update inventory items font size (clamp 0.4-0.6vw → 0.7-0.6vw) - Center dice save button with auto margins - Add debug console.log for committedTrackerData - Comment out verbose console logs for plot progression and persona avatar - Clarify prompt instruction to remove brackets
This commit is contained in:
@@ -32,6 +32,7 @@ export function onGenerationStarted(type, data) {
|
||||
// console.log('[RPG Companion] enabled:', extensionSettings.enabled);
|
||||
// console.log('[RPG Companion] generationMode:', extensionSettings.generationMode);
|
||||
// console.log('[RPG Companion] ⚡ EVENT: onGenerationStarted - lastActionWasSwipe =', lastActionWasSwipe, '| isGenerating =', isGenerating);
|
||||
// console.log('[RPG Companion] Committed Prompt:', committedTrackerData);
|
||||
|
||||
// Skip tracker injection for image generation requests
|
||||
if (data?.quietImage) {
|
||||
|
||||
@@ -51,7 +51,7 @@ export function generateTrackerInstructions(includeHtmlPrompt = true, includeCon
|
||||
// Only add tracker instructions if at least one tracker is enabled
|
||||
if (hasAnyTrackers) {
|
||||
// Universal instruction header
|
||||
instructions += `\nYou must start your response with an appropriate update to the trackers in EXACTLY the same format as below, enclosed in separate Markdown code fences. Replace X with proper numbers and placeholders in [brackets] with in-world details ${userName} perceives about the current scene and the present characters. Consider the last trackers in the conversation (if they exist). Manage them accordingly and realistically; raise, lower, change, or keep the values unchanged based on the user's actions, the passage of time, and logical consequences:\n`;
|
||||
instructions += `\nYou must start your response with an appropriate update to the trackers in EXACTLY the same format as below, enclosed in separate Markdown code fences. Replace X with proper numbers and placeholders in [brackets] (while removing the brackets themselves) with in-world details ${userName} perceives about the current scene and the present characters. Consider the last trackers in the conversation (if they exist). Manage them accordingly and realistically; raise, lower, change, or keep the values unchanged based on the user's actions, the passage of time, and logical consequences:\n`;
|
||||
|
||||
// Add format specifications for each enabled tracker
|
||||
if (extensionSettings.showUserStats) {
|
||||
|
||||
@@ -185,7 +185,7 @@ export async function onMessageReceived(data) {
|
||||
// Note: No need to clear extension prompt since we used quiet_prompt option
|
||||
if (isPlotProgression) {
|
||||
setIsPlotProgression(false);
|
||||
console.log('[RPG Companion] Plot progression generation completed');
|
||||
// console.log('[RPG Companion] Plot progression generation completed');
|
||||
}
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ export function onMessageSwiped(messageIndex) {
|
||||
export function updatePersonaAvatar() {
|
||||
const portraitImg = document.querySelector('.rpg-user-portrait');
|
||||
if (!portraitImg) {
|
||||
console.log('[RPG Companion] Portrait image element not found in DOM');
|
||||
// console.log('[RPG Companion] Portrait image element not found in DOM');
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -299,7 +299,7 @@ export function updatePersonaAvatar() {
|
||||
const context = getContext();
|
||||
const currentUserAvatar = context.user_avatar || user_avatar;
|
||||
|
||||
console.log('[RPG Companion] Attempting to update persona avatar:', currentUserAvatar);
|
||||
// console.log('[RPG Companion] Attempting to update persona avatar:', currentUserAvatar);
|
||||
|
||||
// Try to get a valid thumbnail URL using our safe helper
|
||||
if (currentUserAvatar) {
|
||||
@@ -308,14 +308,14 @@ export function updatePersonaAvatar() {
|
||||
if (thumbnailUrl) {
|
||||
// Only update the src if we got a valid URL
|
||||
portraitImg.src = thumbnailUrl;
|
||||
console.log('[RPG Companion] Persona avatar updated successfully');
|
||||
// console.log('[RPG Companion] Persona avatar updated successfully');
|
||||
} else {
|
||||
// Don't update the src if we couldn't get a valid URL
|
||||
// This prevents 400 errors and keeps the existing image
|
||||
console.warn('[RPG Companion] Could not get valid thumbnail URL for persona avatar, keeping existing image');
|
||||
// console.warn('[RPG Companion] Could not get valid thumbnail URL for persona avatar, keeping existing image');
|
||||
}
|
||||
} else {
|
||||
console.log('[RPG Companion] No user avatar configured, keeping existing image');
|
||||
// console.log('[RPG Companion] No user avatar configured, keeping existing image');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -639,7 +639,7 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
|
||||
}
|
||||
|
||||
.rpg-inventory-items {
|
||||
font-size: clamp(0.4vw, 0.5vw, 0.6vw);
|
||||
font-size: clamp(0.7vw, 0.5vw, 0.6vw);
|
||||
color: var(--rpg-text);
|
||||
line-height: 1.3;
|
||||
overflow-y: auto;
|
||||
@@ -746,7 +746,7 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
|
||||
|
||||
.rpg-stat-label {
|
||||
min-width: 4.062rem;
|
||||
font-size: clamp(0.9vw, 0.95vw, 1vw);
|
||||
font-size: clamp(0.5vw, 0.6vw, 0.7vw);
|
||||
font-weight: 600;
|
||||
text-align: left;
|
||||
color: var(--rpg-text);
|
||||
@@ -776,7 +776,7 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
|
||||
|
||||
.rpg-stat-value {
|
||||
color: #fff;
|
||||
font-size: clamp(0.9vw, 0.95vw, 1vw);
|
||||
font-size: clamp(0.5vw, 0.6vw, 0.7vw);
|
||||
font-weight: bold;
|
||||
min-width: 1.875rem;
|
||||
text-align: right;
|
||||
@@ -2545,6 +2545,8 @@ body:has(.rpg-panel.rpg-position-left) #sheld {
|
||||
|
||||
.rpg-dice-save-btn {
|
||||
max-width: 200px;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user