fix: hide panel when resetting the state of playback

This commit is contained in:
yeyan1996 2025-07-31 23:19:08 -07:00
parent 1fdf26f82e
commit 3be4345cbf
1 changed files with 5 additions and 2 deletions

View File

@ -110,7 +110,7 @@ export const PlaybackControls = ({
if (!isPlaying && !isSidePanelOpen) {
onToggleSidePanel();
}
}, [isPlaying, isSidePanelOpen, onToggleSidePanel]);
}, [isPlaying, isSidePanelOpen, onToggleSidePanel, updatePlaybackState]);
const resetPlayback = useCallback(() => {
updatePlaybackState({
@ -122,7 +122,10 @@ export const PlaybackControls = ({
currentToolCall: null,
toolPlaybackIndex: -1,
});
}, [updatePlaybackState]);
if (isSidePanelOpen) {
onToggleSidePanel();
}
}, [updatePlaybackState, isSidePanelOpen, onToggleSidePanel]);
const skipToEnd = useCallback(() => {
updatePlaybackState({