Skip to content

A desktop coding agent with free access to frontier models.

TypeScript

fix: editor language checks keep a queued refresh

ogsamratd4630c10c6ec
diff --git a/apps/app/src/react-app/domains/session/editor/lsp.ts b/apps/app/src/react-app/domains/session/editor/lsp.ts
index dbb9f40b..d8bc1636 100644
--- a/apps/app/src/react-app/domains/session/editor/lsp.ts
+++ b/apps/app/src/react-app/domains/session/editor/lsp.ts
@@ -222,7 +222,8 @@ async function call<T>(op: Parameters<OmniRushServerClient["editorLsp"]>[1], pat
return current === ctx && useEditorStore.getState().languageFeatures ? result : null;
} catch (error) {
// An engine without the editor routes (older build): language features stay off quietly.
- if ((error as { status?: number }).status === 404) {
+ const failure = error as { status?: number; code?: string };
+ if (failure.status === 404 && failure.code !== "workspace_not_found") {
unavailable = true;
useProblemsStore.getState().setAvailable(false);
}
@@ -384,7 +385,7 @@ export async function refreshFileDiagnostics(path: string): Promise<void> {
// An edit since the request: its result is already stale; the run after it applies.
if (!raw || current !== ctx || (doc.model.getVersionId() !== version && run.pending)) continue;
// Sent without its unsaved text (an agent started meanwhile): the disk's diagnostics do not fit the buffer.
- if (request.state.withoutText) return;
+ if (request.state.withoutText) continue;
const file = raw.find((item) => item.path === path) ?? { path, diagnostics: [] };
applyMarkers(path, file.diagnostics);
useProblemsStore.getState().merge(ctx.workspaceId, file);