chrome-devtools-mcp-for-extension 0.18.8 → 0.18.9
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.
- package/build/src/tools/gemini-web.js +11 -19
- package/package.json +1 -1
|
@@ -275,27 +275,19 @@ export const askGeminiWeb = defineTool({
|
|
|
275
275
|
while (true) {
|
|
276
276
|
await new Promise((resolve) => setTimeout(resolve, 1500));
|
|
277
277
|
const status = await page.evaluate(() => {
|
|
278
|
-
// Check for generating
|
|
278
|
+
// Check for stop icon (Gemini's thinking/generating indicator)
|
|
279
|
+
// The stop icon is in a div.stop-icon with mat-icon[fonticon="stop"]
|
|
280
|
+
const stopIcon = document.querySelector('.stop-icon mat-icon[fonticon="stop"]') ||
|
|
281
|
+
document.querySelector('mat-icon[data-mat-icon-name="stop"]') ||
|
|
282
|
+
document.querySelector('.blue-circle.stop-icon');
|
|
283
|
+
const hasStopIcon = !!stopIcon;
|
|
284
|
+
// Also check for stop button (fallback)
|
|
279
285
|
const buttons = Array.from(document.querySelectorAll('button'));
|
|
280
286
|
const stopButton = buttons.find(b => {
|
|
281
|
-
// Text-based detection
|
|
282
287
|
const text = b.textContent || '';
|
|
283
288
|
const ariaLabel = b.getAttribute('aria-label') || '';
|
|
284
|
-
|
|
285
|
-
ariaLabel.includes('Stop') || ariaLabel.includes('停止')
|
|
286
|
-
ariaLabel.includes('中止') || ariaLabel.includes('Cancel')) {
|
|
287
|
-
return true;
|
|
288
|
-
}
|
|
289
|
-
// Icon-based detection: mat-icon with fonticon="stop" or data-mat-icon-name="stop"
|
|
290
|
-
const matIcon = b.querySelector('mat-icon');
|
|
291
|
-
if (matIcon) {
|
|
292
|
-
const fonticon = matIcon.getAttribute('fonticon');
|
|
293
|
-
const iconName = matIcon.getAttribute('data-mat-icon-name');
|
|
294
|
-
if (fonticon === 'stop' || iconName === 'stop') {
|
|
295
|
-
return true;
|
|
296
|
-
}
|
|
297
|
-
}
|
|
298
|
-
return false;
|
|
289
|
+
return text.includes('回答を停止') || text.includes('Stop') ||
|
|
290
|
+
ariaLabel.includes('Stop') || ariaLabel.includes('停止');
|
|
299
291
|
});
|
|
300
292
|
// Check for "プロンプトを送信" button - this indicates response is complete
|
|
301
293
|
// Must be enabled (not disabled) to indicate completion
|
|
@@ -324,8 +316,8 @@ export const askGeminiWeb = defineTool({
|
|
|
324
316
|
document.querySelector('[aria-busy="true"]') !== null;
|
|
325
317
|
const isComplete = (bodyText.includes('Gemini が回答しました') ||
|
|
326
318
|
bodyText.includes('Gemini has responded') ||
|
|
327
|
-
!!sendButton) && !isThinking && !hasSpinner;
|
|
328
|
-
const isGenerating = !!stopButton || isTyping || isThinking || hasSpinner;
|
|
319
|
+
!!sendButton) && !isThinking && !hasSpinner && !hasStopIcon;
|
|
320
|
+
const isGenerating = hasStopIcon || !!stopButton || isTyping || isThinking || hasSpinner;
|
|
329
321
|
// Get the response content from model-response elements
|
|
330
322
|
const modelResponses = Array.from(document.querySelectorAll('model-response'));
|
|
331
323
|
let responseContent = '';
|
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.9",
|
|
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",
|