probe: Trial A (extension exports) + Trial B (chat commands) — systematic approach
This commit is contained in:
@@ -428,6 +428,70 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
|
||||
|
||||
|
||||
// ========== Trial A: Extension exports probe ==========
|
||||
setTimeout(async () => {
|
||||
console.log('Gravity Bridge: [Trial A] Probing Antigravity extension exports...');
|
||||
|
||||
// Try both possible extension IDs
|
||||
const extIds = ['google.antigravity', 'Google.antigravity', 'antigravity.antigravity'];
|
||||
for (const id of extIds) {
|
||||
const ext = vscode.extensions.getExtension(id);
|
||||
if (ext) {
|
||||
console.log(`Gravity Bridge: [Trial A] ✅ Found extension: ${id}`);
|
||||
console.log(`Gravity Bridge: [Trial A] isActive: ${ext.isActive}`);
|
||||
console.log(`Gravity Bridge: [Trial A] extensionPath: ${ext.extensionPath}`);
|
||||
|
||||
// Check exports
|
||||
const exports = ext.exports;
|
||||
if (exports) {
|
||||
const keys = Object.keys(exports);
|
||||
console.log(`Gravity Bridge: [Trial A] exports keys (${keys.length}): ${keys.join(', ')}`);
|
||||
// Deep inspect each export
|
||||
for (const key of keys.slice(0, 10)) {
|
||||
const val = exports[key];
|
||||
const type = typeof val;
|
||||
if (type === 'function') {
|
||||
console.log(`Gravity Bridge: [Trial A] ${key}: function(${val.length} args)`);
|
||||
} else if (type === 'object' && val) {
|
||||
const subKeys = Object.keys(val).slice(0, 5);
|
||||
console.log(`Gravity Bridge: [Trial A] ${key}: object {${subKeys.join(', ')}}`);
|
||||
} else {
|
||||
console.log(`Gravity Bridge: [Trial A] ${key}: ${type} = ${JSON.stringify(val).substring(0, 100)}`);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
console.log(`Gravity Bridge: [Trial A] exports is null/undefined`);
|
||||
}
|
||||
|
||||
// Check extension package.json for activation events
|
||||
const pkg = ext.packageJSON;
|
||||
if (pkg?.contributes?.commands) {
|
||||
const cmdCount = pkg.contributes.commands.length;
|
||||
console.log(`Gravity Bridge: [Trial A] package.json contributes ${cmdCount} commands`);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// Trial B: Check all chat-related commands
|
||||
console.log('Gravity Bridge: [Trial B] Probing chat-related commands...');
|
||||
const cmds = await vscode.commands.getCommands(true);
|
||||
const chatCmds = cmds.filter((c: string) =>
|
||||
c.includes('chat') && (c.includes('export') || c.includes('history') ||
|
||||
c.includes('conversation') || c.includes('message') || c.includes('copy'))
|
||||
);
|
||||
console.log(`Gravity Bridge: [Trial B] chat export/history/conversation commands: ${chatCmds.join(', ') || 'NONE'}`);
|
||||
|
||||
// Also list ALL antigravity commands we haven't explored
|
||||
const agCmds = cmds.filter((c: string) =>
|
||||
c.includes('antigravity') && (c.includes('get') || c.includes('export') ||
|
||||
c.includes('conversation') || c.includes('history') || c.includes('message'))
|
||||
);
|
||||
console.log(`Gravity Bridge: [Trial B] antigravity get/export/conversation commands: ${agCmds.join(', ') || 'NONE'}`);
|
||||
|
||||
}, 5000);
|
||||
|
||||
// Start LS bridge after a delay
|
||||
setTimeout(async () => {
|
||||
const found = await discoverLS();
|
||||
|
||||
Reference in New Issue
Block a user