@workover/cli 0.25.0 → 0.26.0

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.
Files changed (2) hide show
  1. package/bin/workover.mjs +18 -4
  2. package/package.json +1 -1
package/bin/workover.mjs CHANGED
@@ -1477,10 +1477,24 @@ async function docCommand() {
1477
1477
  : {}),
1478
1478
  });
1479
1479
  if (asJson) return console.log(JSON.stringify(res, null, 2));
1480
- console.log(
1481
- `\n \x1b[32m✓\x1b[0m Proposed changes to ${res?.tab ? `the "${res.tab.title}" tab of ` : ''}document #${docId}.`,
1482
- );
1483
- console.log(' They appear as tracked-change suggestions for a person to accept or reject.');
1480
+ // Said from the api's `outcome` (WO-1748): "they appear" used to be printed for a resend that
1481
+ // changed nothing, and for a suggestion the editor had already been unable to show.
1482
+ const where = `${res?.tab ? `the "${res.tab.title}" tab of ` : ''}document #${docId}`;
1483
+ const sid = res?.id != null ? ` (suggestion #${res.id})` : '';
1484
+ if (res?.outcome === 'unchanged') {
1485
+ console.log(`\n Nothing changed: the open suggestion on ${where}${sid} already says exactly this.`);
1486
+ } else if (res?.outcome === 'held') {
1487
+ console.log(`\n Not applied: the open suggestion on ${where}${sid} is out with Workover AI for a revision.`);
1488
+ console.log(' Your text would be overwritten when that lands. Propose again once it is back.');
1489
+ } else if (res?.outcome === 'reoffered') {
1490
+ console.log(`\n \x1b[32m✓\x1b[0m Offered the open suggestion on ${where}${sid} to the editor again.`);
1491
+ console.log(' It says exactly this already, and the editor had not been able to show it before.');
1492
+ } else {
1493
+ console.log(
1494
+ `\n \x1b[32m✓\x1b[0m ${res?.outcome === 'updated' ? 'Updated the open suggestion on' : 'Proposed changes to'} ${where}${sid}.`,
1495
+ );
1496
+ console.log(' They appear as tracked-change suggestions for a person to accept or reject.');
1497
+ }
1484
1498
  if (res?.documentUrl) console.log(` ${res.documentUrl}`);
1485
1499
  printTitleHeading(res?.titleHeading);
1486
1500
  printStyleFeedback(res?.style);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@workover/cli",
3
- "version": "0.25.0",
3
+ "version": "0.26.0",
4
4
  "description": "Workover command line — sign in and cowork on your documents from the terminal.",
5
5
  "license": "UNLICENSED",
6
6
  "author": "ScaleMath",