ispbills-icli 8.4.0 → 8.4.1

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/client.js +5 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "ispbills-icli",
3
- "version": "8.4.0",
3
+ "version": "8.4.1",
4
4
  "description": "iCli — IspBills AI network engineer in your terminal",
5
5
  "keywords": [
6
6
  "ispbills",
package/src/client.js CHANGED
@@ -153,6 +153,10 @@ export async function streamChat(cfg, messages, options = {}) {
153
153
 
154
154
  const reply = finalResult?.reply ?? {};
155
155
  const meta = finalResult?._meta ?? {};
156
- const text = reply.text || answerText || '';
156
+ // Prefer whichever is longer: the final parsed reply.text or the text we
157
+ // streamed live. Guards against any server-side cap silently shortening the
158
+ // committed answer below what the operator already saw stream by.
159
+ const finalText = reply.text || '';
160
+ const text = finalText.length >= answerText.length ? finalText : answerText;
157
161
  return { reply, text, meta };
158
162
  }