From 0b689394e7f65a4b0c853470ff6da8973b3cdffd Mon Sep 17 00:00:00 2001 From: Kiet <31864905+Kitenite@users.noreply.github.com> Date: Wed, 4 Dec 2024 14:32:42 -0500 Subject: [PATCH] Don't strip messages from user (#848) --- apps/studio/src/lib/editor/engine/chat/conversation.ts | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/apps/studio/src/lib/editor/engine/chat/conversation.ts b/apps/studio/src/lib/editor/engine/chat/conversation.ts index 7a60effd0..9e2252265 100644 --- a/apps/studio/src/lib/editor/engine/chat/conversation.ts +++ b/apps/studio/src/lib/editor/engine/chat/conversation.ts @@ -52,13 +52,7 @@ export class ChatConversationImpl implements ChatConversation { getCoreMessages() { const messages: CoreMessage[] = this.messages - .map((m, index) => { - if (index === this.messages.length - 1) { - return m.toCurrentMessage(); - } else { - return m.toPreviousMessage(); - } - }) + .map((m) => m.toCurrentMessage()) .filter((m) => m !== undefined && m.content !== ''); return messages; }