fix(extension): Retry auto-approve 흐름 복구 + Observer 형제 탐색 + thinking 필터링 (v0.5.79)
- WS response 파일에 _from_ws 마커 추가하여 processResponseFile 삭제 방지 - extractContextFromNearby에 sibling 탐색 추가 (AG Native DOM 구조 대응) - thinking 블록 (max-h-[200px]) 필터링으로 내부 사고 릴레이 차단 - DOM 탐색 depth 5→10 확대 + pre.font-mono 우선 탐색 - 사용자 메시지 셀렉터 (.select-text.rounded-lg) 추가
This commit is contained in:
28
extension/scratch/analyze_dump.js
Normal file
28
extension/scratch/analyze_dump.js
Normal file
@@ -0,0 +1,28 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const dump = JSON.parse(fs.readFileSync(
|
||||
path.join(os.homedir(), '.gemini', 'antigravity', 'bridge', 'dump_html.json'), 'utf-8'
|
||||
));
|
||||
|
||||
const bodyStr = JSON.stringify(dump.body);
|
||||
|
||||
// Find all unique tag names
|
||||
const tagMatches = bodyStr.match(/"tag":"[a-z0-9]+"/g) || [];
|
||||
const uniqueTags = [...new Set(tagMatches)];
|
||||
console.log('=== Unique DOM tags ===');
|
||||
console.log(uniqueTags.sort().join('\n'));
|
||||
|
||||
// Check for pipe characters (markdown table syntax)
|
||||
console.log('\n=== Pipe | in text content ===');
|
||||
const pipeMatches = [...bodyStr.matchAll(/"text":"[^"]*\|[^"]*"/g)];
|
||||
console.log(`Found ${pipeMatches.length} text nodes with pipe |`);
|
||||
pipeMatches.slice(0, 5).forEach(m => console.log(' ', m[0].substring(0, 120)));
|
||||
|
||||
// Check for table-related class names
|
||||
console.log('\n=== Table-related classes ===');
|
||||
const classMatches = bodyStr.match(/"cls":"[^"]*"/g) || [];
|
||||
const tableClasses = classMatches.filter(c => /table|grid|cell|col|row/i.test(c));
|
||||
console.log(`Found ${tableClasses.length} table-related classes`);
|
||||
[...new Set(tableClasses)].slice(0, 10).forEach(c => console.log(' ', c));
|
||||
37
extension/scratch/discord_channels.js
Normal file
37
extension/scratch/discord_channels.js
Normal file
@@ -0,0 +1,37 @@
|
||||
// List all channels in the guild
|
||||
const https = require('https');
|
||||
const TOKEN = 'MTQ3OTY0ODcxNjA1MzgwNzI4NQ.GVMGbd.WN7BliH8oq9fqbaiQcyxXesJTYgBx-ObsDkK7o';
|
||||
const GUILD_ID = '1478722210460991662';
|
||||
|
||||
function apiGet(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const opts = {
|
||||
hostname: 'discord.com',
|
||||
path: `/api/v10${path}`,
|
||||
headers: { 'Authorization': `Bot ${TOKEN}` }
|
||||
};
|
||||
https.get(opts, res => {
|
||||
let data = '';
|
||||
res.on('data', c => data += c);
|
||||
res.on('end', () => {
|
||||
try { resolve(JSON.parse(data)); } catch { resolve(data); }
|
||||
});
|
||||
}).on('error', reject);
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const channels = await apiGet(`/guilds/${GUILD_ID}/channels`);
|
||||
if (!Array.isArray(channels)) {
|
||||
console.log('Error:', channels);
|
||||
return;
|
||||
}
|
||||
console.log(`Total channels: ${channels.length}\n`);
|
||||
channels.sort((a,b) => (a.position||0) - (b.position||0));
|
||||
channels.forEach(c => {
|
||||
const type = ['TEXT','DM','VOICE','GROUP_DM','CATEGORY','ANNOUNCE','','','','','','THREAD','THREAD','THREAD','','FORUM','MEDIA'][c.type] || c.type;
|
||||
console.log(`${c.id} | ${type.padEnd(10)} | #${c.name}`);
|
||||
});
|
||||
}
|
||||
|
||||
main().catch(e => console.error(e));
|
||||
55
extension/scratch/discord_read.js
Normal file
55
extension/scratch/discord_read.js
Normal file
@@ -0,0 +1,55 @@
|
||||
// Read latest Discord messages from ag-gravity_control channel
|
||||
const https = require('https');
|
||||
const TOKEN = 'MTQ3OTY0ODcxNjA1MzgwNzI4NQ.GVMGbd.WN7BliH8oq9fqbaiQcyxXesJTYgBx-ObsDkK7o';
|
||||
const CHANNEL_ID = '1483082084540223663';
|
||||
|
||||
function apiGet(path) {
|
||||
return new Promise((resolve, reject) => {
|
||||
const opts = {
|
||||
hostname: 'discord.com',
|
||||
path: `/api/v10${path}`,
|
||||
headers: { 'Authorization': `Bot ${TOKEN}` }
|
||||
};
|
||||
https.get(opts, res => {
|
||||
let data = '';
|
||||
res.on('data', c => data += c);
|
||||
res.on('end', () => {
|
||||
try { resolve(JSON.parse(data)); } catch { resolve(data); }
|
||||
});
|
||||
}).on('error', reject);
|
||||
});
|
||||
}
|
||||
|
||||
async function main() {
|
||||
const limit = process.argv[2] || 15;
|
||||
const msgs = await apiGet(`/channels/${CHANNEL_ID}/messages?limit=${limit}`);
|
||||
if (!Array.isArray(msgs)) {
|
||||
console.log('Error:', JSON.stringify(msgs));
|
||||
return;
|
||||
}
|
||||
|
||||
console.log(`=== #ag-gravity_control — Last ${msgs.length} messages ===\n`);
|
||||
|
||||
msgs.reverse().forEach(m => {
|
||||
const time = new Date(m.timestamp).toLocaleString('ko-KR', { timeZone: 'Asia/Seoul', hour: '2-digit', minute: '2-digit', second: '2-digit' });
|
||||
const author = m.author?.username || '?';
|
||||
|
||||
if (m.embeds?.length > 0) {
|
||||
m.embeds.forEach(e => {
|
||||
const title = e.title || '(no title)';
|
||||
const desc = (e.description || '').substring(0, 300);
|
||||
const colorHex = e.color ? `#${e.color.toString(16).padStart(6, '0')}` : 'default';
|
||||
const footer = e.footer?.text || '';
|
||||
console.log(`[${time}] 📦 EMBED [${colorHex}] ${title}`);
|
||||
if (desc) console.log(` ${desc.replace(/\n/g, '\n ')}`);
|
||||
if (footer) console.log(` 📎 ${footer}`);
|
||||
});
|
||||
} else if (m.content) {
|
||||
const content = m.content.substring(0, 300);
|
||||
console.log(`[${time}] 💬 ${author}: ${content}`);
|
||||
}
|
||||
console.log('');
|
||||
});
|
||||
}
|
||||
|
||||
main().catch(e => console.error(e));
|
||||
29
extension/scratch/find_user_msg.js
Normal file
29
extension/scratch/find_user_msg.js
Normal file
@@ -0,0 +1,29 @@
|
||||
const fs = require('fs');
|
||||
const path = require('path');
|
||||
const os = require('os');
|
||||
|
||||
const d = JSON.parse(fs.readFileSync(
|
||||
path.join(os.homedir(), '.gemini', 'antigravity', 'bridge', 'dump_html.json'), 'utf-8'
|
||||
));
|
||||
const s = JSON.stringify(d.body);
|
||||
|
||||
console.log('title:', d.quickInfo.title);
|
||||
console.log('Has id=conversation:', s.includes('"id":"conversation"'));
|
||||
console.log('Has agent-side-panel:', s.includes('antigravity-agent-side-panel'));
|
||||
|
||||
// Find message-block patterns
|
||||
const mb = [...s.matchAll(/message-block/g)];
|
||||
console.log('message-block occurrences:', mb.length);
|
||||
|
||||
// Find user-related class patterns
|
||||
const userPatterns = ['user-color', 'user-background', 'user-message', 'user-query', 'user-input', 'human'];
|
||||
userPatterns.forEach(p => {
|
||||
const cnt = [...s.matchAll(new RegExp(p, 'gi'))].length;
|
||||
if (cnt > 0) console.log(` ${p}: ${cnt} occurrences`);
|
||||
});
|
||||
|
||||
// Show all unique classes that include 'message' or 'chat' or 'conversation'
|
||||
const clsMatches = [...s.matchAll(/"cls":"([^"]*(?:message|chat|conversation|query|user|human)[^"]*)"/gi)];
|
||||
console.log('\nClasses with message/chat/conversation/user/human:');
|
||||
const uniq = [...new Set(clsMatches.map(m => m[1]))];
|
||||
uniq.forEach(c => console.log(' ', c.substring(0, 120)));
|
||||
Reference in New Issue
Block a user