@heylemon/lemonade 0.7.0 → 0.7.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.
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "0.7.0",
3
- "commit": "105eba9ae37816020018df1fa07a598f417517a7",
4
- "builtAt": "2026-03-02T05:54:52.350Z"
2
+ "version": "0.7.1",
3
+ "commit": "48d0024679279b03a33236c522912a76460fa093",
4
+ "builtAt": "2026-03-02T07:42:48.629Z"
5
5
  }
@@ -1 +1 @@
1
- 155aed5143b97b9dd8e4548c7aa0a4bbde8088ee944fe179bb596cc327b75752
1
+ 2a4035f52fce4d9fe44c89827996dcd95edfd7a57b34b64fd6cabe08241c4acf
@@ -286,7 +286,17 @@ export async function handleOpenAiHttpRequest(req, res, opts) {
286
286
  }, defaultRuntime, deps);
287
287
  if (closed)
288
288
  return;
289
- if (!sawAssistantDelta) {
289
+ const payloads = result?.payloads;
290
+ const payloadContent = Array.isArray(payloads) && payloads.length > 0
291
+ ? payloads
292
+ .map((p) => (typeof p.text === "string" ? p.text : ""))
293
+ .filter(Boolean)
294
+ .join("\n\n")
295
+ : "";
296
+ // Send payload content if nothing was streamed, or if the payloads
297
+ // contain the full response (agent may stream partial narration then
298
+ // return the complete answer in payloads after tool calls).
299
+ if (!sawAssistantDelta || payloadContent.length > 0) {
290
300
  if (!wroteRole) {
291
301
  wroteRole = true;
292
302
  writeSse(res, {
@@ -297,13 +307,7 @@ export async function handleOpenAiHttpRequest(req, res, opts) {
297
307
  choices: [{ index: 0, delta: { role: "assistant" } }],
298
308
  });
299
309
  }
300
- const payloads = result?.payloads;
301
- const content = Array.isArray(payloads) && payloads.length > 0
302
- ? payloads
303
- .map((p) => (typeof p.text === "string" ? p.text : ""))
304
- .filter(Boolean)
305
- .join("\n\n")
306
- : "No response from Lemonade.";
310
+ const content = payloadContent || "No response from Lemonade.";
307
311
  sawAssistantDelta = true;
308
312
  writeSse(res, {
309
313
  id: runId,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@heylemon/lemonade",
3
- "version": "0.7.0",
3
+ "version": "0.7.1",
4
4
  "description": "AI gateway CLI for Lemon - local AI assistant with integrations",
5
5
  "publishConfig": {
6
6
  "access": "restricted"