refactor(bus): migrate BusEvent to Effect Schema (#24040)

This commit is contained in:
Kit Langton 2026-04-23 15:37:44 -04:00 committed by GitHub
parent 0590452456
commit cd93533b1f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
37 changed files with 281 additions and 260 deletions

View file

@ -8,6 +8,7 @@ import { Log } from "../util"
import { Process } from "../util"
import { LANGUAGE_EXTENSIONS } from "./language"
import z from "zod"
import { Schema } from "effect"
import type * as LSPServer from "./server"
import { NamedError } from "@opencode-ai/shared/util/error"
import { withTimeout } from "../util/timeout"
@ -41,9 +42,9 @@ export const InitializeError = NamedError.create(
export const Event = {
Diagnostics: BusEvent.define(
"lsp.client.diagnostics",
z.object({
serverID: z.string(),
path: z.string(),
Schema.Struct({
serverID: Schema.String,
path: Schema.String,
}),
),
}