new chat doesnt have a tab

This commit is contained in:
Arjun 2026-02-17 12:10:45 +05:30 committed by tusharmagar
parent 02c66970f5
commit 40a3b02a8c

View file

@ -2448,8 +2448,14 @@ function App() {
}
return
}
// Open in a new tab
openInNewTab(runIdToLoad)
// If active tab is empty (new chat with no run), reuse it
if (activeTab && !activeTab.runId) {
setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t))
loadRun(runIdToLoad)
} else {
// Open in a new tab
openInNewTab(runIdToLoad)
}
if (selectedPath || isGraphOpen || selectedBackgroundTask) {
setSelectedPath(null)
setIsGraphOpen(false)