snow-flow 10.0.205 → 10.0.206

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "$schema": "https://json.schemastore.org/package.json",
3
- "version": "10.0.205",
3
+ "version": "10.0.206",
4
4
  "name": "snow-flow",
5
5
  "description": "Snow-Flow - ServiceNow Multi-Agent Development Framework powered by AI",
6
6
  "license": "Elastic-2.0",
@@ -3,6 +3,7 @@ import { Installation } from "@/installation"
3
3
  import { Provider } from "@/provider/provider"
4
4
  import { Log } from "@/util/log"
5
5
  import {
6
+ NoOutputGeneratedError,
6
7
  streamText,
7
8
  wrapLanguageModel,
8
9
  type ModelMessage,
@@ -189,6 +190,10 @@ export namespace LLM {
189
190
 
190
191
  return streamText({
191
192
  onError(error) {
193
+ if (NoOutputGeneratedError.isInstance(error.error)) {
194
+ l.debug("stream aborted before output was generated")
195
+ return
196
+ }
192
197
  l.error("stream error", {
193
198
  error,
194
199
  })
@@ -2,7 +2,14 @@ import { BusEvent } from "@/bus/bus-event"
2
2
  import { Bus } from "@/bus"
3
3
  import z from "zod"
4
4
  import { NamedError } from "@opencode-ai/util/error"
5
- import { APICallError, convertToModelMessages, LoadAPIKeyError, type ModelMessage, type UIMessage } from "ai"
5
+ import {
6
+ APICallError,
7
+ convertToModelMessages,
8
+ LoadAPIKeyError,
9
+ NoOutputGeneratedError,
10
+ type ModelMessage,
11
+ type UIMessage,
12
+ } from "ai"
6
13
  import { Identifier } from "../id/id"
7
14
  import { LSP } from "../lsp"
8
15
  import { Snapshot } from "@/snapshot"
@@ -805,6 +812,13 @@ export namespace MessageV2 {
805
812
  cause: e,
806
813
  },
807
814
  ).toObject()
815
+ case NoOutputGeneratedError.isInstance(e):
816
+ return new MessageV2.AbortedError(
817
+ { message: e.message || "Stream interrupted before any output was generated" },
818
+ {
819
+ cause: e,
820
+ },
821
+ ).toObject()
808
822
  case MessageV2.OutputLengthError.isInstance(e):
809
823
  return e
810
824
  case LoadAPIKeyError.isInstance(e):