chrome-devtools-mcp-for-extension 0.9.26 → 0.9.27
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.
|
@@ -218,7 +218,25 @@ async function detectDeepResearchMode(page) {
|
|
|
218
218
|
async function enableDeepResearchMode(page, response) {
|
|
219
219
|
try {
|
|
220
220
|
response.appendResponseLine('DeepResearchモードを有効化中...');
|
|
221
|
-
// Step 1: Click
|
|
221
|
+
// Step 1: Click じっくり思考 button with haspopup="menu"
|
|
222
|
+
const thinkingMenuClicked = await page.evaluate(() => {
|
|
223
|
+
const buttons = Array.from(document.querySelectorAll('button'));
|
|
224
|
+
const thinkingMenuButton = buttons.find((btn) => {
|
|
225
|
+
const text = btn.textContent?.trim() || '';
|
|
226
|
+
return text.includes('じっくり思考') && btn.getAttribute('haspopup') === 'menu';
|
|
227
|
+
});
|
|
228
|
+
if (!thinkingMenuButton) {
|
|
229
|
+
return { success: false, error: 'じっくり思考メニューボタンが見つかりません' };
|
|
230
|
+
}
|
|
231
|
+
thinkingMenuButton.click();
|
|
232
|
+
return { success: true };
|
|
233
|
+
});
|
|
234
|
+
if (!thinkingMenuClicked.success) {
|
|
235
|
+
return { success: false, error: thinkingMenuClicked.error };
|
|
236
|
+
}
|
|
237
|
+
response.appendResponseLine('✅ じっくり思考メニューを開く');
|
|
238
|
+
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
239
|
+
// Step 2: Click "+" button (ファイルの追加など)
|
|
222
240
|
const plusClicked = await page.evaluate(() => {
|
|
223
241
|
const buttons = Array.from(document.querySelectorAll('button'));
|
|
224
242
|
const plusButton = buttons.find((btn) => {
|
|
@@ -233,8 +251,9 @@ async function enableDeepResearchMode(page, response) {
|
|
|
233
251
|
if (!plusClicked.success) {
|
|
234
252
|
return { success: false, error: plusClicked.error };
|
|
235
253
|
}
|
|
254
|
+
response.appendResponseLine('✅ +ボタン(ファイルの追加など)をクリック');
|
|
236
255
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
237
|
-
// Step
|
|
256
|
+
// Step 3: Click "Deep Research" menuitemradio
|
|
238
257
|
const deepResearchSelected = await page.evaluate(() => {
|
|
239
258
|
const menuItems = Array.from(document.querySelectorAll('[role="menuitemradio"]'));
|
|
240
259
|
const deepResearchItem = menuItems.find((item) => item.textContent?.includes('Deep Research') ||
|
|
@@ -562,7 +581,7 @@ export const deepResearchChatGPT = defineTool({
|
|
|
562
581
|
}
|
|
563
582
|
}
|
|
564
583
|
if (needsNewChat) {
|
|
565
|
-
await page.goto('https://chatgpt.com
|
|
584
|
+
await page.goto('https://chatgpt.com/?model=gpt-5-thinking', { waitUntil: 'networkidle2' });
|
|
566
585
|
}
|
|
567
586
|
// Check if logged in
|
|
568
587
|
const currentUrl = page.url();
|
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.27",
|
|
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",
|