btcp-browser-agent 0.1.3 → 0.1.4

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "btcp-browser-agent",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Give AI agents the power to control browsers. A foundation for building agentic systems with smart DOM snapshots and stable element references.",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -136,9 +136,8 @@ export class SessionManager {
136
136
  }
137
137
  }
138
138
  console.log('[SessionManager] Creating group with tabs:', targetTabIds);
139
- // Get the window for the tab (must be a normal window)
140
- const tabs = await chrome.tabs.query({ windowId: chrome.windows.WINDOW_ID_CURRENT });
141
- const targetTab = tabs.find(t => targetTabIds.includes(t.id));
139
+ // Get the tab details to find its window
140
+ const targetTab = await chrome.tabs.get(targetTabIds[0]);
142
141
  if (!targetTab || !targetTab.windowId) {
143
142
  console.error('[SessionManager] Could not find valid window for tab');
144
143
  throw new Error('Could not find a normal window for the tab');