From 573680446effb6812babc3e47bb36384e2ecac57 Mon Sep 17 00:00:00 2001 From: Alex Alecu Date: Tue, 17 Mar 2026 11:12:30 +0200 Subject: [PATCH] publish bus event after TsClient diagnostics --- packages/opencode/src/kilocode/ts-client.ts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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 })