@zenning/ai 6.0.30 → 6.0.32

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/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # ai
2
2
 
3
+ ## 6.0.32
4
+
5
+ ### Patch Changes
6
+
7
+ - compaction
8
+
9
+ ## 6.0.31
10
+
11
+ ### Patch Changes
12
+
13
+ - compaction chunks
14
+ - Updated dependencies
15
+ - @zenning/provider@3.0.6
16
+ - @zenning/gateway@3.0.13
17
+ - @zenning/provider-utils@4.0.8
18
+
3
19
  ## 6.0.30
4
20
 
5
21
  ### Patch Changes
package/dist/index.d.mts CHANGED
@@ -2514,6 +2514,11 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2514
2514
  } | {
2515
2515
  type: 'raw';
2516
2516
  rawValue: unknown;
2517
+ } | {
2518
+ type: 'compaction';
2519
+ id: string;
2520
+ encrypted_content: string;
2521
+ providerMetadata?: ProviderMetadata;
2517
2522
  };
2518
2523
 
2519
2524
  /**
@@ -4029,6 +4034,11 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4029
4034
  } | {
4030
4035
  type: 'raw';
4031
4036
  rawValue: unknown;
4037
+ } | {
4038
+ type: 'compaction';
4039
+ id: string;
4040
+ encrypted_content: string;
4041
+ providerMetadata?: ProviderMetadata;
4032
4042
  };
4033
4043
 
4034
4044
  declare const symbol$b: unique symbol;
package/dist/index.d.ts CHANGED
@@ -2514,6 +2514,11 @@ type TextStreamPart<TOOLS extends ToolSet> = {
2514
2514
  } | {
2515
2515
  type: 'raw';
2516
2516
  rawValue: unknown;
2517
+ } | {
2518
+ type: 'compaction';
2519
+ id: string;
2520
+ encrypted_content: string;
2521
+ providerMetadata?: ProviderMetadata;
2517
2522
  };
2518
2523
 
2519
2524
  /**
@@ -4029,6 +4034,11 @@ type SingleRequestTextStreamPart<TOOLS extends ToolSet> = {
4029
4034
  } | {
4030
4035
  type: 'raw';
4031
4036
  rawValue: unknown;
4037
+ } | {
4038
+ type: 'compaction';
4039
+ id: string;
4040
+ encrypted_content: string;
4041
+ providerMetadata?: ProviderMetadata;
4032
4042
  };
4033
4043
 
4034
4044
  declare const symbol$b: unique symbol;
package/dist/index.js CHANGED
@@ -1001,7 +1001,7 @@ var import_provider_utils3 = require("@zenning/provider-utils");
1001
1001
  var import_provider_utils4 = require("@zenning/provider-utils");
1002
1002
 
1003
1003
  // src/version.ts
1004
- var VERSION = true ? "6.0.30" : "0.0.0-test";
1004
+ var VERSION = true ? "6.0.32" : "0.0.0-test";
1005
1005
 
1006
1006
  // src/util/download/download.ts
1007
1007
  var download = async ({ url }) => {
@@ -5221,6 +5221,11 @@ function processUIMessageStream({
5221
5221
  onError == null ? void 0 : onError(new Error(chunk.errorText));
5222
5222
  break;
5223
5223
  }
5224
+ case "compaction": {
5225
+ state.message.parts.push(chunk);
5226
+ write();
5227
+ break;
5228
+ }
5224
5229
  default: {
5225
5230
  if (isDataUIMessageChunk(chunk)) {
5226
5231
  if ((dataPartSchemas == null ? void 0 : dataPartSchemas[chunk.type]) != null) {
@@ -5592,7 +5597,8 @@ function runToolsTransformation({
5592
5597
  case "source":
5593
5598
  case "response-metadata":
5594
5599
  case "error":
5595
- case "raw": {
5600
+ case "raw":
5601
+ case "compaction": {
5596
5602
  controller.enqueue(chunk);
5597
5603
  break;
5598
5604
  }
@@ -6659,6 +6665,10 @@ var DefaultStreamTextResult = class {
6659
6665
  }
6660
6666
  break;
6661
6667
  }
6668
+ case "compaction": {
6669
+ controller.enqueue(chunk);
6670
+ break;
6671
+ }
6662
6672
  default: {
6663
6673
  const exhaustiveCheck = chunkType;
6664
6674
  throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);
@@ -7195,6 +7205,14 @@ var DefaultStreamTextResult = class {
7195
7205
  case "raw": {
7196
7206
  break;
7197
7207
  }
7208
+ case "compaction": {
7209
+ controller.enqueue({
7210
+ type: "compaction",
7211
+ id: part.id,
7212
+ encrypted_content: part.encrypted_content
7213
+ });
7214
+ break;
7215
+ }
7198
7216
  default: {
7199
7217
  const exhaustiveCheck = partType;
7200
7218
  throw new Error(`Unknown chunk type: ${exhaustiveCheck}`);