Merge pull request #1533 from KrishavRajSingh/fix/side_panel

fix: tools not loading when refreshed
This commit is contained in:
Marko Kraemer 2025-09-03 16:11:10 -07:00 committed by GitHub
commit aa193ff03a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 2 deletions

View File

@ -414,8 +414,8 @@ export function ToolCallSidePanel({
React.useEffect(() => {
// This is used to sync the internal index to the current index
// Only sync when we're not in live mode or when we're initializing
if (!isInitialized || navigationMode === 'manual') {
// Only sync when we're not in live mode, when we're initializing, and when there are tool calls
if ((!isInitialized || navigationMode === 'manual') && toolCallSnapshots.length > 0) {
setInternalIndex(Math.min(currentIndex, toolCallSnapshots.length - 1));
}
}, [currentIndex, toolCallSnapshots.length, isInitialized, navigationMode]);