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

Function assistant

packages/opencode/test/cli/run/session-data.test.ts:16–36  ·  view source on GitHub ↗
(id: string, extra: Record<string, unknown> = {})

Source from the content-addressed store, hash-verified

14}
15
16function assistant(id: string, extra: Record<string, unknown> = {}) {
17 return {
18 type: "message.updated",
19 properties: {
20 sessionID: "session-1",
21 info: {
22 id,
23 role: "assistant",
24 providerID: "openai",
25 modelID: "gpt-5",
26 tokens: {
27 input: 1,
28 output: 1,
29 reasoning: 0,
30 cache: { read: 0, write: 0 },
31 },
32 ...extra,
33 },
34 },
35 }
36}
37
38function user(id: string) {
39 return {

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected