(part: T)
| 635 | }).pipe(Effect.withSpan("Session.updateMessage")) |
| 636 | |
| 637 | const updatePart = <T extends SessionV1.Part>(part: T): Effect.Effect<T> => |
| 638 | Effect.gen(function* () { |
| 639 | yield* events.publish(SessionV1.Event.PartUpdated, { |
| 640 | sessionID: part.sessionID, |
| 641 | part: structuredClone(part), |
| 642 | time: Date.now(), |
| 643 | }) |
| 644 | return part |
| 645 | }).pipe(Effect.withSpan("Session.updatePart")) |
| 646 | |
| 647 | const getPart: Interface["getPart"] = Effect.fn("Session.getPart")(function* (input) { |
| 648 | const row = yield* db |