Source workspace path pattern (#26632)

This commit is contained in:
Kit Langton
2026-05-09 23:02:31 -04:00
committed by GitHub
parent 235a86fb60
commit f220f02a2f
4 changed files with 7 additions and 11 deletions

View File

@@ -4,9 +4,9 @@ import { Identifier } from "@/id/id"
import { zod, ZodOverride } from "@opencode-ai/core/effect-zod"
import { withStatics } from "@opencode-ai/core/schema"
const workspaceIdSchema = Schema.String.annotate({ [ZodOverride]: Identifier.schema("workspace") }).pipe(
Schema.brand("WorkspaceID"),
)
const workspaceIdSchema = Schema.String.check(Schema.isStartsWith("wrk"))
.annotate({ [ZodOverride]: Identifier.schema("workspace") })
.pipe(Schema.brand("WorkspaceID"))
export type WorkspaceID = typeof workspaceIdSchema.Type