v3.7.1: Weather keywords, character stat editing fix, scroll bug fix, avatar layout
- Improved weather generation: Added hard templates for weather keywords to ensure LLM generates valid weather patterns that match dynamic effects - Fixed character stat editing bug: Now properly handles array format stats from LLM (values no longer revert on blur) - Fixed scroll/viewport bug: Mobile-only scrollIntoView prevents page jumping on desktop when editing fields - Changed Present Characters avatar display: Avatar now aligned with name in header row, fields take full width below - Updated descriptions and labels
This commit is contained in:
@@ -5,6 +5,8 @@
|
||||
|
||||
import { extensionSettings, committedTrackerData } from '../../core/state.js';
|
||||
import { getContext } from '../../../../../../extensions.js';
|
||||
import { getWeatherKeywordsAsPromptString } from '../ui/weatherEffects.js';
|
||||
import { i18n } from '../../core/i18n.js';
|
||||
|
||||
/**
|
||||
* Converts a field name to snake_case for use as JSON key
|
||||
@@ -132,7 +134,10 @@ export function buildInfoBoxJSONInstruction() {
|
||||
}
|
||||
|
||||
if (widgets.weather?.enabled) {
|
||||
instruction += (hasFields ? ',\n' : '') + ' "weather": {"emoji": "Weather Emoji", "forecast": "Forecast"}';
|
||||
// Get valid weather keywords for the current language to guide LLM generation
|
||||
const currentLang = i18n.currentLanguage || 'en';
|
||||
const weatherHint = getWeatherKeywordsAsPromptString(currentLang);
|
||||
instruction += (hasFields ? ',\n' : '') + ` "weather": {"emoji": "Weather Emoji", "forecast": "Forecast"} // ${weatherHint}`;
|
||||
hasFields = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user