Skip to content

Commit f610a66

Browse files
committed
fix: remove extra deps & param passing bug
1 parent b29b5eb commit f610a66

File tree

2 files changed

+5
-7
lines changed

2 files changed

+5
-7
lines changed

web-app/src/hooks/useChat.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,15 +33,14 @@ import {
3333
} from '@/utils/reasoning'
3434

3535
export const useChat = () => {
36-
const { prompt, setPrompt } = usePrompt()
36+
const { prompt } = usePrompt()
3737
const {
3838
tools,
3939
updateTokenSpeed,
4040
resetTokenSpeed,
4141
updateStreamingContent,
4242
updateLoadingModel,
4343
setAbortController,
44-
removeFromThreadQueue,
4544
} = useAppState()
4645
const { assistants, currentAssistant } = useAssistant()
4746
const { updateProvider } = useModelProvider()
@@ -240,7 +239,7 @@ export const useChat = () => {
240239
updateStreamingContent(emptyThreadContent)
241240
// Do not add new message on retry
242241
if (troubleshooting)
243-
addMessage(newUserThreadContent(activeThread.id, message, attachments))
242+
addMessage(newUserThreadContent(activeThread.id, message, options?.attachments))
244243
updateThreadTimestamp(activeThread.id)
245244

246245
// Clear thread-specific prompt (only affects the processing thread)
@@ -257,7 +256,7 @@ export const useChat = () => {
257256
messages,
258257
renderInstructions(currentAssistant?.instructions)
259258
)
260-
if (troubleshooting) builder.addUserMessage(message, attachments)
259+
if (troubleshooting) builder.addUserMessage(message, options?.attachments)
261260

262261
let isCompleted = false
263262

@@ -559,7 +558,6 @@ export const useChat = () => {
559558
updateStreamingContent,
560559
addMessage,
561560
updateThreadTimestamp,
562-
setPrompt,
563561
selectedModel,
564562
currentAssistant,
565563
tools,
@@ -574,7 +572,7 @@ export const useChat = () => {
574572
toggleOnContextShifting,
575573
setModelLoadError,
576574
serviceHub,
577-
removeFromThreadQueue,
575+
getThreadById,
578576
]
579577
)
580578

web-app/src/hooks/useInferenceScheduler.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ export const useInferenceScheduler = () => {
122122
// Start processing with lock already acquired
123123
;(async () => {
124124
try {
125-
await sendMessage(nextMessage, true, threadId) // Pass explicit thread ID
125+
await sendMessage(nextMessage, true, { explicitThreadId: threadId })
126126
} catch (error) {
127127
console.error(`Error processing message in thread ${threadId}:`, error)
128128
} finally {

0 commit comments

Comments
 (0)