chrome-devtools-mcp-for-extension 0.18.6 → 0.18.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -277,9 +277,45 @@ export const askGeminiWeb = defineTool({
|
|
|
277
277
|
const status = await page.evaluate(() => {
|
|
278
278
|
// Check for generating indicators
|
|
279
279
|
const buttons = Array.from(document.querySelectorAll('button'));
|
|
280
|
-
const stopButton = buttons.find(b =>
|
|
281
|
-
|
|
282
|
-
b.
|
|
280
|
+
const stopButton = buttons.find(b => {
|
|
281
|
+
// Text-based detection
|
|
282
|
+
const text = b.textContent || '';
|
|
283
|
+
const ariaLabel = b.getAttribute('aria-label') || '';
|
|
284
|
+
if (text.includes('回答を停止') || text.includes('Stop') ||
|
|
285
|
+
ariaLabel.includes('Stop') || ariaLabel.includes('停止') ||
|
|
286
|
+
ariaLabel.includes('中止') || ariaLabel.includes('Cancel')) {
|
|
287
|
+
return true;
|
|
288
|
+
}
|
|
289
|
+
// Icon-based detection (blue square stop button)
|
|
290
|
+
// Check for mat-icon with stop icon
|
|
291
|
+
const matIcon = b.querySelector('mat-icon');
|
|
292
|
+
if (matIcon && (matIcon.textContent?.includes('stop') ||
|
|
293
|
+
matIcon.getAttribute('data-mat-icon-name')?.includes('stop'))) {
|
|
294
|
+
return true;
|
|
295
|
+
}
|
|
296
|
+
// Check for SVG stop icon (square shape) - common in Gemini UI
|
|
297
|
+
const svg = b.querySelector('svg');
|
|
298
|
+
if (svg) {
|
|
299
|
+
// Stop icon typically has a rect element (square)
|
|
300
|
+
const rect = svg.querySelector('rect');
|
|
301
|
+
if (rect) {
|
|
302
|
+
return true;
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
// Check for button with blue background (Google's stop button style)
|
|
306
|
+
const style = window.getComputedStyle(b);
|
|
307
|
+
const bgColor = style.backgroundColor;
|
|
308
|
+
if (bgColor.includes('rgb(66, 133, 244)') || // Google blue
|
|
309
|
+
bgColor.includes('rgb(26, 115, 232)') || // Another Google blue
|
|
310
|
+
bgColor.includes('rgb(138, 180, 248)')) { // Light blue
|
|
311
|
+
// Only if button is visible and small (stop button is typically icon-only)
|
|
312
|
+
const rect = b.getBoundingClientRect();
|
|
313
|
+
if (rect.width > 0 && rect.width < 100) {
|
|
314
|
+
return true;
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
return false;
|
|
318
|
+
});
|
|
283
319
|
// Check for "プロンプトを送信" button - this indicates response is complete
|
|
284
320
|
// Must be enabled (not disabled) to indicate completion
|
|
285
321
|
const sendButton = buttons.find(b => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.18.
|
|
3
|
+
"version": "0.18.7",
|
|
4
4
|
"description": "MCP server for Chrome extension development with Web Store automation. Fork of chrome-devtools-mcp with extension-specific tools.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": "./scripts/cli.mjs",
|