hopdeck 1.2.5 → 1.2.6
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 +9 -0
- package/THIRD_PARTY_NOTICES.md +1 -1
- package/bin/hopdeck.js +24 -11
- package/lib/i18n.js +2 -2
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Cambios
|
|
2
2
|
|
|
3
|
+
## 1.2.6
|
|
4
|
+
|
|
5
|
+
### Mejorado
|
|
6
|
+
- **Lista más legible:** el número de conversaciones de cada proyecto destaca y se separa de «hace cuánto» con un punto; los proyectos plegados se atenúan y el desplegado lleva la flecha en color.
|
|
7
|
+
- **Vista previa más rica:** una fila de resumen («hace 3 h · últimos 6 mensajes»), tus mensajes con `›` en violeta y los de Claude con `●` en naranja.
|
|
8
|
+
- **Barra de ayuda contextual:** muestra solo las teclas que sirven para lo seleccionado (proyecto: desplegar y fijar; conversación: reanudar y renombrar).
|
|
9
|
+
- **Pantalla de bienvenida** con las teclas principales cuando no hay nada abierto.
|
|
10
|
+
- **Icono** del proyecto (`docs/icon.svg` y `docs/icon.png`) para el avatar del repositorio.
|
|
11
|
+
|
|
3
12
|
## 1.2.5
|
|
4
13
|
|
|
5
14
|
### Cambiado
|
package/THIRD_PARTY_NOTICES.md
CHANGED
|
@@ -13,7 +13,7 @@ Ninguna dependencia ejecuta scripts de instalación (`npm audit`: 0 vulnerabilid
|
|
|
13
13
|
|
|
14
14
|
## Tipografía del logotipo
|
|
15
15
|
|
|
16
|
-
El texto de `docs/logo-*.svg
|
|
16
|
+
El texto de `docs/logo-*.svg`, `docs/logo-*.png` y la «H» de `docs/icon.*` están convertido a trazados a partir de la fuente [Inter](https://rsms.me/inter/) (peso 800), con licencia SIL Open Font License 1.1, que permite este uso. No se distribuye la fuente.
|
|
17
17
|
|
|
18
18
|
## Marcas
|
|
19
19
|
|
package/bin/hopdeck.js
CHANGED
|
@@ -393,10 +393,14 @@ function frameTree(W, H) {
|
|
|
393
393
|
const base = sel ? (EMBED && E.focus === 'right' ? C.selOff : C.selOn) : '';
|
|
394
394
|
const mark = [sel ? '▌' : ' ', C.accent];
|
|
395
395
|
if (e.t === 'p') {
|
|
396
|
-
const
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
396
|
+
const n = e.p.sessions.length;
|
|
397
|
+
// nº de conversaciones (destacado) · hace cuánto fue la última; alineado con la columna de tiempo de las conversaciones
|
|
398
|
+
const right = n ? [[String(n).padStart(3), sel ? C.text + C.bold : C.text], [' · ', C.faint], [''.padEnd(0), ''], [ago(e.p.mtime).padStart(6), C.dim], [' ', '']] : [[' ', '']];
|
|
399
|
+
// 4) los proyectos plegados se atenúan: el desplegado, el de esta carpeta y el seleccionado destacan
|
|
400
|
+
const nameC = sel ? C.text + C.bold : e.p.hidden ? C.dim : e.p.isCwd ? C.ok : e.open ? C.text : C.dim;
|
|
401
|
+
lines.push(fit([mark, [e.open ? ' ▾ ' : ' ▸ ', e.open ? C.accent : C.dim],
|
|
402
|
+
[(e.p.pinned ? '★ ' : '') + (e.p.isCwd ? '● ' : '') + e.p.name, nameC]], W - 13, base) +
|
|
403
|
+
fit(right, 13, base));
|
|
400
404
|
} else if (e.t === 'm') {
|
|
401
405
|
lines.push(fit([mark, [' ', ''], [T.more(e.n), sel ? C.text : C.dim]], W, base));
|
|
402
406
|
} else if (e.t === 'l') {
|
|
@@ -430,7 +434,11 @@ function frameTree(W, H) {
|
|
|
430
434
|
[' Tab ' + (S.deep ? '◉ ' : '○ ') + T.deep, S.deep ? C.ok : C.dim]], W));
|
|
431
435
|
} else {
|
|
432
436
|
const k = T.k, segs = [[' ', '']];
|
|
433
|
-
|
|
437
|
+
const keys = !cur ? [['⏎', k.open], ['n', k.neu], ['/', k.find], ['?', T.kHelp]]
|
|
438
|
+
: cur.t === 'p' ? [['⏎', T.kUnfold], ['n', k.neu], ['p', T.kPin], ['/', k.find], ['?', T.kHelp]]
|
|
439
|
+
: cur.t === 's' ? [['⏎', k.resume], ['R', T.kRename], ['n', k.neu], ['/', k.find], ['?', T.kHelp]]
|
|
440
|
+
: [['⏎', k.open], ['n', k.neu], ['/', k.find], ['?', T.kHelp]];
|
|
441
|
+
for (const [key, desc] of keys) segs.push([key, C.accent], [' ' + desc + ' ', C.dim]);
|
|
434
442
|
lines.push(fit(segs, W));
|
|
435
443
|
}
|
|
436
444
|
return lines;
|
|
@@ -870,7 +878,8 @@ function termRow(term, y, width, sel, from = 0) {
|
|
|
870
878
|
const paintMark = (t) => t.replace('\u0001', R + C.text + C.bold);
|
|
871
879
|
|
|
872
880
|
function idleRow(y, width, height) {
|
|
873
|
-
const
|
|
881
|
+
const k = T.k;
|
|
882
|
+
const rows = [[C.brand + C.bold, '» Hop\u0001deck'], [C.text, T.idle1], [C.dim, T.idle2], ['', ''], [C.accent, `⏎ ${k.resume} n ${k.neu} / ${k.find} ? ${T.kHelp}`], [C.dim, T.idle3]];
|
|
874
883
|
const i = y - (Math.floor(height / 2) - 2);
|
|
875
884
|
if (i < 0 || i >= rows.length) return ' '.repeat(width);
|
|
876
885
|
const [st, t] = rows[i];
|
|
@@ -1169,18 +1178,22 @@ function previewFor(x) {
|
|
|
1169
1178
|
return null;
|
|
1170
1179
|
}
|
|
1171
1180
|
|
|
1172
|
-
function previewRows(msgs, width, height) {
|
|
1181
|
+
function previewRows(msgs, width, height, info = '') {
|
|
1173
1182
|
const lines = [];
|
|
1174
1183
|
for (const m of msgs) {
|
|
1175
1184
|
const user = m.role === 'user';
|
|
1176
|
-
|
|
1185
|
+
// tú: › en violeta y texto destacado; Claude: ● en naranja y texto atenuado
|
|
1186
|
+
wrapText(m.text, Math.max(10, width - 4)).forEach((t, i) => lines.push([i === 0 ? (user ? ' › ' : ' ● ') : ' ', user ? C.accent + C.bold : C.brand, t, user ? C.text : C.dim]));
|
|
1177
1187
|
lines.push(null);
|
|
1178
1188
|
}
|
|
1179
1189
|
while (lines.length && lines[lines.length - 1] === null) lines.pop();
|
|
1180
|
-
const
|
|
1190
|
+
const head = info ? 2 : 0; // fila de resumen + línea en blanco
|
|
1191
|
+
const shown = lines.slice(-Math.max(1, height - 2 - head)), rows = [];
|
|
1181
1192
|
for (let i = 0; i < height; i++) {
|
|
1182
1193
|
if (i === height - 1) { rows.push(fit([[' ' + T.prevHint, C.accent]], width)); continue; }
|
|
1183
|
-
|
|
1194
|
+
if (info && i === 0) { rows.push(fit([[' ' + info, C.dim]], width)); continue; }
|
|
1195
|
+
if (info && i === 1) { rows.push(' '.repeat(width)); continue; }
|
|
1196
|
+
const l = shown[i - head];
|
|
1184
1197
|
rows.push(l ? fit([[l[0], l[1]], [' ' + (l[2] || ''), l[3]]], width) : ' '.repeat(width));
|
|
1185
1198
|
}
|
|
1186
1199
|
return rows;
|
|
@@ -1201,7 +1214,7 @@ function renderEmbed() {
|
|
|
1201
1214
|
// sin chat abierto: vista previa de la conversación seleccionada en la lista
|
|
1202
1215
|
const selEnt = !sh && !S.help && !S.qs ? flatList()[S.c] : null;
|
|
1203
1216
|
const pvMsgs = selEnt && selEnt.t === 's' ? previewFor(selEnt.s) : null;
|
|
1204
|
-
const pvRows = pvMsgs && pvMsgs.length ? previewRows(pvMsgs, rw, th) : null;
|
|
1217
|
+
const pvRows = pvMsgs && pvMsgs.length ? previewRows(pvMsgs, rw, th, T.prevInfo(ago(selEnt.s.mtime), pvMsgs.length)) : null;
|
|
1205
1218
|
const hdr = sh || (selEnt && selEnt.t === 's' ? { project: selEnt.p.name, title: selEnt.s.title, branch: gitBranch(selEnt.p.cwd) } : null);
|
|
1206
1219
|
const gRows = E.gallery ? galleryRows(rw, th) : null;
|
|
1207
1220
|
const hv = !E.gallery && sh && sh.ready && E.hover && !E.hover.g.loading && E.hover.g.images.length ? E.hover : null;
|
package/lib/i18n.js
CHANGED
|
@@ -18,7 +18,7 @@ const T = {
|
|
|
18
18
|
imgNoPrev: 'No se puede previsualizar este formato', imgHint: '← → navegar o abrir en el visor esc cerrar', imgFolder: 'Imágenes abiertas en el visor',
|
|
19
19
|
more: (n) => `mostrar ${n} más…`, busyRename: 'Cierra la conversación antes de renombrarla', renameLbl: 'nombre',
|
|
20
20
|
copied: (n) => `Copiado (${n} caracteres)`, archMsg: 'Archivada (H para verlas)', unarchMsg: 'Desarchivada', qsHint: 'saltar a cualquier conversación',
|
|
21
|
-
prevHint: '⏎ reanudar esta conversación', noPrev: 'Sin mensajes para mostrar',
|
|
21
|
+
prevHint: '⏎ reanudar esta conversación', prevInfo: (a, n) => `${a === 'ahora' ? 'ahora mismo' : 'hace ' + a} · últimos ${n} mensajes`, kUnfold: 'desplegar', kRename: 'renombrar', kPin: 'fijar', kHelp: 'ayuda', noPrev: 'Sin mensajes para mostrar',
|
|
22
22
|
bar6: 'ocultar lista', bar7: 'mostrar lista', deep: 'contenido', pathPrompt: 'nombre de la nueva carpeta', mkIn: 'se crea en', fbTitle: 'Elegir carpeta', fbHere: 'Abrir chat aquí', fbNew: 'Nueva carpeta aquí…', fbUp: 'Subir un nivel', fbProj: 'proyecto', fbHint: '⏎ entrar · ␣ abrir · / buscar · . ocultas', fbDrives: 'Este equipo', fbRecent: 'reciente', hoverMiss: (n) => `[Image #${n}]: aún no está en el historial`, fbEmpty: 'Sin subcarpetas', badId: 'Identificador de sesión no válido',
|
|
23
23
|
imgClickHint: 'clic: abrir en grande', imgOpened: (n) => `[Image #${n}] abierta en el visor de imágenes`,
|
|
24
24
|
unknownCmd: (c) => `Comando desconocido: "${c}"`, didYouMean: (s) => `¿Quisiste decir "${s}"?`, cmdList: 'Comandos: hopdeck shortcut on|off · uninstall · doctor · help (y --list, --version).\nLas opciones de claude (por ejemplo --model opus) se pasan tal cual: hopdeck --model opus',
|
|
@@ -58,7 +58,7 @@ const T = {
|
|
|
58
58
|
imgNoPrev: 'This format cannot be previewed', imgHint: '← → browse o open in viewer esc close', imgFolder: 'Images opened in the viewer',
|
|
59
59
|
more: (n) => `show ${n} more…`, busyRename: 'Close the conversation before renaming it', renameLbl: 'name',
|
|
60
60
|
copied: (n) => `Copied (${n} chars)`, archMsg: 'Archived (H to show)', unarchMsg: 'Unarchived', qsHint: 'jump to any conversation',
|
|
61
|
-
prevHint: '⏎ resume this conversation', noPrev: 'No messages to show',
|
|
61
|
+
prevHint: '⏎ resume this conversation', prevInfo: (a, n) => `${a === 'now' ? 'just now' : a + ' ago'} · last ${n} messages`, kUnfold: 'unfold', kRename: 'rename', kPin: 'pin', kHelp: 'help', noPrev: 'No messages to show',
|
|
62
62
|
bar6: 'hide list', bar7: 'show list', deep: 'content', pathPrompt: 'new folder name', mkIn: 'created in', fbTitle: 'Pick a folder', fbHere: 'Open chat here', fbNew: 'New folder here…', fbUp: 'Go up', fbProj: 'project', fbHint: '⏎ enter · ␣ open · / find · . hidden', fbDrives: 'This PC', fbRecent: 'recent', hoverMiss: (n) => `[Image #${n}]: not in the history yet`, fbEmpty: 'No subfolders', badId: 'Invalid session id',
|
|
63
63
|
imgClickHint: 'click: open full size', imgOpened: (n) => `[Image #${n}] opened in the image viewer`,
|
|
64
64
|
unknownCmd: (c) => `Unknown command: "${c}"`, didYouMean: (s) => `Did you mean "${s}"?`, cmdList: 'Commands: hopdeck shortcut on|off · uninstall · doctor · help (and --list, --version).\nclaude options (for example --model opus) are passed through as they are: hopdeck --model opus',
|
package/package.json
CHANGED