refactor(core): remove identity schema pipes (#45624)

This commit is contained in:
Kit Langton
2026-08-27 18:52:20 -04:00
committed by GitHub
Unverified
parent 3288a12528
commit 991a0d05b5
+5 -5
View File
@@ -4,7 +4,7 @@ import { Schema } from "effect"
export const Disabled = Schema.Struct({
disabled: Schema.Literal(true),
}).pipe((schema) => schema)
})
export const Entry = Schema.Union([
Disabled,
@@ -15,7 +15,7 @@ export const Entry = Schema.Union([
env: Schema.optional(Schema.Record(Schema.String, Schema.String)),
initialization: Schema.optional(Schema.Record(Schema.String, Schema.Unknown)),
}),
]).pipe((schema) => schema)
])
// Keep this list aligned with the builtin servers in opencode's LSP runtime.
// Custom servers must declare extensions because the runtime cannot infer them.
@@ -73,8 +73,8 @@ export const requiresExtensionsForCustomServers = Schema.makeFilter<
return ok ? undefined : "For custom LSP servers, 'extensions' array is required."
})
export const Info = Schema.Union([Schema.Boolean, Schema.Record(Schema.String, Entry)])
.check(requiresExtensionsForCustomServers)
.pipe((schema) => schema)
export const Info = Schema.Union([Schema.Boolean, Schema.Record(Schema.String, Entry)]).check(
requiresExtensionsForCustomServers,
)
export type Info = Schema.Schema.Type<typeof Info>