@arbidocs/cli 0.3.79 → 0.3.80

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,13 @@
1
1
  # Changelog
2
2
 
3
+ ## v0.3.80
4
+
5
+ [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.3.79...HEAD)
6
+
7
+ ### 🚀 Enhancements
8
+
9
+ - **cli:** Humanize agent-step output (Thinking…, doc names, page ranges, no Alt keys) ([#844](https://github.com/arbicity/ARBI-frontend/pull/844))
10
+
3
11
  ## v0.3.79
4
12
 
5
13
  [compare changes](https://github.com/arbicity/ARBI-frontend/compare/v0.3.78...HEAD)
package/dist/index.js CHANGED
@@ -3694,7 +3694,7 @@ function getLatestVersion(skipCache = false) {
3694
3694
  }
3695
3695
  }
3696
3696
  function getCurrentVersion() {
3697
- return "0.3.79";
3697
+ return "0.3.80";
3698
3698
  }
3699
3699
  function readChangelog(fromVersion, toVersion) {
3700
3700
  try {
@@ -3747,17 +3747,17 @@ function showChangelog(fromVersion, toVersion) {
3747
3747
  async function checkForUpdates(autoUpdate) {
3748
3748
  try {
3749
3749
  const latest = getLatestVersion();
3750
- if (!latest || latest === "0.3.79") return;
3750
+ if (!latest || latest === "0.3.80") return;
3751
3751
  if (autoUpdate) {
3752
3752
  warn(`
3753
- Your arbi version is out of date (${"0.3.79"} \u2192 ${latest}). Updating...`);
3753
+ Your arbi version is out of date (${"0.3.80"} \u2192 ${latest}). Updating...`);
3754
3754
  child_process.execSync("npm install -g @arbidocs/cli@latest", { stdio: "inherit" });
3755
- showChangelog("0.3.79", latest);
3755
+ showChangelog("0.3.80", latest);
3756
3756
  console.log(`Updated to ${latest}.`);
3757
3757
  } else {
3758
3758
  warn(
3759
3759
  `
3760
- Your arbi version is out of date (${"0.3.79"} \u2192 ${latest}).
3760
+ Your arbi version is out of date (${"0.3.80"} \u2192 ${latest}).
3761
3761
  Run "arbi update" to upgrade, or "arbi update auto" to always stay up to date.`
3762
3762
  );
3763
3763
  }
@@ -3789,10 +3789,10 @@ function markNagShown(latest) {
3789
3789
  function hintUpdateOnError() {
3790
3790
  try {
3791
3791
  const cached = readCache();
3792
- if (!cached || cached.latest === "0.3.79") return;
3792
+ if (!cached || cached.latest === "0.3.80") return;
3793
3793
  if (!shouldShowNag(cached.latest)) return;
3794
3794
  warn(
3795
- `Your arbi version is out of date (${"0.3.79"} \u2192 ${cached.latest}). Run "arbi update".`
3795
+ `Your arbi version is out of date (${"0.3.80"} \u2192 ${cached.latest}). Run "arbi update".`
3796
3796
  );
3797
3797
  markNagShown(cached.latest);
3798
3798
  } catch {
@@ -7202,6 +7202,10 @@ function registerAskCommand(program2) {
7202
7202
  }
7203
7203
  const docs = await sdk.documents.listDocuments(arbi);
7204
7204
  const docIds = docs.map((d) => d.external_id);
7205
+ const docNames = {};
7206
+ for (const d of docs) {
7207
+ if (d.external_id && d.file_name) docNames[d.external_id] = d.file_name;
7208
+ }
7205
7209
  if (opts.background) {
7206
7210
  const result2 = await sdk.responses.submitBackgroundQuery({
7207
7211
  baseUrl: config.baseUrl,
@@ -7258,6 +7262,8 @@ function registerAskCommand(program2) {
7258
7262
  const verbose = opts.quiet === true ? false : getConfig()?.verbose !== false;
7259
7263
  let elapsedTime = null;
7260
7264
  let firstToken = true;
7265
+ let lastStepIndex = null;
7266
+ let lastStepLabel = "";
7261
7267
  let buf = "";
7262
7268
  const transform = opts.rawCitations ? (s) => s : sdk.stripCitationMarkdown;
7263
7269
  const flush = (final) => {
@@ -7278,10 +7284,15 @@ function registerAskCommand(program2) {
7278
7284
  },
7279
7285
  onAgentStep: (data) => {
7280
7286
  if (verbose) {
7281
- const label2 = sdk.formatAgentStepLabel(data);
7287
+ const label2 = sdk.formatAgentStepLabel(data, docNames);
7282
7288
  if (label2 && data.step !== "answering") {
7283
- console.error(chalk2__default.default.dim(`
7289
+ const isDuplicate = data.index === lastStepIndex && label2 === lastStepLabel;
7290
+ if (!isDuplicate) {
7291
+ console.error(chalk2__default.default.dim(`
7284
7292
  [ARBI] ${label2}`));
7293
+ lastStepIndex = data.index;
7294
+ lastStepLabel = label2;
7295
+ }
7285
7296
  }
7286
7297
  }
7287
7298
  },
@@ -10226,7 +10237,7 @@ console.info = (...args) => {
10226
10237
  _origInfo(...args);
10227
10238
  };
10228
10239
  var program = new commander.Command();
10229
- program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.3.79").showHelpAfterError(true).showSuggestionAfterError(true);
10240
+ program.name("arbi").description("ARBI CLI \u2014 interact with ARBI from the terminal").version("0.3.80").showHelpAfterError(true).showSuggestionAfterError(true);
10230
10241
  registerConfigCommand(program);
10231
10242
  registerLoginCommand(program);
10232
10243
  registerRegisterCommand(program);