Revert "Update promptBuilder.js"

This reverts commit 3c6daa6a72.
This commit is contained in:
Spicy_Marinara
2025-12-05 22:43:04 +01:00
parent 3c6daa6a72
commit 275179fa7f
+21 -21
View File
@@ -224,7 +224,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
const enabledStats = trackerConfig?.userStats?.customStats?.filter(s => s?.enabled && s?.name) || [];
if (enabledStats.length > 0) {
let statsJson = ' "stats": {\n';
statsJson += enabledStats.map(s => ` "${s.name}": X`).join(',\n');
statsJson += enabledStats.map(s => ` "${s.name}": 75`).join(',\n');
statsJson += '\n }';
sections.push(statsJson);
}
@@ -235,7 +235,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
let statusJson = ' "status": {\n';
const statusParts = [];
if (statusConfig.showMoodEmoji) {
statusParts.push(' "mood": "[Mood Emoji]"');
statusParts.push(' "mood": "😊"');
}
const customFields = statusConfig.customFields || [];
if (customFields.length > 0) {
@@ -250,7 +250,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
// Skills section
const skillsSectionEnabled = trackerConfig?.userStats?.skillsSection?.enabled || false;
if (skillsSectionEnabled && !extensionSettings.showSkills) {
sections.push(` "skills": "[Skills]"`);
sections.push(` "skills": "Skill1, Skill2, Skill3"`);
}
}
@@ -290,15 +290,15 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
if (showInfoBox) {
const widgets = trackerConfig?.infoBox?.widgets || {};
const infoParts = [];
if (widgets.date?.enabled) infoParts.push(' "date": "[Day, Month, Year]"');
if (widgets.time?.enabled) infoParts.push(' "time": "[Time Start → Time End]"');
if (widgets.weather?.enabled) infoParts.push(' "weather": "[Weather Emoji, Weather]"');
if (widgets.date?.enabled) infoParts.push(' "date": "Monday, March 15, 1242"');
if (widgets.time?.enabled) infoParts.push(' "time": "14:00 → 15:30"');
if (widgets.weather?.enabled) infoParts.push(' "weather": "☀️ Sunny"');
if (widgets.temperature?.enabled) {
const unit = widgets.temperature.unit === 'F' ? '°F' : '°C';
infoParts.push(` "temperature": "X${unit}"`);
infoParts.push(` "temperature": "22${unit}"`);
}
if (widgets.location?.enabled) infoParts.push(' "location": "[Location]"');
if (widgets.recentEvents?.enabled) infoParts.push(' "recentEvents": "[Events]"');
if (widgets.location?.enabled) infoParts.push(' "location": "Forest Clearing"');
if (widgets.recentEvents?.enabled) infoParts.push(' "recentEvents": ["Event 1", "Event 2"]');
if (infoParts.length > 0) {
sections.push(' "infoBox": {\n' + infoParts.join(',\n') + '\n }');
@@ -308,12 +308,12 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
// Characters section
if (showCharacters) {
const charConfig = trackerConfig?.presentCharacters || {};
let charExample = ' {\n "name": "Character Name",\n "emoji": "[Character Emoji]"';
let charExample = ' {\n "name": "Character Name",\n "emoji": "🧑"';
if (charConfig.relationshipFields?.length > 0) {
// Show allowed relationship values as explanation
const allowedRelationships = charConfig.relationshipFields.join(' | ');
charExample += `,\n "relationship": "[${allowedRelationships}]"`;
charExample += `,\n "relationship": "(${allowedRelationships})"`;
}
const enabledFields = charConfig.customFields?.filter(f => f.enabled) || [];
@@ -326,7 +326,7 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
const charStatsConfig = charConfig.characterStats;
const enabledCharStats = charStatsConfig?.enabled && charStatsConfig?.customStats?.filter(s => s?.enabled && s?.name) || [];
if (enabledCharStats.length > 0) {
const statsJson = enabledCharStats.map(s => ` "${s.name}": X`).join(',\n');
const statsJson = enabledCharStats.map(s => ` "${s.name}": 75`).join(',\n');
charExample += `,\n "stats": {\n${statsJson}\n }`;
}
@@ -344,20 +344,20 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
if (extensionSettings.useSimplifiedInventory) {
// Simplified: single list
let itemExample = '{ "name": "Item Name", "description": "[What It Is]" }';
let itemExample = '{ "name": "Item Name", "description": "What it is" }';
if (enableItemSkillLinks) {
itemExample = '{ "name": "Iron Sword", "description": "[What It Is]", "grantsSkill": "[Skill]" }';
itemExample = '{ "name": "Iron Sword", "description": "A sturdy blade", "grantsSkill": "Sword Fighting" }';
}
invSection += ` "items": [${itemExample}]\n`;
} else {
// Full categorized inventory
let itemExample = '{ "name": "Item", "description": "Description" }';
if (enableItemSkillLinks) {
itemExample = '{ "name": "Iron Sword", "description": "[What It Is]", "grantsSkill": "[Skill]" }';
itemExample = '{ "name": "Iron Sword", "description": "A sturdy blade", "grantsSkill": "Sword Fighting" }';
}
invSection += ` "onPerson": [${itemExample}],\n`;
invSection += ' "stored": { "Location Name": [{ "name": "Stored Item", "description": "[What It Is]" }] },\n';
invSection += ' "assets": [{ "name": "[Property/Vehicle]", "description": "[What It Is]" }]\n';
invSection += ' "stored": { "Location Name": [{ "name": "Stored Item", "description": "Description" }] },\n';
invSection += ' "assets": [{ "name": "Property/Vehicle", "description": "Description" }]\n';
}
invSection += ' }';
@@ -374,9 +374,9 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
let skillsSection = ' "skills": {\n';
const categoryExamples = enabledCategories.map(cat => {
const catName = cat.name;
let skillExample = '{ "name": "Ability Name", "description": "[What This Ability Does]" }';
let skillExample = '{ "name": "Ability Name", "description": "What this ability does" }';
if (enableItemSkillLinks) {
skillExample = '{ "name": "Ability", "description": "[Description]", "grantedBy": "[Item Name]" }';
skillExample = '{ "name": "Ability", "description": "Description", "grantedBy": "Item Name" }';
}
return ` "${catName}": [${skillExample}]`;
});
@@ -389,8 +389,8 @@ export function generateJSONTrackerInstructions(includeHtmlPrompt = true, includ
// Quests section
if (showQuests) {
let questsSection = ' "quests": {\n';
questsSection += ' "main": { "name": "Main Quest Title", "description": "[Primary objective]" },\n';
questsSection += ' "optional": [{ "name": "Side Quest", "description": "[Optional objective]" }]\n';
questsSection += ' "main": { "name": "Main Quest Title", "description": "Primary objective" },\n';
questsSection += ' "optional": [{ "name": "Side Quest", "description": "Optional objective" }]\n';
questsSection += ' }';
sections.push(questsSection);
}