Codebase intelligence for AI and humans: code health scores, auto-generated docs, git analytics, dead code detection, and architectural decisions via MCP.
Python aicode-complexitycode-healthcode-intelligencecode-qualitydead-codedeveloper-toolsdocumentationgit-analyticsmcpopen-sourcepythonrefactoringstatic-analysistechnical-debt
/** Singleton wrapper over acquireVsCodeApi (callable exactly once per page). */
import type { WebviewToHostMessage } from "../../../src/shared/webviewMessages";
interface VsCodeApi {
postMessage(message: WebviewToHostMessage): void;
getState(): unknown;
setState(state: unknown): void;
}
declare function acquireVsCodeApi(): VsCodeApi;
let instance: VsCodeApi | null = null;
export function getVsCodeApi(): VsCodeApi {
if (!instance) instance = acquireVsCodeApi();
return instance;
}