mirror of
https://github.com/anomalyco/opencode.git
synced 2026-04-28 20:49:55 +00:00
refactor(bus): migrate BusEvent to Effect Schema (#24040)
This commit is contained in:
parent
0590452456
commit
cd93533b1f
37 changed files with 281 additions and 260 deletions
|
|
@ -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,
|
||||
}),
|
||||
),
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue