dsh-github-copilot 0.4.0-alpha.52 → 0.4.0-alpha.53

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/client.js CHANGED
@@ -6018,7 +6018,11 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6018
6018
  ...event.data.preference === void 0 ? {} : { preference: event.data.preference },
6019
6019
  taskClass: event.data.taskClass,
6020
6020
  reason: event.data.reason,
6021
- candidateCount: event.data.candidateCount
6021
+ candidateCount: event.data.candidateCount,
6022
+ ...sequence(event.data.fittingCandidateCount) ? { fittingCandidateCount: event.data.fittingCandidateCount } : {},
6023
+ ...sequence(event.data.estimatedInputTokens) ? { estimatedInputTokens: event.data.estimatedInputTokens } : {},
6024
+ ...sequence(event.data.selectedInputBudget) ? { selectedInputBudget: event.data.selectedInputBudget } : {},
6025
+ ...typeof event.data.inputFitDiagnostic === "string" ? { inputFitDiagnostic: event.data.inputFitDiagnostic } : {}
6022
6026
  }
6023
6027
  };
6024
6028
  }
@@ -6043,7 +6047,7 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6043
6047
  if (scope !== "turn") return null;
6044
6048
  const state = context.state ?? context.matches.map((match) => attribution(match.event)).find((value) => value !== void 0);
6045
6049
  if (state === void 0) return null;
6046
- if (previous?.turn === state.turn && previous.key === "github-copilot-auto-model-attribution" && previous.value.provider === state.value.provider && previous.value.model === state.value.model && previous.value.reason === state.value.reason && previous.value.taskClass === state.value.taskClass && previous.value.preference === state.value.preference && previous.value.candidateCount === state.value.candidateCount) return previous;
6050
+ if (previous?.turn === state.turn && previous.key === "github-copilot-auto-model-attribution" && previous.value.provider === state.value.provider && previous.value.model === state.value.model && previous.value.reason === state.value.reason && previous.value.taskClass === state.value.taskClass && previous.value.preference === state.value.preference && previous.value.candidateCount === state.value.candidateCount && previous.value.fittingCandidateCount === state.value.fittingCandidateCount && previous.value.inputFitDiagnostic === state.value.inputFitDiagnostic) return previous;
6047
6051
  return {
6048
6052
  kind: "turn",
6049
6053
  turn: state.turn,
@@ -6082,7 +6086,9 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
6082
6086
  document.head.appendChild(style);
6083
6087
  }
6084
6088
  function reasonText(value) {
6085
- return `${value.reason === "short-text-turn" ? "Short text turn" : value.reason === "large-structured-turn" ? "Large structured turn" : value.reason === "image-capability" ? "Image-capable model required" : "Standard turn"}; ${value.preference ?? "balance"} capacity preference; selected from ${value.candidateCount} eligible account model${value.candidateCount === 1 ? "" : "s"}.`;
6089
+ const reason = value.reason === "short-text-turn" ? "Short text turn" : value.reason === "large-structured-turn" ? "Large structured turn" : value.reason === "image-capability" ? "Image-capable model required" : "Standard turn";
6090
+ const fitInfo = value.fittingCandidateCount !== void 0 && value.fittingCandidateCount < value.candidateCount ? `; ${value.fittingCandidateCount} of ${value.candidateCount} models can fit turn context` : "";
6091
+ return `${reason}; ${value.preference ?? "balance"} capacity preference; selected from ${value.candidateCount} eligible account model${value.candidateCount === 1 ? "" : "s"}${fitInfo}.`;
6086
6092
  }
6087
6093
  function Attribution(props) {
6088
6094
  const source = sourceOf(props);