@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.
@@ -2470,7 +2470,7 @@ async function convertToOpenAIResponsesInput({
2470
2470
  hasShellTool = false,
2471
2471
  hasApplyPatchTool = false
2472
2472
  }) {
2473
- var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m;
2473
+ var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
2474
2474
  const input = [];
2475
2475
  const warnings = [];
2476
2476
  const processedApprovalIds = /* @__PURE__ */ new Set();
@@ -2563,8 +2563,17 @@ async function convertToOpenAIResponsesInput({
2563
2563
  });
2564
2564
  break;
2565
2565
  }
2566
+ case "compaction": {
2567
+ const id = (_d = (_c = part.providerOptions) == null ? void 0 : _c[providerOptionsName]) == null ? void 0 : _d.itemId;
2568
+ input.push({
2569
+ role: "assistant",
2570
+ content: [{ type: "compaction", encrypted_content: part.encrypted_content }],
2571
+ id
2572
+ });
2573
+ break;
2574
+ }
2566
2575
  case "tool-call": {
2567
- 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;
2576
+ 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;
2568
2577
  if (part.providerExecuted) {
2569
2578
  if (store && id != null) {
2570
2579
  input.push({ type: "item_reference", id });
@@ -2631,7 +2640,7 @@ async function convertToOpenAIResponsesInput({
2631
2640
  break;
2632
2641
  }
2633
2642
  if (store) {
2634
- const itemId = (_j = (_i = (_h = part.providerMetadata) == null ? void 0 : _h[providerOptionsName]) == null ? void 0 : _i.itemId) != null ? _j : part.toolCallId;
2643
+ const itemId = (_l = (_k = (_j = part.providerMetadata) == null ? void 0 : _j[providerOptionsName]) == null ? void 0 : _k.itemId) != null ? _l : part.toolCallId;
2635
2644
  input.push({ type: "item_reference", id: itemId });
2636
2645
  } else {
2637
2646
  warnings.push({
@@ -2722,7 +2731,7 @@ async function convertToOpenAIResponsesInput({
2722
2731
  }
2723
2732
  const output = part.output;
2724
2733
  if (output.type === "execution-denied") {
2725
- const approvalId = (_l = (_k = output.providerOptions) == null ? void 0 : _k.openai) == null ? void 0 : _l.approvalId;
2734
+ const approvalId = (_n = (_m = output.providerOptions) == null ? void 0 : _m.openai) == null ? void 0 : _n.approvalId;
2726
2735
  if (approvalId) {
2727
2736
  continue;
2728
2737
  }
@@ -2781,7 +2790,7 @@ async function convertToOpenAIResponsesInput({
2781
2790
  contentValue = output.value;
2782
2791
  break;
2783
2792
  case "execution-denied":
2784
- contentValue = (_m = output.reason) != null ? _m : "Tool execution denied.";
2793
+ contentValue = (_o = output.reason) != null ? _o : "Tool execution denied.";
2785
2794
  break;
2786
2795
  case "json":
2787
2796
  case "error-json":