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 868e164e..eefa19ba 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
@@ -1,7 +1,7 @@
import React, { FormEvent, useCallback, useRef, useState } from 'react';
-import { useConfigState, useService, useSidebarState, useThreadsState } from '../util/services.js';
+import { useConfigState, useService, useThreadsState } from '../util/services.js';
import { URI } from '../../../../../../../base/common/uri.js';
import { VSReadFile } from '../../../registerInlineDiffs.js';
import { sendLLMMessage } from '../util/sendLLMMessage.js';
@@ -128,6 +128,7 @@ export const SidebarChat = () => {
const { voidConfig } = configState
// threads state
+ const threadsState = useThreadsState()
const threadsStateService = useService('threadsStateService')
// ----- SIDEBAR CHAT state (local) -----
@@ -180,7 +181,7 @@ export const SidebarChat = () => {
const newHistoryElt: ChatMessage = { role: 'user', content: userContent, displayContent: instructions, selection, files }
threadsStateService.addMessageToCurrentThread(newHistoryElt)
- const currentThread = threadsStateService.getCurrentThread()
+ const currentThread = threadsStateService.getCurrentThread(threadsStateService.state) // the the instant state right now, don't wait for the React state
// send message to LLM
@@ -229,7 +230,7 @@ export const SidebarChat = () => {
}, [messageStream, threadsStateService])
- const currentThread = threadsStateService.getCurrentThread()
+ const currentThread = threadsStateService.getCurrentThread(threadsState)
return <>
{/* previous messages */}
diff --git a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarThreadSelector.tsx b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarThreadSelector.tsx
index f3269b43..1ac6ddd2 100644
--- a/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarThreadSelector.tsx
+++ b/src/vs/workbench/contrib/void/browser/react/src/sidebar-tsx/SidebarThreadSelector.tsx
@@ -66,7 +66,7 @@ export const SidebarThreadSelector = () => {
return (