chrome-devtools-mcp-for-extension 0.9.16 → 0.9.18

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.
@@ -157,8 +157,10 @@ export const askChatGPTWeb = defineTool({
157
157
  }
158
158
  }
159
159
  // Step 3: Create new chat if needed
160
+ let isNewChat = false;
160
161
  if (createNewChat || page.url() === 'https://chatgpt.com/') {
161
162
  response.appendResponseLine('新規チャットを作成中...');
163
+ isNewChat = true;
162
164
  // Click "新しいチャット"
163
165
  await page.evaluate(() => {
164
166
  const newChatLink = document.querySelector('a[href="/"]');
@@ -268,7 +270,7 @@ export const askChatGPTWeb = defineTool({
268
270
  response.appendResponseLine(`🤔 思考時間: ${status.thinkingTime}秒`);
269
271
  }
270
272
  // Rename chat if it's a new chat
271
- if (createNewChat || !page.url().includes('/c/')) {
273
+ if (isNewChat) {
272
274
  response.appendResponseLine('チャット名を変更中...');
273
275
  // Wait for chat to be created
274
276
  await new Promise((resolve) => setTimeout(resolve, 2000));
@@ -303,11 +305,24 @@ export const askChatGPTWeb = defineTool({
303
305
  if (textbox) {
304
306
  textbox.value = `[Project: ${projectName}]`;
305
307
  textbox.dispatchEvent(new Event('input', { bubbles: true }));
308
+ // Press Enter to confirm
309
+ textbox.dispatchEvent(new KeyboardEvent('keydown', {
310
+ key: 'Enter',
311
+ code: 'Enter',
312
+ keyCode: 13,
313
+ bubbles: true,
314
+ }));
306
315
  textbox.blur();
307
316
  }
308
317
  }, project);
309
318
  await new Promise((resolve) => setTimeout(resolve, 500));
310
319
  response.appendResponseLine(`✅ チャット名を「[Project: ${project}]」に変更`);
320
+ // Close the menu popup by clicking outside
321
+ await page.evaluate(() => {
322
+ const body = document.body;
323
+ body.click();
324
+ });
325
+ await new Promise((resolve) => setTimeout(resolve, 300));
311
326
  }
312
327
  }
313
328
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-devtools-mcp-for-extension",
3
- "version": "0.9.16",
3
+ "version": "0.9.18",
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",