removed default tab

This commit is contained in:
Arjun 2026-02-17 16:26:59 +05:30 committed by tusharmagar
parent 40a3b02a8c
commit 15f27c59ae
2 changed files with 9 additions and 21 deletions

View file

@ -2424,19 +2424,7 @@ function App() {
handleNewChatTab()
},
onSelectRun: (runIdToLoad) => {
// If it's already the active tab's run, do nothing
const activeTab = openTabs.find(t => t.id === activeTabId)
if (activeTab?.runId === runIdToLoad) {
// Just ensure we're in chat view
if (selectedPath || isGraphOpen || selectedBackgroundTask) {
setSelectedPath(null)
setIsGraphOpen(false)
setExpandedFrom(null)
setSelectedBackgroundTask(null)
}
return
}
// If already open in another tab, switch to it
// If already open in a tab, switch to that tab
const existingTab = openTabs.find(t => t.runId === runIdToLoad)
if (existingTab) {
switchToTab(existingTab.id)
@ -2448,14 +2436,12 @@ function App() {
}
return
}
// 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)
}
// Navigate current tab to this run
setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t))
void navigateToView({ type: 'chat', runId: runIdToLoad })
},
onOpenInNewTab: (targetRunId) => {
openInNewTab(targetRunId)
if (selectedPath || isGraphOpen || selectedBackgroundTask) {
setSelectedPath(null)
setIsGraphOpen(false)

View file

@ -8,6 +8,7 @@ import {
ChevronsDownUp,
ChevronsUpDown,
Copy,
ExternalLink,
FilePlus,
FolderPlus,
AlertTriangle,
@ -149,6 +150,7 @@ type TasksActions = {
onNewChat: () => void
onSelectRun: (runId: string) => void
onDeleteRun: (runId: string) => void
onOpenInNewTab?: (runId: string) => void
onSelectBackgroundTask?: (taskName: string) => void
}