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

Function assistantInfo

packages/opencode/test/cli/run/session-replay.test.ts:33–67  ·  view source on GitHub ↗
(
  id: string,
  input: {
    parentID?: string
    modelID?: string
    providerID?: string
    time?: { created: number; completed?: number }
  } = {},
)

Source from the content-addressed store, hash-verified

31}
32
33function assistantInfo(
34 id: string,
35 input: {
36 parentID?: string
37 modelID?: string
38 providerID?: string
39 time?: { created: number; completed?: number }
40 } = {},
41) {
42 return {
43 id,
44 sessionID: "session-1",
45 role: "assistant" as const,
46 time: input.time ?? { created: 2 },
47 parentID: input.parentID ?? "msg-user-1",
48 modelID: input.modelID ?? "gpt-5",
49 providerID: input.providerID ?? "openai",
50 mode: "chat",
51 agent: "build",
52 path: {
53 cwd: "/tmp",
54 root: "/tmp",
55 },
56 cost: 0,
57 tokens: {
58 input: 1,
59 output: 1,
60 reasoning: 0,
61 cache: {
62 read: 0,
63 write: 0,
64 },
65 },
66 }
67}
68
69function assistantMessage(
70 id: string,

Callers 3

assistantMessageFunction · 0.70
runningToolMessageFunction · 0.70
shellAssistantMessageFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected