Skip to content

Commit 0388855

Browse files
committed
fix: stop playback when continuing conversation from history mode
- Add playback.stop() call in handleContinueConversation - Ensure playback is terminated before exiting history mode - Prevent auto-replay when re-entering history after continue
1 parent 119681b commit 0388855

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/pages/main.tsx

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,9 @@ export default function main() {
220220
}
221221

222222
try {
223+
// Stop playback before continuing conversation
224+
playback.stop();
225+
223226
// Check if task has workflow
224227
if (!currentTask.workflow) {
225228
antdMessage.error(t('task_missing_context'));
@@ -265,7 +268,7 @@ export default function main() {
265268
console.error('Failed to continue conversation:', error);
266269
antdMessage.error(t('continue_conversation_failed'));
267270
}
268-
}, [currentTask, handleContinueConversationBase, antdMessage, t, setIsViewingAttachment,
271+
}, [currentTask, playback, handleContinueConversationBase, antdMessage, t, setIsViewingAttachment,
269272
setCurrentTaskId, taskIdRef, setCurrentUrl, setShowDetail, setToolHistory, messageProcessorRef]);
270273

271274
// Synchronize taskIdRef

0 commit comments

Comments
 (0)