refactor(schema): normalize module patterns (#33770)

This commit is contained in:
Kit Langton
2026-06-25 17:42:22 +02:00
committed by GitHub
parent 73d04c51cd
commit ec48f9848a
50 changed files with 204 additions and 202 deletions
+3 -3
View File
@@ -2,14 +2,14 @@ import { Schema } from "effect"
import { Identifier } from "@/id/id"
import { SessionV2 } from "@opencode-ai/core/session"
import { withStatics } from "@opencode-ai/core/schema"
import { statics } from "@opencode-ai/core/schema"
export const SessionID = SessionV2.ID
export type SessionID = Schema.Schema.Type<typeof SessionID>
export const MessageID = Schema.String.check(Schema.isStartsWith("msg")).pipe(
Schema.brand("MessageID"),
withStatics((s) => ({
statics((s) => ({
ascending: (id?: string) => s.make(Identifier.ascending("message", id)),
})),
)
@@ -18,7 +18,7 @@ export type MessageID = Schema.Schema.Type<typeof MessageID>
export const PartID = Schema.String.check(Schema.isStartsWith("prt")).pipe(
Schema.brand("PartID"),
withStatics((s) => ({
statics((s) => ({
ascending: (id?: string) => s.make(Identifier.ascending("part", id)),
})),
)