@kelceyp/chrome-control-mcp 0.4.0 → 0.4.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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/server/index.js +6 -5
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kelceyp/chrome-control-mcp",
3
- "version": "0.4.0",
3
+ "version": "0.4.1",
4
4
  "description": "MCP server for controlling Google Chrome on macOS via AppleScript with async JavaScript support",
5
5
  "main": "server/index.js",
6
6
  "type": "module",
package/server/index.js CHANGED
@@ -575,9 +575,10 @@ class ChromeControlServer {
575
575
  return { content: [{ type: 'text', text: 'Error: message (string) is required' }] };
576
576
  }
577
577
 
578
- const ADAPTER_VERSION = '1.0.2';
578
+ const ADAPTER_VERSION = '1.0.3';
579
579
 
580
- // v1.0.2: Hybrid completion detection (text-length polling + button confirmation)
580
+ // v1.0.3: Hybrid completion detection (text-length polling + button confirmation)
581
+ // v1.0.3 fix: pickText uses turn container to handle sibling content layouts
581
582
  const ADAPTER_JS = `
582
583
  (() => {
583
584
  if (window.ChatBridge && window.ChatBridge.version === '${ADAPTER_VERSION}') return;
@@ -605,9 +606,9 @@ class ChromeControlServer {
605
606
  qAll('[data-message-author-role="assistant"],[data-author-role="assistant"]').at(-1) || null;
606
607
 
607
608
  const pickText = (node) => {
608
- const n = node || lastAssistantNode();
609
- if (!n) return '';
610
- const c = n.querySelector('.markdown, article') || n;
609
+ const turn = lastAssistantTurn();
610
+ if (!turn) return '';
611
+ const c = turn.querySelector('.markdown, article, [data-testid*="content"], [data-message-content]') || turn;
611
612
  const t = c.innerText ?? c.textContent ?? '';
612
613
  return (t || '').trim();
613
614
  };