Files
vscode/src/vscode-dts/vscode.proposed.textDocumentChangeReason.d.ts
Henning Dieterichs 488d6df795 Implements edit source tracking through proposed API (#252430)
Implements edit source tracking through proposed API
2025-06-26 10:52:51 +02:00

31 lines
1019 B
TypeScript

/*---------------------------------------------------------------------------------------------
* Copyright (c) Microsoft Corporation. All rights reserved.
* Licensed under the MIT License. See License.txt in the project root for license information.
*--------------------------------------------------------------------------------------------*/
declare module 'vscode' {
/**
* Detailed information about why a text document changed.
*/
export interface TextDocumentDetailedChangeReason {
/**
* The source of the change (e.g., 'inline-completion', 'chat-edit', 'extension')
*/
readonly source: string;
/**
* Additional context-specific metadata
*/
readonly metadata: { readonly [key: string]: any };
}
export interface TextDocumentChangeEvent {
/**
* The precise reason for the document change.
* Only available to extensions that have enabled the `textDocumentChangeReason` proposed API.
*/
readonly detailedReason: TextDocumentDetailedChangeReason | undefined;
}
}