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

Function partUpdated

packages/opencode/test/acp/event.test.ts:130–156  ·  view source on GitHub ↗
(sessionID: string, messageID: string, partID: string, type: DeltaPartType)

Source from the content-addressed store, hash-verified

128}
129
130function partUpdated(sessionID: string, messageID: string, partID: string, type: DeltaPartType): Event {
131 return {
132 id: `evt_${sessionID}_${messageID}_${partID}`,
133 type: "message.part.updated",
134 properties: {
135 sessionID,
136 time: Date.now(),
137 part:
138 type === "text"
139 ? {
140 id: partID,
141 sessionID,
142 messageID,
143 type: "text",
144 text: "",
145 }
146 : {
147 id: partID,
148 sessionID,
149 messageID,
150 type: "reasoning",
151 text: "",
152 time: { start: Date.now() },
153 },
154 },
155 }
156}
157
158function toolUpdated(part: ToolPart): Event {
159 return {

Callers 1

event.test.tsFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected