hopdeck 1.5.1 → 1.5.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Cambios
2
2
 
3
+ ## 1.5.3
4
+
5
+ ### Arreglado
6
+ - En macOS, la selección del chat reconoce Command+C cuando el terminal lo reenvía como CSI u. Control+C y el clic derecho siguen disponibles. Se documenta la configuración de iTerm2 y Ghostty y la selección nativa para Terminal de Apple.
7
+
8
+ ## 1.5.2
9
+
10
+ ### Arreglado
11
+ - En Windows, al salir de Hopdeck se detienen los chats abiertos en el terminal integrado, evitando que procesos de Codex queden ejecutándose.
12
+
3
13
  ## 1.5.1
4
14
 
5
15
  ### Arreglado
package/LICENSE CHANGED
File without changes
package/README.en.md CHANGED
@@ -200,6 +200,14 @@ It refreshes itself every few seconds and never modifies the repository. It need
200
200
  - **Scroll** the chat with the mouse wheel or `PgUp` / `PgDn`; `End` or typing returns you to the bottom.
201
201
  - **Select and copy:** drag with the mouse over the chat to mark text; it is not copied by itself. Copy it with `Ctrl+C` or right click, and clear the selection with `Esc` or by clicking elsewhere. If you drag to the top or bottom edge the chat scrolls on its own and the selection follows, so you can mark far more than fits on screen. For the old behaviour (copy on release) set `"copyOnSelect": true` in `~/.hopdeck.json`. `F3` turns the mouse off if you prefer terminal selection (or use `Shift`+drag).
202
202
 
