apiblaze 0.19.25 → 0.19.26

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/dist/index.js +9 -6
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -932,7 +932,7 @@ var import_commander = require("commander");
932
932
  var import_chalk44 = __toESM(require("chalk"));
933
933
 
934
934
  // package.json
935
- var version = "0.19.25";
935
+ var version = "0.19.26";
936
936
 
937
937
  // src/index.ts
938
938
  init_types();
@@ -6343,9 +6343,10 @@ function renderToolEvents(events, cred) {
6343
6343
  }
6344
6344
  }
6345
6345
  }
6346
- function renderFailedToolResults(delta, events) {
6347
- const failed = new Set((events ?? []).filter((e) => e.status === "error").map((e) => e.name));
6348
- if (failed.size === 0) return;
6346
+ function renderToolResults(delta, events) {
6347
+ const anyFailed = (events ?? []).some((e) => e.status === "error");
6348
+ if (!anyFailed && !isVerbose()) return;
6349
+ const cap = anyFailed ? 24 : 12;
6349
6350
  for (const m of delta ?? []) {
6350
6351
  if (!m || m.role !== "tool" || typeof m.content !== "string") continue;
6351
6352
  const body = m.content.trim();
@@ -6357,10 +6358,12 @@ function renderFailedToolResults(delta, events) {
6357
6358
  return body;
6358
6359
  }
6359
6360
  })();
6361
+ const lines = pretty.split("\n");
6360
6362
  console.log(import_chalk39.default.dim(" response:"));
6361
- for (const line of pretty.split("\n").slice(0, 24)) {
6363
+ for (const line of lines.slice(0, cap)) {
6362
6364
  console.log(import_chalk39.default.dim(` ${line}`));
6363
6365
  }
6366
+ if (lines.length > cap) console.log(import_chalk39.default.dim(` \u2026${lines.length - cap} more lines`));
6364
6367
  }
6365
6368
  }
6366
6369
  function billingLine(billing) {
@@ -6458,7 +6461,7 @@ async function replTurn(p, messages, userText) {
6458
6461
  return t ? { header: "Authorization", value: `Bearer ${t}` } : void 0;
6459
6462
  })() : p.dpKey ? { header: "X-API-Key", value: p.dpKey } : void 0
6460
6463
  );
6461
- renderFailedToolResults(data.delta, data.tool_events);
6464
+ renderToolResults(data.delta, data.tool_events);
6462
6465
  for (const m of data.delta) messages.push(m);
6463
6466
  printAssistant(data.delta);
6464
6467
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "apiblaze",
3
- "version": "0.19.25",
3
+ "version": "0.19.26",
4
4
  "description": "APIblaze CLI — Chat with your APIs, Manage your API keys, users and groups with the APIblaze serverless proxy",
5
5
  "keywords": [
6
6
  "apiblaze",