chrome-devtools-mcp-for-extension 0.9.31 → 0.9.32

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.
@@ -234,28 +234,24 @@ async function enableDeepResearchMode(page, response) {
234
234
  return { success: false, error: plusClicked.error };
235
235
  }
236
236
  response.appendResponseLine('✅ +ボタン(ファイルの追加など)をクリック');
237
- // Wait for menu to appear
238
- await page.waitForSelector('[role="menuitemradio"]', { timeout: 5000 });
237
+ // Wait for menu to appear (pierce shadow DOM)
238
+ await page.waitForSelector('pierce/[role="menuitemradio"]', { visible: true, timeout: 5000 });
239
239
  await new Promise((resolve) => setTimeout(resolve, 500));
240
- // Step 2: Click "Deep Research" menuitemradio
241
- const deepResearchSelected = await page.evaluate(() => {
242
- const menuItems = Array.from(document.querySelectorAll('[role="menuitemradio"]'));
243
- // デバッグ: 見つかったmenuitemradioを全て列挙
244
- const debugInfo = menuItems.map(item => item.textContent?.trim()).join(', ');
245
- const deepResearchItem = menuItems.find((item) => item.textContent?.includes('Deep Research') ||
246
- item.textContent?.includes('リサーチ'));
247
- if (!deepResearchItem) {
248
- return {
249
- success: false,
250
- error: `DeepResearch menuitemradio が見つかりません (found: ${menuItems.length} items: ${debugInfo})`,
251
- };
252
- }
253
- deepResearchItem.click();
254
- return { success: true };
255
- });
256
- if (!deepResearchSelected.success) {
257
- return { success: false, error: deepResearchSelected.error };
240
+ // Step 2: Click "Deep Research" menuitemradio (pierce shadow DOM)
241
+ const menuItems = await page.$$eval('pierce/[role="menuitemradio"]', (els) => els.map((el) => ({
242
+ text: el.innerText.trim(),
243
+ index: els.indexOf(el),
244
+ })));
245
+ const deepResearchIndex = menuItems.findIndex((item) => item.text.includes('Deep Research') || item.text.includes('リサーチ'));
246
+ if (deepResearchIndex === -1) {
247
+ return {
248
+ success: false,
249
+ error: `DeepResearch menuitemradio が見つかりません (found: ${menuItems.length} items: ${menuItems.map((m) => m.text).join(', ')})`,
250
+ };
258
251
  }
252
+ // Click the found menuitemradio
253
+ const menuItemElements = await page.$$('pierce/[role="menuitemradio"]');
254
+ await menuItemElements[deepResearchIndex].click();
259
255
  response.appendResponseLine('✅ DeepResearch menuitemradio をクリック');
260
256
  await new Promise((resolve) => setTimeout(resolve, 1000));
261
257
  // Step 3: Verify mode was actually enabled (composer-pill detection)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-devtools-mcp-for-extension",
3
- "version": "0.9.31",
3
+ "version": "0.9.32",
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": "./build/src/index.js",