feat(id): brand PartID through Drizzle and Zod schemas (#16966)
This commit is contained in:
parent
d26c6f80e1
commit
090f636354
21 changed files with 102 additions and 97 deletions
|
|
@ -2,7 +2,7 @@ import { describe, expect, test } from "bun:test"
|
|||
import { APICallError } from "ai"
|
||||
import { MessageV2 } from "../../src/session/message-v2"
|
||||
import type { Provider } from "../../src/provider/provider"
|
||||
import { SessionID, MessageID } from "../../src/session/schema"
|
||||
import { SessionID, MessageID, PartID } from "../../src/session/schema"
|
||||
|
||||
const sessionID = SessionID.make("session")
|
||||
const model: Provider.Model = {
|
||||
|
|
@ -98,7 +98,7 @@ function assistantInfo(
|
|||
|
||||
function basePart(messageID: string, id: string) {
|
||||
return {
|
||||
id,
|
||||
id: PartID.make(id),
|
||||
sessionID,
|
||||
messageID: MessageID.make(messageID),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue