chrome-devtools-mcp-for-extension 0.10.1 β†’ 0.10.2

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.
@@ -24,7 +24,7 @@ function getDefaultBookmarks() {
24
24
  'localhost': 'http://localhost:3000',
25
25
  'localhost8080': 'http://localhost:8080',
26
26
  'suno': 'https://suno.com/create',
27
- 'chatgpt': 'https://chatgpt.com'
27
+ 'chatgpt': 'https://chatgpt.com/?model=gpt-5-thinking'
28
28
  };
29
29
  }
30
30
  /**
@@ -113,18 +113,31 @@ async function saveConversationLog(projectName, question, response, metadata) {
113
113
  .replace(/[^a-z0-9\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf]+/gi, '-')
114
114
  .toLowerCase()
115
115
  .slice(0, 30);
116
- const filename = `${timestamp}-${projectName}-${topicSlug}.md`;
117
- const logDir = 'docs/ask/chatgpt';
118
- const logPath = path.join(process.cwd(), logDir, filename);
119
- // Ensure directory exists
120
- await fs.promises.mkdir(path.dirname(logPath), { recursive: true });
116
+ // If chatId is provided, save in chat-specific folder
117
+ let logPath;
118
+ if (metadata.chatId) {
119
+ const conversationNum = String(metadata.conversationNumber || 1).padStart(3, '0');
120
+ const filename = `${conversationNum}-${timestamp}-${topicSlug}.md`;
121
+ const logDir = path.join('docs/ask/chatgpt', metadata.chatId);
122
+ logPath = path.join(process.cwd(), logDir, filename);
123
+ // Ensure chat directory exists
124
+ await fs.promises.mkdir(path.join(process.cwd(), logDir), { recursive: true });
125
+ }
126
+ else {
127
+ // Fallback to old format (flat structure)
128
+ const filename = `${timestamp}-${projectName}-${topicSlug}.md`;
129
+ const logDir = 'docs/ask/chatgpt';
130
+ logPath = path.join(process.cwd(), logDir, filename);
131
+ // Ensure directory exists
132
+ await fs.promises.mkdir(path.dirname(logPath), { recursive: true });
133
+ }
121
134
  const content = `# ${topicSlug}
122
135
 
123
136
  ## πŸ“… パタ情報
124
137
  - **ζ—₯ζ™‚**: ${now.toLocaleString('ja-JP')}
125
138
  - **γƒ—γƒ­γ‚Έγ‚§γ‚―γƒˆ**: ${projectName}
126
139
  - **AIヒデル**: ${metadata.model || 'ChatGPT'}
127
- ${metadata.thinkingTime ? `- **思考時間**: ${metadata.thinkingTime}s\n` : ''}${metadata.chatUrl ? `- **γƒγƒ£γƒƒγƒˆURL**: ${metadata.chatUrl}\n` : ''}
140
+ ${metadata.chatId ? `- **γƒγƒ£γƒƒγƒˆID**: ${metadata.chatId}\n` : ''}${metadata.conversationNumber ? `- **会話η•ͺ号**: ${metadata.conversationNumber}\n` : ''}${metadata.thinkingTime ? `- **思考時間**: ${metadata.thinkingTime}s\n` : ''}${metadata.chatUrl ? `- **γƒγƒ£γƒƒγƒˆURL**: ${metadata.chatUrl}\n` : ''}
128
141
  ## ❓ θ³ͺ問
129
142
 
130
143
  ${question}
@@ -172,7 +185,7 @@ export const askChatGPTWeb = defineTool({
172
185
  try {
173
186
  // Step 1: Navigate to ChatGPT
174
187
  response.appendResponseLine('ChatGPTにζŽ₯碚中...');
175
- await page.goto('https://chatgpt.com/', { waitUntil: 'networkidle2' });
188
+ await page.goto('https://chatgpt.com/?model=gpt-5-thinking', { waitUntil: 'networkidle2' });
176
189
  // Check if logged in
177
190
  const currentUrl = page.url();
178
191
  if (currentUrl.includes('auth') || currentUrl.includes('login')) {
@@ -498,10 +511,17 @@ export const askChatGPTWeb = defineTool({
498
511
  const modelName = useDeepResearch
499
512
  ? 'ChatGPT DeepResearch'
500
513
  : 'ChatGPT 5 Thinking';
514
+ // Get current conversation count
515
+ const sessions = await loadChatSessions();
516
+ const projectSessions = sessions[project] || [];
517
+ const currentSession = projectSessions.find(s => s.chatId === sessionChatId);
518
+ const conversationNum = currentSession?.conversationCount || 1;
501
519
  const logPath = await saveConversationLog(project, sanitizedQuestion, status.text || '', {
502
520
  thinkingTime: status.thinkingTime,
503
521
  chatUrl,
504
522
  model: modelName,
523
+ chatId: sessionChatId,
524
+ conversationNumber: conversationNum,
505
525
  });
506
526
  response.appendResponseLine(`πŸ“ δΌšθ©±γƒ­γ‚°δΏε­˜: ${logPath}`);
507
527
  response.appendResponseLine(`πŸ”— γƒγƒ£γƒƒγƒˆURL: ${chatUrl}`);
@@ -110,17 +110,29 @@ async function saveConversationLog(projectName, question, response, metadata) {
110
110
  .replace(/[^a-z0-9\u3040-\u309f\u30a0-\u30ff\u4e00-\u9faf]+/gi, '-')
111
111
  .toLowerCase()
112
112
  .slice(0, 30);
113
- const filename = `${timestamp}-${projectName}-deepresearch-${topicSlug}.md`;
114
- const logDir = 'docs/ask/chatgpt';
115
- const logPath = path.join(process.cwd(), logDir, filename);
116
- await fs.promises.mkdir(path.dirname(logPath), { recursive: true });
113
+ // If chatId is provided, save in chat-specific folder
114
+ let logPath;
115
+ if (metadata.chatId) {
116
+ const conversationNum = String(metadata.conversationNumber || 1).padStart(3, '0');
117
+ const filename = `${conversationNum}-${timestamp}-deepresearch-${topicSlug}.md`;
118
+ const logDir = path.join('docs/ask/chatgpt', metadata.chatId);
119
+ logPath = path.join(process.cwd(), logDir, filename);
120
+ await fs.promises.mkdir(path.join(process.cwd(), logDir), { recursive: true });
121
+ }
122
+ else {
123
+ // Fallback to old format
124
+ const filename = `${timestamp}-${projectName}-deepresearch-${topicSlug}.md`;
125
+ const logDir = 'docs/ask/chatgpt';
126
+ logPath = path.join(process.cwd(), logDir, filename);
127
+ await fs.promises.mkdir(path.dirname(logPath), { recursive: true });
128
+ }
117
129
  const content = `# ${topicSlug}
118
130
 
119
131
  ## πŸ“… パタ情報
120
132
  - **ζ—₯ζ™‚**: ${now.toLocaleString('ja-JP')}
121
133
  - **γƒ—γƒ­γ‚Έγ‚§γ‚―γƒˆ**: ${projectName}
122
134
  - **AIヒデル**: ${metadata.model || 'ChatGPT DeepResearch'}
123
- ${metadata.researchTime ? `- **γƒͺァーチ時間**: ${metadata.researchTime}η§’\n` : ''}${metadata.chatUrl ? `- **γƒγƒ£γƒƒγƒˆURL**: ${metadata.chatUrl}\n` : ''}
135
+ ${metadata.chatId ? `- **γƒγƒ£γƒƒγƒˆID**: ${metadata.chatId}\n` : ''}${metadata.conversationNumber ? `- **会話η•ͺ号**: ${metadata.conversationNumber}\n` : ''}${metadata.researchTime ? `- **γƒͺァーチ時間**: ${metadata.researchTime}η§’\n` : ''}${metadata.chatUrl ? `- **γƒγƒ£γƒƒγƒˆURL**: ${metadata.chatUrl}\n` : ''}
124
136
  ## ❓ γƒͺγ‚΅γƒΌγƒγƒ†γƒΌγƒž
125
137
 
126
138
  ${question}
@@ -670,8 +682,10 @@ export const deepResearchChatGPT = defineTool({
670
682
  // Phase 8: Save results
671
683
  const chatUrl = page.url();
672
684
  const chatIdMatch = chatUrl.match(/\/c\/([a-f0-9-]+)/);
685
+ let savedChatId;
673
686
  if (chatIdMatch) {
674
687
  const chatId = chatIdMatch[1];
688
+ savedChatId = chatId;
675
689
  const now = new Date().toISOString();
676
690
  await saveChatSession(project, {
677
691
  chatId,
@@ -688,6 +702,8 @@ export const deepResearchChatGPT = defineTool({
688
702
  researchTime: Math.floor((Date.now() - startTime) / 1000),
689
703
  chatUrl,
690
704
  model: 'ChatGPT DeepResearch',
705
+ chatId: savedChatId,
706
+ conversationNumber: 1,
691
707
  });
692
708
  response.appendResponseLine(`πŸ“ γƒͺγ‚΅γƒΌγƒγƒ­γ‚°δΏε­˜: ${logPath}`);
693
709
  response.appendResponseLine(`πŸ”— γƒγƒ£γƒƒγƒˆURL: ${chatUrl}`);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "chrome-devtools-mcp-for-extension",
3
- "version": "0.10.1",
3
+ "version": "0.10.2",
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",