From 089ff32a4b84061cda5370e98cb74e8b65871f4a Mon Sep 17 00:00:00 2001 From: Connor Peet Date: Thu, 31 Oct 2024 09:52:24 -0700 Subject: [PATCH] fix: use `metadata` for consistency (#127) * chore: update package.json links with public repo * fix: use `metadata` for consistency Fixes #119 --- src/base/index.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/base/index.ts b/src/base/index.ts index 9e4c5f3..40f7f0c 100644 --- a/src/base/index.ts +++ b/src/base/index.ts @@ -71,7 +71,9 @@ export async function renderPrompt

( ): Promise<{ messages: LanguageModelChatMessage[]; tokenCount: number; + /** @deprecated use {@link metadata} */ metadatas: MetadataMap; + metadata: MetadataMap; usedContext: ChatDocumentContext[]; references: PromptReference[]; }>; @@ -99,7 +101,9 @@ export async function renderPrompt

( ): Promise<{ messages: ChatMessage[]; tokenCount: number; + /** @deprecated use {@link metadata} */ metadatas: MetadataMap; + metadata: MetadataMap; usedContext: ChatDocumentContext[]; references: PromptReference[]; }>; @@ -114,7 +118,9 @@ export async function renderPrompt

( ): Promise<{ messages: (ChatMessage | LanguageModelChatMessage)[]; tokenCount: number; + /** @deprecated use {@link metadata} */ metadatas: MetadataMap; + metadata: MetadataMap; usedContext: ChatDocumentContext[]; references: PromptReference[]; }> { @@ -130,7 +136,7 @@ export async function renderPrompt

( messages = toVsCodeChatMessages(messages); } - return { messages, tokenCount, metadatas: metadata, usedContext, references }; + return { messages, tokenCount, metadatas: metadata, metadata, usedContext, references }; } /**