@botbotgo/better-call 0.1.43 → 0.1.44
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 +9 -3
package/package.json
CHANGED
package/scripts/demo.mjs
CHANGED
|
@@ -113,10 +113,13 @@ function repairDemoStockCall(repairInput = {}) {
|
|
|
113
113
|
? attemptedArgs.symbol
|
|
114
114
|
: "AAPL";
|
|
115
115
|
const normalizedTicker = attemptedTicker.trim().toLowerCase();
|
|
116
|
+
// This demo falls back to AAPL when no ticker-like value is available.
|
|
116
117
|
const ticker =
|
|
117
|
-
normalizedTicker === "
|
|
118
|
+
normalizedTicker === ""
|
|
118
119
|
? "AAPL"
|
|
119
|
-
: normalizedTicker
|
|
120
|
+
: normalizedTicker === "apple"
|
|
121
|
+
? "AAPL"
|
|
122
|
+
: normalizedTicker.toUpperCase();
|
|
120
123
|
|
|
121
124
|
const attemptedMarket = typeof attemptedArgs.market === "string" ? attemptedArgs.market : null;
|
|
122
125
|
const market =
|
|
@@ -202,7 +205,10 @@ try {
|
|
|
202
205
|
const gatewayRepair =
|
|
203
206
|
gatewayResult != null && typeof gatewayResult === "object"
|
|
204
207
|
? gatewayResult
|
|
205
|
-
: createGatewayErrorResult(
|
|
208
|
+
: createGatewayErrorResult(
|
|
209
|
+
"research",
|
|
210
|
+
"repairToolCall returned an invalid result (expected object)."
|
|
211
|
+
);
|
|
206
212
|
|
|
207
213
|
// Missing or empty calls are expected in some demo/error paths; normalize to null for reporting.
|
|
208
214
|
// This demo reports only the first repaired call so the summary stays compact and stable.
|