From a9f6faedcce352df206044fe97b72df652f90ef9 Mon Sep 17 00:00:00 2001 From: Lei Gao Date: Mon, 11 Aug 2025 12:37:20 -0700 Subject: [PATCH] fix: add file context override for inline completion --- .../protocol/inlineCompletionWithReferences.ts | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/runtimes/protocol/inlineCompletionWithReferences.ts b/runtimes/protocol/inlineCompletionWithReferences.ts index 5c39d1d2..e1fe03a4 100644 --- a/runtimes/protocol/inlineCompletionWithReferences.ts +++ b/runtimes/protocol/inlineCompletionWithReferences.ts @@ -21,10 +21,23 @@ interface OpenTabParams { openTabFilepaths?: string[] } +interface FileContext { + leftFileContent: string + rightFileContent: string + filename: string + fileUri?: string + programmingLanguage: string +} + +interface FileContextParams { + fileContextOverride?: FileContext +} + export type InlineCompletionWithReferencesParams = InlineCompletionParams & PartialResultParams & DocumentChangeParams & - OpenTabParams + OpenTabParams & + FileContextParams export const inlineCompletionWithReferencesRequestType = new ProtocolRequestType< InlineCompletionWithReferencesParams,