Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions extension/dist/background.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const WS_RECONNECT_MAX_DELAY = 6e4;

const attached = /* @__PURE__ */ new Set();
function isDebuggableUrl$1(url) {
if (!url) return false;
if (!url) return true;
return !url.startsWith("chrome://") && !url.startsWith("chrome-extension://");
}
async function ensureAttached(tabId) {
Expand Down Expand Up @@ -242,6 +242,7 @@ async function getAutomationWindow(workspace) {
automationSessions.set(workspace, session);
console.log(`[opencli] Created automation window ${session.windowId} (${workspace})`);
resetWindowIdleTimer(workspace);
await new Promise((resolve) => setTimeout(resolve, 200));
return session.windowId;
}
chrome.windows.onRemoved.addListener((windowId) => {
Expand Down Expand Up @@ -302,7 +303,7 @@ async function handleCommand(cmd) {
}
}
function isDebuggableUrl(url) {
if (!url) return false;
if (!url) return true;
return !url.startsWith("chrome://") && !url.startsWith("chrome-extension://");
}
async function resolveTabId(tabId, workspace) {
Expand Down
2 changes: 1 addition & 1 deletion extension/manifest.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"manifest_version": 3,
"name": "OpenCLI",
"version": "1.2.4",
"version": "1.2.5",
"description": "Bridge between opencli CLI and your browser — execute commands, read cookies, manage tabs.",
"permissions": [
"debugger",
Expand Down
2 changes: 1 addition & 1 deletion extension/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "opencli-extension",
"version": "1.2.4",
"version": "1.2.5",
"private": true,
"type": "module",
"scripts": {
Expand Down
4 changes: 3 additions & 1 deletion extension/src/background.ts
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,8 @@ async function getAutomationWindow(workspace: string): Promise<number> {
automationSessions.set(workspace, session);
console.log(`[opencli] Created automation window ${session.windowId} (${workspace})`);
resetWindowIdleTimer(workspace);
// Brief delay to let Chrome load the initial data: URI tab
await new Promise(resolve => setTimeout(resolve, 200));
return session.windowId;
}

Expand Down Expand Up @@ -229,7 +231,7 @@ async function handleCommand(cmd: Command): Promise<Result> {

/** Check if a URL can be attached via CDP (not chrome:// or chrome-extension://) */
function isDebuggableUrl(url?: string): boolean {
if (!url) return false;
if (!url) return true; // empty/undefined = tab still loading, allow it
return !url.startsWith('chrome://') && !url.startsWith('chrome-extension://');
}

Expand Down
2 changes: 1 addition & 1 deletion extension/src/cdp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const attached = new Set<number>();

/** Check if a URL can be attached via CDP */
function isDebuggableUrl(url?: string): boolean {
if (!url) return false;
if (!url) return true; // empty/undefined = tab still loading, allow it
return !url.startsWith('chrome://') && !url.startsWith('chrome-extension://');
}

Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@jackwener/opencli",
"version": "1.2.4",
"version": "1.2.5",
"publishConfig": {
"access": "public"
},
Expand Down
Loading