MCPcopy Index your code
hub / github.com/di-sukharev/opencommit / formatNewContent

Function formatNewContent

out/cli.cjs:79285–79299  ·  view source on GitHub ↗
(request3)

Source from the content-addressed store, hash-verified

79283 } else if (input.parts) {
79284 if (!input.role) {
79285 return { role: "system", parts: input.parts };
79286 } else {
79287 return input;
79288 }
79289 }
79290}
79291function formatNewContent(request3) {
79292 let newParts = [];
79293 if (typeof request3 === "string") {
79294 newParts = [{ text: request3 }];
79295 } else {
79296 for (const partOrString of request3) {
79297 if (typeof partOrString === "string") {
79298 newParts.push({ text: partOrString });
79299 } else {
79300 newParts.push(partOrString);
79301 }
79302 }

Callers 5

formatCountTokensInputFunction · 0.85
formatEmbedContentInputFunction · 0.85
sendMessageMethod · 0.85
sendMessageStreamMethod · 0.85

Calls 2

pushMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…