From fc5e2507c39735c073d53bac48d23b65f819dde0 Mon Sep 17 00:00:00 2001 From: Anthony Ettinger Date: Wed, 14 Oct 2026 01:55:05 +0000 Subject: [PATCH] desktop: open OSC 8 links without the confirm prompt (0.4.2) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit xterm.js's default OSC 8 linkHandler asks confirm() and then window.open()s about:blank before setting location, which setWindowOpenHandler denies — so shift+clicking a hyperlink prompted and then did nothing. Route it through hq.openUrl like plain-text URLs. Co-Authored-By: Claude Opus 5.5 --- desktop/package-lock.json | 4 ++-- desktop/package.json | 2 +- desktop/src/app.js | 3 +++ package.json | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/desktop/package-lock.json b/desktop/package-lock.json index 2cb7f2a..ecb4034 100644 --- a/desktop/package-lock.json +++ b/desktop/package-lock.json @@ -1,12 +1,12 @@ { "name": "hqterm-desktop", - "version": "0.4.1", + "version": "0.4.2", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "hqterm-desktop", - "version": "0.4.1", + "version": "0.4.2", "license": "MIT", "dependencies": { "@xterm/addon-fit": "^0.11.0", diff --git a/desktop/package.json b/desktop/package.json index a2d015c..9ba8faa 100644 --- a/desktop/package.json +++ b/desktop/package.json @@ -1,7 +1,7 @@ { "name": "hqterm-desktop", "productName": "hqterm", - "version": "0.4.1", + "version": "0.4.2", "description": "hqterm desktop: a terminal window that shows hqtui/qc images and HD emoji (xterm.js + node-pty).", "license": "MIT", "author": "Profullstack, Inc. ", diff --git a/desktop/src/app.js b/desktop/src/app.js index 8d256d5..3c16e44 100644 --- a/desktop/src/app.js +++ b/desktop/src/app.js @@ -101,6 +101,9 @@ // On macOS xterm.js forces a selection with Option+drag, not Shift+drag. macOptionClickForcesSelection: true, allowTransparency: false, + // OSC 8 hyperlinks: xterm.js's default handler asks confirm() and then + // window.open()s about:blank, which the main process refuses. Open directly. + linkHandler: { activate: (_e, uri) => hq.openUrl(uri) }, }); const rt = { pane, spec: pane.spec, el, term, fit: new FitAddon.FitAddon(), title: "", opened: false }; term.loadAddon(rt.fit); diff --git a/package.json b/package.json index 7c8723b..fa2763e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "hqterm", - "version": "0.4.1", + "version": "0.4.2", "description": "Terminal session manager: persistent hqsh sessions with images and HD emoji, built on hqtui.", "license": "MIT", "private": true,