mirror of
https://github.com/voideditor/void
synced 2026-05-23 17:38:23 +00:00
add minor debugging
This commit is contained in:
parent
1bb243bc34
commit
a50b5c6407
2 changed files with 4 additions and 0 deletions
|
|
@ -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, }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue