debug: add code block extraction logging
Add detailed logging to trace Skills section through code block extraction. New logs in parseResponse: - Log each code block's content length - Check if code block contains 'Skills:' - If yes, show 200 chars of text around Skills section - This runs BEFORE the content is categorized as userStats/infoBox/etc This will show us: 1. Is Skills section in the extracted code block? 2. At what point does it get truncated? 3. Is it a code block extraction issue or later processing? Related: Skills categorization debugging
This commit is contained in:
@@ -328,7 +328,13 @@ export function parseResponse(responseText) {
|
||||
const content = match[1].trim();
|
||||
|
||||
debugLog(`[RPG Parser] --- Code Block ${i + 1} ---`);
|
||||
debugLog('[RPG Parser] Content length:', content.length);
|
||||
debugLog('[RPG Parser] First 300 chars:', content.substring(0, 300));
|
||||
debugLog('[RPG Parser] Contains "Skills:":', content.includes('Skills:'));
|
||||
if (content.includes('Skills:')) {
|
||||
const skillsIndex = content.indexOf('Skills:');
|
||||
debugLog('[RPG Parser] Text around Skills (index ' + skillsIndex + '):', content.substring(skillsIndex, skillsIndex + 200));
|
||||
}
|
||||
|
||||
// Check if this is a combined code block with multiple sections
|
||||
const hasMultipleSections = (
|
||||
|
||||
Reference in New Issue
Block a user