From a50b5c64079c1deb6c55f5b124a3dab23474dca3 Mon Sep 17 00:00:00 2001 From: Andrew Pareles Date: Thu, 21 Nov 2024 17:54:43 -0800 Subject: [PATCH] add minor debugging --- .../contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx | 3 +++ src/vs/workbench/contrib/void/browser/registerThreads.ts | 1 + 2 files changed, 4 insertions(+) diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx index 54dbff67..3b0dffe6 100644 --- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx +++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarChat.tsx @@ -214,6 +214,7 @@ export const SidebarChat = () => { messages: [...(currentThread?.messages ?? []).map(m => ({ role: m.role, content: m.content })),], onText: (newText, fullText) => setMessageStream(fullText), onFinalMessage: (content) => { + console.log('chat: running final message') // add assistant's message to chat history, and clear selection const newHistoryElt: ChatMessage = { role: 'assistant', content, displayContent: content } @@ -222,6 +223,8 @@ export const SidebarChat = () => { setIsLoading(false) }, onError: (error) => { + console.log('chat: running error') + // add assistant's message to chat history, and clear selection let content = messageStream; // just use the current content const newHistoryElt: ChatMessage = { role: 'assistant', content, displayContent: content, } diff --git a/src/vs/workbench/contrib/void/browser/registerThreads.ts b/src/vs/workbench/contrib/void/browser/registerThreads.ts index 3d912972..e942a079 100644 --- a/src/vs/workbench/contrib/void/browser/registerThreads.ts +++ b/src/vs/workbench/contrib/void/browser/registerThreads.ts @@ -160,6 +160,7 @@ class ThreadHistoryService extends Disposable implements IThreadHistoryService { addMessageToCurrentThread(message: ChatMessage) { + console.log('adding ', message.role, 'to chat') const { allThreads, _currentThreadId } = this.state // get the current thread, or create one