atris 3.74.7 → 3.74.8

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/lib/zen.js CHANGED
@@ -507,8 +507,21 @@ function shortPlace(p) {
507
507
  function sideCopyLines(paths, days, waitMs = null) {
508
508
  const n = paths.length;
509
509
  const lines = [`${n} side ${n === 1 ? 'copy has' : 'copies have'} unsaved work, left for ${n === 1 ? 'its owner' : 'their owners'}`];
510
- for (const p of paths.slice(0, 3)) lines.push(` ${shortPlace(p)}`);
511
- if (n > 3) lines.push(` and ${n - 3} more`);
510
+ // Copies that share a folder (one workflow's runs, say) read as one line.
511
+ const folders = new Map();
512
+ for (const p of paths) {
513
+ const dir = path.dirname(p);
514
+ if (!folders.has(dir)) folders.set(dir, []);
515
+ folders.get(dir).push(p);
516
+ }
517
+ const rows = [];
518
+ for (const [dir, group] of folders) {
519
+ if (group.length >= 3) rows.push({ text: `${group.length} in ${shortPlace(dir)}/`, count: group.length });
520
+ else for (const p of group) rows.push({ text: shortPlace(p), count: 1 });
521
+ }
522
+ for (const row of rows.slice(0, 3)) lines.push(` ${row.text}`);
523
+ const rest = rows.slice(3).reduce((sum, row) => sum + row.count, 0);
524
+ if (rest) lines.push(` and ${rest} more`);
512
525
  lines.push(`zen saves ${n === 1 ? 'it' : 'each one'} to zen-backup/ once nobody has touched it for ${days} ${days === 1 ? 'day' : 'days'}`);
513
526
  if (waitMs > 0) lines.push(`${n === 1 ? 'that is' : 'the first one is'} due in ${waitText(waitMs)}`);
514
527
  return lines;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "atris",
3
- "version": "3.74.7",
3
+ "version": "3.74.8",
4
4
  "description": "you say what you want in plain words. atris builds it, checks it, and shows you proof.",
5
5
  "mcpName": "io.github.atrislabs/atris",
6
6
  "main": "bin/atris.js",