dsh-github-copilot 0.4.0-alpha.62 → 0.4.0-alpha.64

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/lib/index.js CHANGED
@@ -1646,7 +1646,7 @@ let GitHubCopilotUsageController = (() => {
1646
1646
  //#endregion
1647
1647
  //#region package.json
1648
1648
  var name$1 = "dsh-github-copilot";
1649
- var version = "0.4.0-alpha.62";
1649
+ var version = "0.4.0-alpha.64";
1650
1650
  //#endregion
1651
1651
  //#region lib/types/probe.js
1652
1652
  /**
@@ -5195,9 +5195,20 @@ function isRecord$1(value) {
5195
5195
  function nonemptyString(value) {
5196
5196
  return typeof value === "string" && value.trim().length > 0;
5197
5197
  }
5198
+ function emptyReasoningShell(item) {
5199
+ return item.type === "reasoning" && nonemptyString(item.id) && (item.status === void 0 || item.status === "completed") && Array.isArray(item.summary) && item.summary.length === 0 && (item.content === void 0 || Array.isArray(item.content) && item.content.length === 0) && item.encrypted_content === void 0 && Object.keys(item).every((key) => [
5200
+ "type",
5201
+ "id",
5202
+ "status",
5203
+ "summary",
5204
+ "content",
5205
+ "encrypted_content"
5206
+ ].includes(key));
5207
+ }
5198
5208
  function normalizeItem(item) {
5199
5209
  if (!isRecord$1(item)) throw new CopilotResponsesReplayError("invalid-payload");
5200
5210
  if (item.type === "item_reference") throw new CopilotResponsesReplayError();
5211
+ if (emptyReasoningShell(item)) return void 0;
5201
5212
  if ((item.type === "message" || item.type === void 0) && (item.role === "user" || item.role === "system" || item.role === "developer")) return item;
5202
5213
  if (!Object.hasOwn(item, "id") || item.id === void 0) return item;
5203
5214
  if (!nonemptyString(item.id)) throw new CopilotResponsesReplayError("invalid-payload");
@@ -5217,7 +5228,7 @@ function normalizeCopilotResponsesPayload(payload) {
5217
5228
  for (const item of payload.input) {
5218
5229
  const normalized = normalizeItem(item);
5219
5230
  changed ||= normalized !== item;
5220
- input.push(normalized);
5231
+ if (normalized !== void 0) input.push(normalized);
5221
5232
  }
5222
5233
  return changed ? {
5223
5234
  ...payload,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dsh-github-copilot",
3
3
  "description": "DSH companion for GitHub Copilot sign-in, account-aware model profiles, tool compatibility, and provider-hosted search.",
4
- "version": "0.4.0-alpha.62",
4
+ "version": "0.4.0-alpha.64",
5
5
  "publishConfig": {
6
6
  "access": "public",
7
7
  "registry": "https://registry.npmjs.org/",