File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -162,7 +162,7 @@ schema module with a clear domain.
162162- [ ] ` src/control-plane/schema.ts `
163163- [ ] ` src/permission/schema.ts `
164164- [ ] ` src/project/schema.ts `
165- - [ ] ` src/provider/schema.ts `
165+ - [x ] ` src/provider/schema.ts `
166166- [ ] ` src/pty/schema.ts `
167167- [ ] ` src/question/schema.ts `
168168- [ ] ` src/session/schema.ts `
Original file line number Diff line number Diff line change 11import { Schema } from "effect"
2- import z from "zod"
32
3+ import { zod } from "@/util/effect-zod"
44import { withStatics } from "@/util/schema"
55
66const providerIdSchema = Schema . String . pipe ( Schema . brand ( "ProviderID" ) )
@@ -9,7 +9,7 @@ export type ProviderID = typeof providerIdSchema.Type
99
1010export const ProviderID = providerIdSchema . pipe (
1111 withStatics ( ( schema : typeof providerIdSchema ) => ( {
12- zod : z . string ( ) . pipe ( z . custom < ProviderID > ( ) ) ,
12+ zod : zod ( schema ) ,
1313 // Well-known providers
1414 opencode : schema . make ( "opencode" ) ,
1515 anthropic : schema . make ( "anthropic" ) ,
@@ -30,7 +30,7 @@ const modelIdSchema = Schema.String.pipe(Schema.brand("ModelID"))
3030export type ModelID = typeof modelIdSchema . Type
3131
3232export const ModelID = modelIdSchema . pipe (
33- withStatics ( ( _schema : typeof modelIdSchema ) => ( {
34- zod : z . string ( ) . pipe ( z . custom < ModelID > ( ) ) ,
33+ withStatics ( ( schema : typeof modelIdSchema ) => ( {
34+ zod : zod ( schema ) ,
3535 } ) ) ,
3636)
You can’t perform that action at this time.
0 commit comments