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

Function createTextPart

packages/opencode/test/cli/github-action.test.ts:8–16  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

6
7// Helper to create minimal valid parts
8function createTextPart(text: string): SessionV1.Part {
9 return {
10 id: PartID.ascending(),
11 sessionID: SessionID.make("ses_test"),
12 messageID: MessageID.make("msg_test"),
13 type: "text" as const,
14 text,
15 }
16}
17
18function createReasoningPart(text: string): SessionV1.Part {
19 return {

Callers 1

Calls 1

makeMethod · 0.45

Tested by

no test coverage detected