@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.
- package/package.json +1 -1
- package/server/index.js +6 -5
package/package.json
CHANGED
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.
|
|
578
|
+
const ADAPTER_VERSION = '1.0.3';
|
|
579
579
|
|
|
580
|
-
// v1.0.
|
|
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
|
|
609
|
-
if (!
|
|
610
|
-
const c =
|
|
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
|
};
|