From 905a83258f8257fdcd78b95fa5d1e347ec42d168 Mon Sep 17 00:00:00 2001 From: Marc McIntosh Date: Fri, 5 Jan 2024 14:02:13 +0100 Subject: [PATCH] fix(context_files): fix the format of the messages sent to the lsp --- src/services/refact.ts | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/services/refact.ts b/src/services/refact.ts index 6d048889..2cc76f27 100644 --- a/src/services/refact.ts +++ b/src/services/refact.ts @@ -90,9 +90,7 @@ export function sendChat( ) { const jsonMessages = messages.map(([role, textOrFile]) => { const content = - typeof textOrFile === "string" - ? textOrFile - : JSON.stringify([textOrFile]); + typeof textOrFile === "string" ? textOrFile : JSON.stringify(textOrFile); return { role, content }; });