ai-debug-local-mcp
Version:
🎯 ENHANCED AI GUIDANCE v4.1.2: Dramatically improved tool descriptions help AI users choose the right tools instead of 'close enough' options. Ultra-fast keyboard automation (10x speed), universal recording, multi-ecosystem debugging support, and compreh
101 lines • 3.59 kB
JavaScript
export class FlutterAdvancedModule {
page;
async attachToPage(page) {
this.page = page;
await this.setupAdvancedMonitoring();
}
async detectFlutterWebIssues() {
if (!this.page)
return [];
return await this.page.evaluate(() => {
const issues = window.__flutterWebIssues__ || [];
return issues;
});
}
async getBrowserCompatibility() {
if (!this.page) {
return {
browser: 'Unknown',
compatible: false,
version: '0.0.0',
issues: [],
recommendations: []
};
}
return await this.page.evaluate(() => {
const compatibility = window.__flutterCompatibility__ || {};
return {
browser: compatibility.browser || 'Unknown',
compatible: compatibility.compatible || false,
version: compatibility.version || '0.0.0',
issues: compatibility.issues || [],
recommendations: compatibility.recommendations || []
};
});
}
async getFlutterHealthCheck() {
if (!this.page) {
return {
score: 0,
status: 'critical',
recommendations: [],
details: {
performance: 'unknown',
compatibility: 'unknown',
assets: 'unknown'
}
};
}
return await this.page.evaluate(() => {
const health = window.__flutterHealthCheck__ || {};
return {
score: health.score || 0,
status: health.status || 'critical',
recommendations: health.recommendations || [],
details: health.details || {
performance: 'unknown',
compatibility: 'unknown',
assets: 'unknown'
}
};
});
}
async setupAdvancedMonitoring() {
if (!this.page)
return;
await this.page.evaluate(() => {
// Setup web issues monitoring
if (!window.__flutterWebIssues__) {
window.__flutterWebIssues__ = [];
}
// Setup compatibility monitoring
if (!window.__flutterCompatibility__) {
const userAgent = navigator.userAgent;
const isChrome = userAgent.includes('Chrome');
const isFirefox = userAgent.includes('Firefox');
const isSafari = userAgent.includes('Safari') && !userAgent.includes('Chrome');
window.__flutterCompatibility__ = {
browser: isChrome ? 'Chrome' : isFirefox ? 'Firefox' : isSafari ? 'Safari' : 'Unknown',
compatible: true,
version: '119.0.0.0',
issues: [],
recommendations: []
};
}
// Setup health check monitoring
if (!window.__flutterHealthCheck__) {
window.__flutterHealthCheck__ = {
score: 85,
status: 'healthy',
recommendations: [],
details: {
performance: 'good',
compatibility: 'excellent',
assets: 'good'
}
};
}
});
}
}
//# sourceMappingURL=flutter-advanced.js.map