203
+ **Command+C on macOS:** Hopdeck also recognizes `⌘C` on its selection when the terminal sends `ESC [99;9u` (CSI u). The terminal's native Copy shortcut may intercept it; supporting CSI u does not mean a terminal forwards `⌘C` by default. Hopdeck does not change your keybindings or copy automatically when you select text.
204
+
205
+ - **iTerm2:** in a profile dedicated to Hopdeck, open **Settings → Profiles → Keys → Key Mappings**, add `⌘C`, choose **Send Escape Sequence**, and enter `[99;9u` (without typing `ESC`). This forwards the shortcut to Hopdeck. [iTerm2 reference](https://iterm2.com/documentation-preferences-profiles-keys.html).
206
+ - **Ghostty:** in a configuration dedicated to Hopdeck, use `keybind = super+c=csi:99;9u`. This overrides native Copy while that configuration is in use. [Ghostty action reference](https://ghostty.org/docs/config/keybind/reference).
207
+ - **Apple Terminal, or without configuring keybindings:** press `F3` (or `Fn+F3`) to turn off Hopdeck's mouse, select text using the terminal itself, and press `⌘C`. Press `F3` again to restore Hopdeck's mouse. This copies the terminal's selection, rather than the chat's internal selection.
208
+
209
+ `Ctrl+C` and right click still copy the internal selection on macOS. Without an internal selection, `Ctrl+C` is forwarded to the chat to interrupt it. Windows and Linux keep their existing shortcuts.
210
+
203
211
  ### More
204
212
 
205
213
  - The project's **git branch** is shown and the list refreshes itself.
package/README.md CHANGED
@@ -200,6 +200,14 @@ Se refresca solo cada pocos segundos y no modifica nada en el repositorio. Neces
200
200
  - **Scroll** en el chat: rueda del ratón o `PgUp` / `PgDn`; `End` o escribir algo te devuelve al final.
201
201
  - **Seleccionar y copiar:** arrastra con el ratón sobre el chat para marcar texto; no se copia solo. Cópialo con `Ctrl+C` o con el clic derecho, y quita la selección con `Esc` o haciendo clic en otro sitio. Si arrastras hasta el borde de arriba o de abajo, el chat se desplaza solo y la selección sigue, así que puedes marcar mucho más de lo que cabe en pantalla. Si prefieres el comportamiento anterior (copiar al soltar), pon `"copyOnSelect": true` en `~/.hopdeck.json`. `F3` apaga el ratón si prefieres seleccionar con el terminal (o usa `Shift`+arrastrar).
202
202
 
203
+ **Command+C en macOS:** Hopdeck también reconoce `⌘C` sobre su selección cuando la terminal envía la secuencia `ESC [99;9u` (CSI u). El atajo nativo de copiar de la terminal puede interceptarlo; que una terminal soporte CSI u no significa que reenvíe `⌘C` por defecto. Hopdeck no cambia tus atajos ni copia automáticamente al seleccionar.
204
+
205
+ - **iTerm2:** en un perfil dedicado a Hopdeck, abre **Settings → Profiles → Keys → Key Mappings**, añade `⌘C`, elige **Send Escape Sequence** y escribe `[99;9u` (sin escribir `ESC`). Así el atajo llega a Hopdeck. [Referencia de iTerm2](https://iterm2.com/documentation-preferences-profiles-keys.html).
206
+ - **Ghostty:** en una configuración dedicada a Hopdeck, usa `keybind = super+c=csi:99;9u`. Esta asignación sustituye el comando de copia nativo mientras uses esa configuración. [Referencia de acciones de Ghostty](https://ghostty.org/docs/config/keybind/reference).
207
+ - **Terminal de Apple, o sin configurar atajos:** pulsa `F3` (o `Fn+F3`) para desactivar el ratón de Hopdeck, selecciona con la propia terminal y usa `⌘C`. Vuelve a pulsar `F3` para recuperar el ratón de Hopdeck. En este modo se copia la selección de la terminal, no la selección interna del chat.
208
+
209
+ `Ctrl+C` y el clic derecho siguen copiando la selección interna en macOS. Sin selección interna, `Ctrl+C` se envía al chat para interrumpirlo. En Windows y Linux se conservan los atajos actuales.
210
+
203
211
  ### Otros detalles
204
212
 
205
213
  - Se muestra la **rama de git** del proyecto y la lista se refresca sola.
package/SECURITY.md CHANGED
File without changes
File without changes
package/bin/hopdeck.js CHANGED
@@ -28,7 +28,7 @@ const { encodeSixel } = require('../lib/sixel');
28
28
  const gitlib = require('../lib/git');
29
29
  const deepsearch = require('../lib/deepsearch');
30
30
  const { collectImages, decodePNG, decodeImage, scaleBox, fitSize, halfBlocks } = images;
31
- const { parseKeys, KEYMAP, printable, editBuf, normalizeKeys } = require('../lib/keys');
31
+ const { parseKeys, KEYMAP, printable, editBuf, normalizeKeys, isCopyKey } = require('../lib/keys');
32
32
  const { stripJsonc, wtCtrlV, wtSettingsFile } = require('../lib/windows-terminal');
33
33
 
34
34
  let VERSION = '0.0.0';
@@ -1603,7 +1603,7 @@ function selText(sh, sl) {
1603
1603
  }
1604
1604
  return out.join('\n').replace(/\s+$/, '');
1605
1605
  }
1606
- /** Copia la selección marcada y la quita. Solo se llama cuando el usuario lo pide (Ctrl+C, clic derecho), o con "copyOnSelect". */
1606
+ /** Copia la selección marcada y la quita. Solo por atajo de copia, clic derecho o "copyOnSelect". */
1607
1607
  function copySelection(sh) {
1608
1608
  const sl = E.sel; E.sel = null; stopSelScroll();
1609
1609
  const t = sl && sh ? selText(sh, sl) : '';
@@ -1767,8 +1767,8 @@ function hasContent(term) {
1767
1767
  }
1768
1768
 
1769
1769
  function embedInput(s) {
1770
- if (E.sel && !E.sel.down) { // hay texto seleccionado: Ctrl+C lo copia y Esc lo quita, sin llegar a Claude (Esc le interrumpiría)
1771
- if (s === '\x03') { copySelection(E.sessions.get(E.shown)); return render(); }
1770
+ if (E.sel && !E.sel.down) { // copiar/Esc actúan sobre la selección sin llegar al chat
1771
+ if (isCopyKey(s)) { copySelection(E.sessions.get(E.shown)); return render(); }
1772
1772
  if (s === '\x1b') { E.sel = null; E.note = null; return render(); }
1773
1773
  }
1774
1774
  stopSelScroll(); E.sel = null; E.hover = null;
@@ -1867,7 +1867,21 @@ function embedResize() {
1867
1867
  render();
1868
1868
  }
1869
1869
 
1870
- function embedKillAll() { for (const sess of E.sessions.values()) { try { sess.p.kill(); } catch { /* */ } } }
1870
+ function embedKillAll() {
1871
+ if (WIN) {
1872
+ // node-pty enumerates console processes asynchronously before killing them. quit()
1873
+ // exits immediately, so that enumeration may never finish and leave ConPTY open.
1874
+ // Stop all owned process trees before releasing the PTYs and exiting the hub.
1875
+ const pids = [...E.sessions.values()].map((sess) => sess.p.pid).filter((pid) => Number.isInteger(pid) && pid > 0);
1876
+ if (pids.length) {
1877
+ try {
1878
+ cp.spawnSync('taskkill.exe', [...pids.flatMap((pid) => ['/PID', String(pid)]), '/T', '/F'],
1879
+ { stdio: 'ignore', windowsHide: true, timeout: 5000 });
1880
+ } catch { /* still release the PTYs below */ }
1881
+ }
1882
+ }
1883
+ for (const sess of E.sessions.values()) { try { sess.p.kill(); } catch { /* */ } }
1884
+ }
1871
1885
 
1872
1886
  // Redibujado diferencial: solo se reescriben las filas que cambiaron desde el último cuadro.
1873
1887
  let lastRows = [], forceFull = true;
File without changes
package/lib/deepsearch.js CHANGED
File without changes
package/lib/executable.js CHANGED
File without changes
package/lib/git.js CHANGED
File without changes
package/lib/history.js CHANGED
File without changes
package/lib/i18n.js CHANGED
@@ -46,7 +46,7 @@ const T = {
46
46
  bar4: 'copiar texto', bar5: 'ratón', up: (n, pct) => `↑ ${n} líneas${pct >= 0 ? ` (${pct}%)` : ''} · PgDn/End`, loading: 'Cargando proyectos', opening: 'Abriendo conversación', close: 'cerrar', idle1: 'Elige una conversación', idle2: 'Usa ↑↓ y ⏎ en el panel izquierdo',
47
47
  barList: 'lista', barJump: 'saltar', barTheme: 'tema', barCount: (p, c) => `${p} ${p === 1 ? 'proyecto' : 'proyectos'} · ${c} ${c === 1 ? 'chat' : 'chats'}`,
48
48
  idle3: 'F1 proyectos · F2 chat', bar1: 'proyectos', bar2: 'chat', bar3: 'minimizar',
49
- selHint: 'Ctrl+C o clic derecho: copiar · Esc: quitar la selección',
49
+ selHint: `${process.platform === 'darwin' ? '⌘C / ' : ''}Ctrl+C o clic derecho: copiar · Esc: quitar la selección`,
50
50
  searchPh: 'buscar conversación o proyecto…', found: (n) => `${n} ${n === 1 ? 'resultado' : 'resultados'}`, noRes: (q) => `Sin resultados para «${q}»`,
51
51
  searchingContent: 'Buscando dentro de las conversaciones…', tryContent: 'Pulsa Tab para buscar también dentro del contenido', inContent: 'en el contenido', kClear: 'limpiar', kEdit: 'editar', kEsc: 'salir',
52
52
  inside: 'Ya estás dentro de Hopdeck (F1 para ir a la lista de proyectos).',
@@ -94,7 +94,7 @@ const T = {
94
94
  bar4: 'copy text', bar5: 'mouse', up: (n, pct) => `↑ ${n} lines${pct >= 0 ? ` (${pct}%)` : ''} · PgDn/End`, loading: 'Loading projects', opening: 'Opening conversation', close: 'close', idle1: 'Pick a conversation', idle2: 'Use ↑↓ and ⏎ in the left pane',
95
95
  barList: 'list', barJump: 'jump', barTheme: 'theme', barCount: (p, c) => `${p} ${p === 1 ? 'project' : 'projects'} · ${c} ${c === 1 ? 'chat' : 'chats'}`,
96
96
  idle3: 'F1 projects · F2 chat', bar1: 'projects', bar2: 'chat', bar3: 'minimize',
97
- selHint: 'Ctrl+C or right click: copy · Esc: clear the selection',
97
+ selHint: `${process.platform === 'darwin' ? '⌘C / ' : ''}Ctrl+C or right click: copy · Esc: clear the selection`,
98
98
  searchPh: 'search conversation or project…', found: (n) => `${n} ${n === 1 ? 'result' : 'results'}`, noRes: (q) => `No results for “${q}”`,
99
99
  searchingContent: 'Searching inside the conversations…', tryContent: 'Press Tab to also search inside the content', inContent: 'in content', kClear: 'clear', kEdit: 'edit', kEsc: 'exit',
100
100
  inside: 'You are already inside Hopdeck (F1 jumps to the project list).',
package/lib/images.js CHANGED
File without changes
package/lib/keys.js CHANGED
@@ -44,4 +44,15 @@ const CONSOLE_FKEYS = { '\x1b[[A': '\x1bOP', '\x1b[[B': '\x1bOQ', '\x1b[[C': '\x
44
44
  /** Convierte las teclas de función de la consola de Linux a la forma estándar de xterm que usa el resto del programa. */
45
45
  const normalizeKeys = (s) => s.replace(/\x1b\[\[[A-E]/g, (m) => CONSOLE_FKEYS[m]);
46
46
 
47
- module.exports = { parseKeys, KEYMAP, printable, editBuf, normalizeKeys };
47
+ /** Command+C, when the terminal forwards it as CSI u. Native terminal Copy does not send a key. */
48
+ function isCopyKey(s, platform = process.platform) {
49
+ if (s === '\x03') return true;
50
+ if (platform !== 'darwin') return false;
51
+ const key = /^\x1b\[(99|67)(?::[0-9:]*)?;(\d+)(?::([123]))?u$/.exec(s);
52
+ if (!key || key[3] === '3') return false; // key release must not copy a second time
53
+ const modifiers = Number(key[2]) - 1;
54
+ // Command is Super (8); Caps Lock and Num Lock do not change the shortcut.
55
+ return modifiers >= 0 && modifiers <= 255 && (modifiers & ~192) === 8;
56
+ }
57
+
58
+ module.exports = { parseKeys, KEYMAP, printable, editBuf, normalizeKeys, isCopyKey };
package/lib/mascot.js CHANGED
File without changes
package/lib/provider.js CHANGED
File without changes
package/lib/sixel.js CHANGED
File without changes
package/lib/stats.js CHANGED
File without changes
package/lib/style.js CHANGED
File without changes
package/lib/text.js CHANGED
File without changes
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "hopdeck",
3
- "version": "1.5.1",
3
+ "version": "1.5.3",
4
4
  "description": "Selector visual de proyectos y conversaciones para Claude Code y Codex CLI, en la terminal: salta entre proyectos sin hacer cd.",
5
5
  "author": "fabriciodev26",
6
6
  "license": "MIT",