@botbotgo/better-call 0.1.38 → 0.1.39
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/package.json +1 -1
- package/scripts/demo.mjs +14 -3
package/package.json
CHANGED
package/scripts/demo.mjs
CHANGED
|
@@ -30,6 +30,15 @@ function errorDetails(error) {
|
|
|
30
30
|
};
|
|
31
31
|
}
|
|
32
32
|
|
|
33
|
+
function displayValue(value) {
|
|
34
|
+
if (typeof value === "string") {
|
|
35
|
+
const trimmed = value.trim();
|
|
36
|
+
return trimmed === "" ? "(none)" : trimmed;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
return value == null ? "(none)" : String(value);
|
|
40
|
+
}
|
|
41
|
+
|
|
33
42
|
function exitWithError(step, error) {
|
|
34
43
|
const message = errorMessage(error);
|
|
35
44
|
|
|
@@ -201,9 +210,11 @@ if (json) {
|
|
|
201
210
|
console.log(` after: ${JSON.stringify(report.reliableToolCalls.repaired)}`);
|
|
202
211
|
console.log("");
|
|
203
212
|
console.log("3. Gateway tool-name repair");
|
|
204
|
-
console.log(` status: ${report.gatewayRepair.status}`);
|
|
205
|
-
console.log(
|
|
206
|
-
|
|
213
|
+
console.log(` status: ${displayValue(report.gatewayRepair.status)}`);
|
|
214
|
+
console.log(
|
|
215
|
+
` tool: ${displayValue(report.gatewayRepair.originalToolName)} -> ${displayValue(report.gatewayRepair.toolName)}`
|
|
216
|
+
);
|
|
217
|
+
console.log(` reason: ${displayValue(report.gatewayRepair.reason)}`);
|
|
207
218
|
console.log("");
|
|
208
219
|
console.log("Run with --json for the full structured result.");
|
|
209
220
|
}
|