diff --git a/packages/opencode/src/kilocode/ts-client.ts b/packages/opencode/src/kilocode/ts-client.ts index dd4ebc1bf3f..d1b21d08dad 100644 --- a/packages/opencode/src/kilocode/ts-client.ts +++ b/packages/opencode/src/kilocode/ts-client.ts @@ -3,7 +3,8 @@ // instead of spawning a persistent typescript-language-server process. // This drops memory from ~500MB persistent to ~50MB peak (0 idle). -import type { LSPClient } from "../lsp/client" +import { LSPClient } from "../lsp/client" +import { Bus } from "../bus" import { TsCheck } from "./ts-check" import { Log } from "../util/log" import { withTimeout } from "../util/timeout" @@ -28,6 +29,12 @@ export namespace TsClient { for (const [file, diags] of result) { diagnostics.set(file, diags) } + for (const file of result.keys()) { + Bus.publish(LSPClient.Event.Diagnostics, { + path: file, + serverID: client.serverID, + }) + } }) .catch((err) => { log.error("ts check failed", { error: err })