MCPcopy Index your code
hub / github.com/anomalyco/opencode / userMessage

Function userMessage

packages/opencode/test/cli/run/session.shared.test.ts:21–38  ·  view source on GitHub ↗
(id: string, parts: Message["parts"], variant = "high")

Source from the content-addressed store, hash-verified

19}
20
21function userMessage(id: string, parts: Message["parts"], variant = "high"): Message {
22 return {
23 info: {
24 id,
25 sessionID: "session-1",
26 role: "user",
27 time: {
28 created: 1,
29 },
30 agent: "build",
31 model: {
32 ...model,
33 variant,
34 },
35 },
36 parts,
37 }
38}
39
40function assistantMessage(id: string, parts: Message["parts"]): Message {
41 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected