@codehz/ai 0.4.0 → 0.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.
package/dist/index.mjs CHANGED
@@ -2772,7 +2772,7 @@ var ChatCompletionsAdapter = class extends AdapterBase {
2772
2772
  }
2773
2773
  }
2774
2774
  if (!gate.completed && (hasMessageStarted || hasReasoningStarted || pendingToolCalls.size > 0)) {
2775
- yield factory.responseWarning("Stream ended without a finish_reason", "INCOMPLETE_STREAM");
2775
+ yield factory.responseWarning("Stream ended without a finish_reason", WarningCode.STREAM_INCOMPLETE);
2776
2776
  const { events, assistantReplayMessage } = finalizePendingTurn();
2777
2777
  for (const event of events) yield event;
2778
2778
  yield* emitCompleted(void 0, assistantReplayMessage, responseId);
@@ -3038,7 +3038,7 @@ var OllamaAdapter = class extends AdapterBase {
3038
3038
  }
3039
3039
  }
3040
3040
  if (!gate.completed && (hasMessageStarted || pendingToolCalls.length > 0)) {
3041
- yield factory.responseWarning("Stream ended without a done signal", "INCOMPLETE_STREAM");
3041
+ yield factory.responseWarning("Stream ended without a done signal", WarningCode.STREAM_INCOMPLETE);
3042
3042
  if (hasMessageStarted) {
3043
3043
  const message = messageItem([textBlock(accumulatedContent)], { id: currentMessageId });
3044
3044
  yield factory.messageCompleted(currentMessageId);