feat(id): brand PartID through Drizzle and Zod schemas (#16966)

This commit is contained in:
Kit Langton
2026-03-11 19:40:50 -04:00
committed by GitHub
parent d26c6f80e1
commit 090f636354
21 changed files with 102 additions and 97 deletions

View File

@@ -1,7 +1,7 @@
import { Hono } from "hono"
import { stream } from "hono/streaming"
import { describeRoute, validator, resolver } from "hono-openapi"
import { SessionID, MessageID } from "@/session/schema"
import { SessionID, MessageID, PartID } from "@/session/schema"
import z from "zod"
import { Session } from "../../session"
import { MessageV2 } from "../../session/message-v2"
@@ -677,7 +677,7 @@ export const SessionRoutes = lazy(() =>
z.object({
sessionID: SessionID.zod,
messageID: MessageID.zod,
partID: z.string(),
partID: PartID.zod,
}),
),
async (c) => {
@@ -712,7 +712,7 @@ export const SessionRoutes = lazy(() =>
z.object({
sessionID: SessionID.zod,
messageID: MessageID.zod,
partID: z.string(),
partID: PartID.zod,
}),
),
validator("json", MessageV2.Part),