MCPcopy Create free account
hub / github.com/getsentry/XcodeBuildMCP / serializeNextSteps

Function serializeNextSteps

src/utils/responses/next-step-formatting.ts:105–119  ·  view source on GitHub ↗
(
  nextSteps: readonly NextStep[] | undefined,
  options: FormatNextStepOptions,
)

Source from the content-addressed store, hash-verified

103}
104
105export function serializeNextSteps(
106 nextSteps: readonly NextStep[] | undefined,
107 options: FormatNextStepOptions,
108): string[] | undefined {
109 if (!nextSteps || nextSteps.length === 0) {
110 return undefined;
111 }
112
113 const serialized = [...nextSteps]
114 .sort((a, b) => (a.priority ?? 0) - (b.priority ?? 0))
115 .map((step) => formatNextStep(step, options))
116 .filter((step) => step.trim().length > 0);
117
118 return serialized.length > 0 ? serialized : undefined;
119}

Callers 1

toStructuredEnvelopeFunction · 0.90

Calls 1

formatNextStepFunction · 0.85

Tested by

no test coverage detected