mirror of
https://github.com/anomalyco/opencode.git
synced 2026-07-17 12:56:41 +02:00
fix(push-relay): update Session.get to use direct DB access after Effect migration
This commit is contained in:
@@ -326,10 +326,16 @@ async function notify(input: { type: Type; sessionID: string }): Promise<Notify>
|
||||
}
|
||||
|
||||
try {
|
||||
const [{ Session }, { MessageV2 }] = await Promise.all([import("@/session"), import("@/session/message-v2")])
|
||||
const [{ Session }, { MessageV2 }, { SessionTable }, { Database, eq }] = await Promise.all([
|
||||
import("@/session"),
|
||||
import("@/session/message-v2"),
|
||||
import("@/session/session.sql"),
|
||||
import("@/storage/db"),
|
||||
])
|
||||
const sessionID = SessionID.make(input.sessionID)
|
||||
const session = await Session.get(sessionID)
|
||||
out.title = session.title
|
||||
const row = Database.use((db) => db.select().from(SessionTable).where(eq(SessionTable.id, sessionID)).get())
|
||||
const session = row ? Session.fromRow(row) : undefined
|
||||
out.title = session?.title
|
||||
|
||||
let latestUser: string | undefined
|
||||
for await (const msg of MessageV2.stream(sessionID)) {
|
||||
|
||||
Reference in New Issue
Block a user