mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-19 00:03:13 +03:00
refactor(core): remove identity schema pipes (#45624)
This commit is contained in:
committed by
GitHub
Unverified
parent
3288a12528
commit
991a0d05b5
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user