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

Function content

packages/opencode/src/session/llm/native-request.ts:102–103  ·  view source on GitHub ↗
(value: ModelMessage["content"])

Source from the content-addressed store, hash-verified

100}
101
102const content = (value: ModelMessage["content"]) =>
103 typeof value === "string" ? [{ type: "text" as const, text: value }] : value.map(contentPart)
104
105const messages = (input: readonly ModelMessage[]) => {
106 const system = input.flatMap((message) => (message.role === "system" ? [SystemPart.make(message.content)] : []))

Callers 1

messagesFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected