@zenning/openai 3.0.5 → 3.0.6

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.
@@ -2491,7 +2491,7 @@ async function convertToOpenAIResponsesInput({
2491
2491
  hasShellTool = false,
2492
2492
  hasApplyPatchTool = false
2493
2493
  }) {
2494
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2494
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
2495
2495
  const input = [];
2496
2496
  const warnings = [];
2497
2497
  const processedApprovalIds = /* @__PURE__ */ new Set();
@@ -2584,8 +2584,17 @@ async function convertToOpenAIResponsesInput({
2584
2584
  });
2585
2585
  break;
2586
2586
  }
2587
+ case "compaction": {
2588
+ const id = (_d = (_c = part.providerOptions) == null ? void 0 : _c[providerOptionsName]) == null ? void 0 : _d.itemId;
2589
+ input.push({
2590
+ role: "assistant",
2591
+ content: [{ type: "compaction", encrypted_content: part.encrypted_content }],
2592
+ id
2593
+ });
2594
+ break;
2595
+ }
2587
2596
  case "tool-call": {
2588
- const id = (_g = (_d = (_c = part.providerOptions) == null ? void 0 : _c[providerOptionsName]) == null ? void 0 : _d.itemId) != null ? _g : (_f = (_e = part.providerMetadata) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.itemId;
2597
+ const id = (_i = (_f = (_e = part.providerOptions) == null ? void 0 : _e[providerOptionsName]) == null ? void 0 : _f.itemId) != null ? _i : (_h = (_g = part.providerMetadata) == null ? void 0 : _g[providerOptionsName]) == null ? void 0 : _h.itemId;
2589
2598
  if (part.providerExecuted) {
2590
2599
  if (store && id != null) {
2591
2600
  input.push({ type: "item_reference", id });
@@ -2652,7 +2661,7 @@ async function convertToOpenAIResponsesInput({
2652
2661
  break;
2653
2662
  }
2654
2663
  if (store) {
2655
- const itemId = (_j = (_i = (_h = part.providerMetadata) == null ? void 0 : _h[providerOptionsName]) == null ? void 0 : _i.itemId) != null ? _j : part.toolCallId;
2664
+ const itemId = (_l = (_k = (_j = part.providerMetadata) == null ? void 0 : _j[providerOptionsName]) == null ? void 0 : _k.itemId) != null ? _l : part.toolCallId;
2656
2665
  input.push({ type: "item_reference", id: itemId });
2657
2666
  } else {
2658
2667
  warnings.push({
@@ -2743,7 +2752,7 @@ async function convertToOpenAIResponsesInput({
2743
2752
  }
2744
2753
  const output = part.output;
2745
2754
  if (output.type === "execution-denied") {
2746
- const approvalId = (_l = (_k = output.providerOptions) == null ? void 0 : _k.openai) == null ? void 0 : _l.approvalId;
2755
+ const approvalId = (_n = (_m = output.providerOptions) == null ? void 0 : _m.openai) == null ? void 0 : _n.approvalId;
2747
2756
  if (approvalId) {
2748
2757
  continue;
2749
2758
  }
@@ -2802,7 +2811,7 @@ async function convertToOpenAIResponsesInput({
2802
2811
  contentValue = output.value;
2803
2812
  break;
2804
2813
  case "execution-denied":
2805
- contentValue = (_m = output.reason) != null ? _m : "Tool execution denied.";
2814
+ contentValue = (_o = output.reason) != null ? _o : "Tool execution denied.";
2806
2815
  break;
2807
2816
  case "json":
2808
2817
  case "error-json":