@iola_adm/iola-cli 0.1.53 → 0.1.54

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/package.json +1 -1
  2. package/src/cli.js +9 -6
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iola_adm/iola-cli",
3
- "version": "0.1.53",
3
+ "version": "0.1.54",
4
4
  "description": "CLI и AI-агент городского округа Йошкар-Ола.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://github.com/adm-iola/iola-cli#readme",
package/src/cli.js CHANGED
@@ -1343,23 +1343,26 @@ function clearAgentInputArea(state = null) {
1343
1343
  }
1344
1344
 
1345
1345
  function startActivityIndicator(label = "работаю") {
1346
+ const doneLabel = "готово";
1346
1347
  if (!output.isTTY || process.env.NO_COLOR === "1") {
1347
1348
  output.write(`${label}...\n`);
1348
- return () => {};
1349
+ const started = Date.now();
1350
+ return () => {
1351
+ const seconds = ((Date.now() - started) / 1000).toFixed(1);
1352
+ output.write(`- ${doneLabel} ${seconds}s\n`);
1353
+ };
1349
1354
  }
1350
- const frames = ["|", "/", "-", "\\"];
1351
1355
  const started = Date.now();
1352
- let index = 0;
1353
1356
  const render = () => {
1354
1357
  const seconds = ((Date.now() - started) / 1000).toFixed(1);
1355
- output.write(`\r\x1b[2K${colorMuted(`${frames[index % frames.length]} ${label} ${seconds}s`)}`);
1356
- index += 1;
1358
+ output.write(`\r\x1b[2K${colorMuted(`─ ${label} ${seconds}s`)}`);
1357
1359
  };
1358
1360
  render();
1359
1361
  const timer = setInterval(render, 120);
1360
1362
  return () => {
1361
1363
  clearInterval(timer);
1362
- output.write("\r\x1b[2K");
1364
+ const seconds = ((Date.now() - started) / 1000).toFixed(1);
1365
+ output.write(`\r\x1b[2K${colorMuted(`─ ${doneLabel} ${seconds}s`)}\n`);
1363
1366
  };
1364
1367
  }
1365
1368