chrome-devtools-mcp-for-extension 0.11.0 → 0.11.1
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/chatgpt-web.js +30 -38
- package/package.json +1 -1
|
@@ -280,29 +280,27 @@ export const askChatGPTWeb = defineTool({
|
|
|
280
280
|
if (deepResearchEnabled) {
|
|
281
281
|
response.appendResponseLine('✅ DeepResearchモード有効化完了');
|
|
282
282
|
await new Promise((resolve) => setTimeout(resolve, 1000));
|
|
283
|
-
// Verify mode was actually enabled (check for
|
|
284
|
-
const
|
|
285
|
-
|
|
286
|
-
const
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
return false;
|
|
283
|
+
// Verify mode was actually enabled (check for new UI indicators)
|
|
284
|
+
const verification = await page.evaluate(() => {
|
|
285
|
+
// Check placeholder text
|
|
286
|
+
const textarea = document.querySelector('textarea');
|
|
287
|
+
const placeholder = textarea?.getAttribute('placeholder') || '';
|
|
288
|
+
// Check for delete button
|
|
289
|
+
const deleteButton = Array.from(document.querySelectorAll('button')).find(btn => btn.textContent?.includes('リサーチ:クリックして削除'));
|
|
290
|
+
// Check for sources button
|
|
291
|
+
const sourcesButton = Array.from(document.querySelectorAll('button')).find(btn => btn.textContent?.includes('情報源'));
|
|
292
|
+
return {
|
|
293
|
+
hasCorrectPlaceholder: placeholder.includes('詳細なレポート') || placeholder.includes('リサーチ'),
|
|
294
|
+
hasDeleteButton: !!deleteButton,
|
|
295
|
+
hasSourcesButton: !!sourcesButton,
|
|
296
|
+
placeholder: placeholder
|
|
297
|
+
};
|
|
300
298
|
});
|
|
301
|
-
if (
|
|
302
|
-
response.appendResponseLine('✅ モード確認完了: DeepResearch
|
|
299
|
+
if (verification.hasCorrectPlaceholder || verification.hasDeleteButton) {
|
|
300
|
+
response.appendResponseLine('✅ モード確認完了: DeepResearch有効');
|
|
303
301
|
}
|
|
304
302
|
else {
|
|
305
|
-
response.appendResponseLine(
|
|
303
|
+
response.appendResponseLine(`⚠️ DeepResearchモードの確認に失敗しました(placeholder: ${verification.placeholder})`);
|
|
306
304
|
}
|
|
307
305
|
}
|
|
308
306
|
else {
|
|
@@ -313,27 +311,21 @@ export const askChatGPTWeb = defineTool({
|
|
|
313
311
|
// Step 4: Send question (with final mode verification)
|
|
314
312
|
if (useDeepResearch) {
|
|
315
313
|
const finalCheck = await page.evaluate(() => {
|
|
316
|
-
|
|
317
|
-
const
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
DEEP_RESEARCH_PATTERN.test(text + ' ' + ariaLabel));
|
|
326
|
-
});
|
|
327
|
-
return !!pillButton;
|
|
328
|
-
}
|
|
329
|
-
}
|
|
330
|
-
return false;
|
|
314
|
+
// Check placeholder text
|
|
315
|
+
const textarea = document.querySelector('textarea');
|
|
316
|
+
const placeholder = textarea?.getAttribute('placeholder') || '';
|
|
317
|
+
// Check for delete button
|
|
318
|
+
const deleteButton = Array.from(document.querySelectorAll('button')).find(btn => btn.textContent?.includes('リサーチ:クリックして削除'));
|
|
319
|
+
return {
|
|
320
|
+
isEnabled: placeholder.includes('詳細なレポート') || placeholder.includes('リサーチ') || !!deleteButton,
|
|
321
|
+
placeholder: placeholder
|
|
322
|
+
};
|
|
331
323
|
});
|
|
332
|
-
if (!finalCheck) {
|
|
333
|
-
response.appendResponseLine(
|
|
324
|
+
if (!finalCheck.isEnabled) {
|
|
325
|
+
response.appendResponseLine(`❌ エラー: DeepResearchモードが無効です。送信を中止します。(placeholder: ${finalCheck.placeholder})`);
|
|
334
326
|
return;
|
|
335
327
|
}
|
|
336
|
-
response.appendResponseLine('✅ 送信前確認: DeepResearch
|
|
328
|
+
response.appendResponseLine('✅ 送信前確認: DeepResearchモード有効');
|
|
337
329
|
}
|
|
338
330
|
response.appendResponseLine('質問を送信中...');
|
|
339
331
|
const questionSent = await page.evaluate((questionText) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "chrome-devtools-mcp-for-extension",
|
|
3
|
-
"version": "0.11.
|
|
3
|
+
"version": "0.11.1",
|
|
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",
|