MCPcopy Create free account
hub / github.com/anomalyco/opencode / toModelOutput

Function toModelOutput

packages/core/src/tool/apply-patch.ts:37–43  ·  view source on GitHub ↗
(output: Output)

Source from the content-addressed store, hash-verified

35export type Output = typeof Output.Type
36
37export const toModelOutput = (output: Output) =>
38 [
39 "Applied patch sequentially:",
40 ...output.applied.map(
41 (item) => `${item.type === "add" ? "A" : item.type === "delete" ? "D" : "M"} ${item.resource}`,
42 ),
43 ].join("\n")
44
45type Prepared =
46 | (Extract<Patch.Hunk, { readonly type: "add" | "delete" }> & {

Callers 1

apply-patch.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected