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

Function updatePart

packages/opencode/src/session/session.ts:637–645  ·  view source on GitHub ↗
(part: T)

Source from the content-addressed store, hash-verified

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

Callers 1

session.tsFile · 0.85

Calls 1

publishMethod · 0.45

Tested by

no test coverage detected