feat(enrichment): Discord 알림 지연 + Step Probe 폴링 — generic Always run 커맨드 100% 보강 (v0.5.91)
This commit is contained in:
26
extension/scratch/print_dom_tree.js
Normal file
26
extension/scratch/print_dom_tree.js
Normal file
@@ -0,0 +1,26 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
|
||||
const dump = JSON.parse(fs.readFileSync(
|
||||
path.join(process.env.USERPROFILE, '.gemini/antigravity/bridge/deep-inspect-result.json'), 'utf8'
|
||||
));
|
||||
|
||||
function printTree(node, indent, maxDepth) {
|
||||
if (!node || indent > maxDepth) return;
|
||||
const tag = (node.tag || '?').toLowerCase();
|
||||
const clsArr = (node.cls || '').split(' ').filter(c => c.length > 0);
|
||||
const clsShort = clsArr.slice(0, 3).join(' ');
|
||||
const text = (node.text || '').substring(0, 40).replace(/[\n\r]+/g, ' ');
|
||||
const childCount = (node.children || []).length;
|
||||
let line = ' '.repeat(indent) + tag;
|
||||
if (clsShort) line += '.' + clsArr[0];
|
||||
if (childCount) line += ' [' + childCount + ' children]';
|
||||
if (text && childCount === 0) line += ' = "' + text + '"';
|
||||
console.log(line);
|
||||
if (node.children) {
|
||||
for (const c of node.children) printTree(c, indent + 1, maxDepth);
|
||||
}
|
||||
}
|
||||
|
||||
console.log('=== FULL DOM TREE (depth 8) ===');
|
||||
printTree(dump.bodyTree || dump.body, 0, 8);
|
||||
Reference in New Issue
Block a user