Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

- Logging: Fixed log flooding from repeated running state checks by only logging on state changes
- Logging: Fixed log feedback loop caused by Output Channel document events triggering diagnostics

- Diagnostics: Run diagnostics for Dev Proxy files already open before extension activation
- Diagnostics: Language model diagnostic now correctly targets plugins that can use a local language model (OpenAIMockResponsePlugin, OpenApiSpecGeneratorPlugin, TypeSpecGeneratorPlugin) and shows as an informational hint instead of a warning

## [1.12.0] - 2026-01-29
Expand Down
22 changes: 22 additions & 0 deletions src/documents.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,4 +76,26 @@ export const registerDocumentListeners = (context: vscode.ExtensionContext, coll
});
})
);

// Process already-open documents that were opened before the extension activated
for (const document of vscode.workspace.textDocuments) {
if (document.uri.scheme !== 'file') {
continue;
}
try {
if (isConfigFile(document)) {
updateConfigFileDiagnostics(context, document, collection);
} else if (isProxyFile(document)) {
updateFileDiagnostics(context, document, collection);
}
} catch (error) {
console.error('Error processing already-open document:', document.uri.fsPath, error);
}
}

// Set context for the active editor if it contains a config file
const activeEditor = vscode.window.activeTextEditor;
if (activeEditor && activeEditor.document.uri.scheme === 'file') {
vscode.commands.executeCommand('setContext', 'isDevProxyConfigFile', isConfigFile(activeEditor.document));
}
};