chrome-devtools-mcp-for-extension 0.9.16 → 0.9.17
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 (
|
|
273
|
+
if (isNewChat) {
|
|
272
274
|
response.appendResponseLine('チャット名を変更中...');
|
|
273
275
|
// Wait for chat to be created
|
|
274
276
|
await new Promise((resolve) => setTimeout(resolve, 2000));
|
|
@@ -308,6 +310,12 @@ export const askChatGPTWeb = defineTool({
|
|
|
308
310
|
}, project);
|
|
309
311
|
await new Promise((resolve) => setTimeout(resolve, 500));
|
|
310
312
|
response.appendResponseLine(`✅ チャット名を「[Project: ${project}]」に変更`);
|
|
313
|
+
// Close the menu popup by clicking outside
|
|
314
|
+
await page.evaluate(() => {
|
|
315
|
+
const body = document.body;
|
|
316
|
+
body.click();
|
|
317
|
+
});
|
|
318
|
+
await new Promise((resolve) => setTimeout(resolve, 300));
|
|
311
319
|
}
|
|
312
320
|
}
|
|
313
321
|
}
|
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.17",
|
|
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",
|