Revert "feat: responsive dashboard layout"

This commit is contained in:
Spicy Marinara
2025-11-06 20:05:33 +01:00
committed by GitHub
parent a8d5a88438
commit 71727c0a50
17 changed files with 238 additions and 2804 deletions
+3 -54
View File
@@ -10,53 +10,6 @@ import { extensionSettings, committedTrackerData, FEATURE_FLAGS } from '../../co
// Type imports
/** @typedef {import('../../types/inventory.js').InventoryV2} InventoryV2 */
/**
* Builds a formatted skills summary for AI context injection.
* Converts structured skills data to multi-line plaintext format organized by category.
*
* @param {Object|string} skills - Current skills (structured or legacy string)
* @returns {string} Formatted skills summary for prompt injection
* @example
* // Structured input: { version: 1, categories: { Combat: [{name: 'Swordsmanship', level: 5}] }, uncategorized: [] }
* // Returns: "Skills:\nCombat:\n- Swordsmanship (Lv 5)"
*/
export function buildSkillsSummary(skills) {
// Handle legacy string format
if (typeof skills === 'string') {
return `Skills: ${skills}`;
}
// Handle structured format
if (skills && typeof skills === 'object' && skills.version) {
let summary = 'Skills:';
const categories = skills.categories || {};
const uncategorized = skills.uncategorized || [];
// Add categorized skills
for (const [categoryName, skillsList] of Object.entries(categories)) {
if (skillsList && skillsList.length > 0) {
summary += `\n${categoryName}:`;
for (const skill of skillsList) {
summary += `\n- ${skill.name} (Lv ${skill.level})`;
}
}
}
// Add uncategorized skills
if (uncategorized.length > 0) {
summary += '\nUncategorized:';
for (const skill of uncategorized) {
summary += `\n- ${skill.name} (Lv ${skill.level})`;
}
}
return summary;
}
// Empty or invalid
return 'Skills: None';
}
/**
* Builds a formatted inventory summary for AI context injection.
* Converts v2 inventory structure to multi-line plaintext format.
@@ -213,13 +166,9 @@ export function generateTrackerInstructions(includeHtmlPrompt = true, includeCon
// Add skills section if enabled
if (userStatsConfig?.skillsSection?.enabled) {
instructions += `Skills:\n`;
instructions += `[Category Name]:\n`;
instructions += `- [Skill Name] (Lv [1-100])\n`;
instructions += `- [Another Skill] (Lv [1-100])\n`;
instructions += `Uncategorized:\n`;
instructions += `- [Uncategorized Skill] (Lv [1-100])\n`;
instructions += `(Organize skills by logical categories like Combat, Magic, Social, Crafting, etc. IMPORTANT: Use numeric levels only - write "Lv 5" not "Proficient", "Lv 7" not "Advanced". Use integers 1-100 where 1=novice, 5=intermediate, 10=expert. Skills without a clear category go in Uncategorized.)\n`;
const skillFields = userStatsConfig.skillsSection.customFields || [];
const skillFieldsText = skillFields.map(f => `[${f}]`).join(', ');
instructions += `Skills: [${skillFieldsText || 'Skill1, Skill2, etc.'}]\n`;
}
// Add inventory format based on feature flag