chrome-devtools-mcp-for-extension 0.9.34 → 0.9.35
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,25 +234,35 @@ 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('
|
|
237
|
+
// Wait for menu to appear
|
|
238
|
+
await page.waitForSelector('[role="menuitemradio"]', { visible: true, timeout: 5000 });
|
|
239
239
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
240
|
-
// Step 2:
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
240
|
+
// Step 2: Find and click "Deep Research" menuitemradio
|
|
241
|
+
const deepResearchResult = await page.evaluate(() => {
|
|
242
|
+
const menuItems = Array.from(document.querySelectorAll('[role="menuitemradio"]'));
|
|
243
|
+
const deepResearchItem = menuItems.find((item) => item.textContent?.includes('Deep Research') || item.textContent?.includes('リサーチ'));
|
|
244
|
+
if (!deepResearchItem) {
|
|
245
|
+
return {
|
|
246
|
+
success: false,
|
|
247
|
+
error: `DeepResearch menuitemradio が見つかりません (found: ${menuItems.length} items: ${menuItems.map(m => m.textContent?.trim()).join(', ')})`,
|
|
248
|
+
};
|
|
249
|
+
}
|
|
250
|
+
// Check if already checked
|
|
251
|
+
const isChecked = deepResearchItem.getAttribute('aria-checked') === 'true';
|
|
252
|
+
if (!isChecked) {
|
|
253
|
+
deepResearchItem.click();
|
|
254
|
+
}
|
|
255
|
+
return { success: true, alreadyEnabled: isChecked };
|
|
256
|
+
});
|
|
257
|
+
if (!deepResearchResult.success) {
|
|
258
|
+
return { success: false, error: deepResearchResult.error };
|
|
259
|
+
}
|
|
260
|
+
if (deepResearchResult.alreadyEnabled) {
|
|
261
|
+
response.appendResponseLine('✅ DeepResearch は既に有効です');
|
|
262
|
+
}
|
|
263
|
+
else {
|
|
264
|
+
response.appendResponseLine('✅ DeepResearch menuitemradio をクリック');
|
|
251
265
|
}
|
|
252
|
-
// Click the found menuitemradio
|
|
253
|
-
const menuItemElements = await page.$$(':scope >>> [role="menuitemradio"]');
|
|
254
|
-
await menuItemElements[deepResearchIndex].click();
|
|
255
|
-
response.appendResponseLine('✅ DeepResearch menuitemradio をクリック');
|
|
256
266
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
257
267
|
// Step 3: Verify mode was actually enabled (composer-pill detection)
|
|
258
268
|
const verification = await detectDeepResearchMode(page);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.9.
|
|
3
|
+
"version": "0.9.35",
|
|
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",
|