(sessionId: string, cwd: string, messageId: string, partId: string)
| 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( |
no test coverage detected