@builder.io/dev-tools
Version:
Builder.io Visual CMS Devtools
14 lines (13 loc) • 762 B
TypeScript
/**
* IDE Bridge — reads active editor context from the builder.builder VS Code extension.
*
* When the extension is active it starts a local HTTP server and injects
* FUSION_IDE_PORT into every terminal it opens. This module fetches the
* current editor state (active file, cursor position) via /context, and
* fetches diagnostics on demand via /diagnostics.
*/
import type { IdeContext, DiagnosticsResponse } from "#ai-utils";
export declare function fetchIdeContext(): Promise<IdeContext | null>;
export declare function fetchIdeDiagnostics(filePath?: string): Promise<DiagnosticsResponse | null>;
export declare function formatIdeContext(ctx: IdeContext): string;
export declare function formatIdeDiagnostics(response: DiagnosticsResponse): string;