mirror of
https://github.com/anomalyco/opencode.git
synced 2026-05-20 01:12:15 +00:00
fix(push-relay): update Session.get to use direct DB access after Effect migration
Some checks are pending
Deploy to apn-relay / porter-deploy (push) Waiting to run
Some checks are pending
Deploy to apn-relay / porter-deploy (push) Waiting to run
This commit is contained in:
parent
bda7a488d4
commit
d18891523d
1 changed files with 9 additions and 3 deletions
|
|
@ -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)) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue