Big News: Socket raises $60M Series C at a $1B valuation to secure software supply chains for AI-driven development.Announcement
Sign In

vg-coder-cli

Package Overview
Dependencies
Maintainers
1
Versions
106
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vg-coder-cli - npm Package Compare versions

Comparing version
2.0.89
to
2.0.90
+1
-1
package.json
{
"name": "vg-coder-cli",
"version": "2.0.89",
"version": "2.0.90",
"description": "🚀 CLI tool to analyze projects, concatenate source files, count tokens, and export HTML with syntax highlighting and copy functionality",

@@ -5,0 +5,0 @@ "main": "src/index.js",

@@ -227,35 +227,16 @@ // Task Worker — runs inside the AI Studio page (shadow-DOM bundled).

// Bring this tab to the foreground + focus its window before copying.
// Concurrent profiles share the macOS WindowServer; whoever called
// tabs.create({active:true}) most recently owns OS focus. CDP
// Input.dispatchMouseEvent on a tab whose document.visibilityState is
// "hidden" silently drops the click — the Material menu opens (More
// click is a real DOM click via JS), but the second click on
// "Copy as markdown" via CDP lands in a non-rendered viewport and
// never triggers the handler.
//
// Fix: ask the launcher to activate this tab, then POLL
// visibilityState until it actually flips to "visible" — the ack of
// worker:activate-tab is delivered as soon as chrome.windows.update
// returns, but the OS focus change is asynchronous (~50-300ms).
try {
await new Promise((resolve) => {
let done = false;
const t = setTimeout(() => { if (!done) { done = true; resolve(); } }, 3000);
socket.emit('worker:activate-tab', {}, () => {
if (done) return;
done = true;
clearTimeout(t);
resolve();
});
});
} catch (_) { /* non-fatal */ }
// NOTE: previously emitted worker:activate-tab + polled
// visibilityState here (commit 4ef493b fix D). Removed because:
// 1. CDP Input.dispatchMouseEvent works on hidden tabs — no
// activation actually needed for the click to land.
// 2. The server handler calls chrome.windows.update {focused:
// true}, which on macOS triggers Mission Control to switch
// Spaces if the Chromium window lives on a non-current
// desktop. Disruptive UX for the user, and the test that
// proved 2-parallel works ran with this code path NOT
// executed (engine baseline + auto-btn-bash IIFE guard
// was sufficient).
// The server's worker:activate-tab handler is now dead code; left
// in place in case a future debugging session needs it.
// Poll visibilityState up to 2s — give the OS focus change time to
// propagate. Don't block forever; if it never flips, try copy anyway.
const visStart = Date.now();
while (document.visibilityState !== 'visible' && Date.now() - visStart < 2000) {
await new Promise(r => setTimeout(r, 50));
}
const markdown = await window.AIChat.copyLastTurnAsMarkdown();

@@ -262,0 +243,0 @@ const chatId = window.AIChat.getChatIdFromUrl?.() || null;

Sorry, the diff of this file is too big to display