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

Function parts

packages/opencode/src/session/message-v2.ts:492–504  ·  view source on GitHub ↗
(messageID: MessageID)

Source from the content-addressed store, hash-verified

490}
491
492export function parts(messageID: MessageID) {
493 return Effect.gen(function* () {
494 const { db } = yield* Database.Service
495 const rows = yield* db
496 .select()
497 .from(PartTable)
498 .where(eq(PartTable.message_id, messageID))
499 .orderBy(PartTable.id)
500 .all()
501 .pipe(Effect.orDie)
502 return rows.map(part)
503 })
504}
505
506export const get = Effect.fn("MessageV2.get")(function* (input: { sessionID: SessionID; messageID: MessageID }) {
507 const { db } = yield* Database.Service

Callers 1

message-v2.tsFile · 0.70

Calls 6

eqFunction · 0.85
allMethod · 0.45
orderByMethod · 0.45
whereMethod · 0.45
fromMethod · 0.45
selectMethod · 0.45

Tested by

no test coverage detected