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

Function userMessage

packages/opencode/test/cli/run/session-replay.test.ts:6–31  ·  view source on GitHub ↗
(id: string, text: string)

Source from the content-addressed store, hash-verified

4import type { RunProvider } from "@/cli/cmd/run/types"
5
6function userMessage(id: string, text: string): SessionMessages[number] {
7 return {
8 info: {
9 id,
10 sessionID: "session-1",
11 role: "user",
12 time: {
13 created: 1,
14 },
15 agent: "build",
16 model: {
17 providerID: "openai",
18 modelID: "gpt-5",
19 },
20 },
21 parts: [
22 {
23 id: `${id}-text`,
24 sessionID: "session-1",
25 messageID: id,
26 type: "text",
27 text,
28 },
29 ],
30 }
31}
32
33function assistantInfo(
34 id: string,

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected