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

Method fetchPartMetadata

packages/opencode/src/acp/event.ts:201–218  ·  view source on GitHub ↗
(sessionId: string, cwd: string, messageId: string, partId: string)

Source from the content-addressed store, hash-verified

199 }
200
201 private async fetchPartMetadata(sessionId: string, cwd: string, messageId: string, partId: string) {
202 const message = await this.input.sdk.session
203 .message(
204 {
205 sessionID: sessionId,
206 messageID: messageId,
207 directory: cwd,
208 },
209 { throwOnError: true },
210 )
211 .then((response) => response.data)
212 .catch(() => undefined)
213 if (!message) return
214
215 const part = message.parts.find((item) => item.id === partId)
216 if (!part) return
217 return await this.recordFetchedPart(sessionId, message, part)
218 }
219
220 private async recordFetchedPart(sessionId: string, message: SessionMessageResponse, part: Part) {
221 return await Effect.runPromise(

Callers 1

handlePartDeltaMethod · 0.95

Calls 3

recordFetchedPartMethod · 0.95
findMethod · 0.65
messageMethod · 0.45

Tested by

no test coverage detected