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.
@@ -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 composer-pill button)
284
- const verified = await page.evaluate(() => {
285
- const DEEP_RESEARCH_PATTERN = /リサーチ|deep\s*research|ディープ\s*リサーチ|深度研究|深入研究/i;
286
- const promptTextarea = document.querySelector('#prompt-textarea');
287
- if (promptTextarea) {
288
- const form = promptTextarea.closest('form');
289
- if (form) {
290
- const pillButton = Array.from(form.querySelectorAll('button')).find((btn) => {
291
- const text = btn.textContent?.trim() || '';
292
- const ariaLabel = btn.getAttribute('aria-label') || '';
293
- return (btn.className.includes('composer-pill') &&
294
- DEEP_RESEARCH_PATTERN.test(text + ' ' + ariaLabel));
295
- });
296
- return !!pillButton;
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 (verified) {
302
- response.appendResponseLine('✅ モード確認完了: DeepResearch有効(composer-pill検出)');
299
+ if (verification.hasCorrectPlaceholder || verification.hasDeleteButton) {
300
+ response.appendResponseLine('✅ モード確認完了: DeepResearch有効');
303
301
  }
304
302
  else {
305
- response.appendResponseLine('⚠️ DeepResearchモードの確認に失敗しました');
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
- const DEEP_RESEARCH_PATTERN = /リサーチ|deep\s*research|ディープ\s*リサーチ|深度研究|深入研究/i;
317
- const promptTextarea = document.querySelector('#prompt-textarea');
318
- if (promptTextarea) {
319
- const form = promptTextarea.closest('form');
320
- if (form) {
321
- const pillButton = Array.from(form.querySelectorAll('button')).find((btn) => {
322
- const text = btn.textContent?.trim() || '';
323
- const ariaLabel = btn.getAttribute('aria-label') || '';
324
- return (btn.className.includes('composer-pill') &&
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('❌ エラー: DeepResearchモードが無効です(composer-pill未検出)。送信を中止します。');
324
+ if (!finalCheck.isEnabled) {
325
+ response.appendResponseLine(`❌ エラー: DeepResearchモードが無効です。送信を中止します。(placeholder: ${finalCheck.placeholder})`);
334
326
  return;
335
327
  }
336
- response.appendResponseLine('✅ 送信前確認: DeepResearchモード有効(composer-pill検出)');
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.0",
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",