mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-28 19:05:31 +02:00
removed default tab
This commit is contained in:
parent
40a3b02a8c
commit
15f27c59ae
2 changed files with 9 additions and 21 deletions
|
|
@ -2424,19 +2424,7 @@ function App() {
|
||||||
handleNewChatTab()
|
handleNewChatTab()
|
||||||
},
|
},
|
||||||
onSelectRun: (runIdToLoad) => {
|
onSelectRun: (runIdToLoad) => {
|
||||||
// If it's already the active tab's run, do nothing
|
// If already open in a tab, switch to that tab
|
||||||
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
|
|
||||||
const existingTab = openTabs.find(t => t.runId === runIdToLoad)
|
const existingTab = openTabs.find(t => t.runId === runIdToLoad)
|
||||||
if (existingTab) {
|
if (existingTab) {
|
||||||
switchToTab(existingTab.id)
|
switchToTab(existingTab.id)
|
||||||
|
|
@ -2448,14 +2436,12 @@ function App() {
|
||||||
}
|
}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// If active tab is empty (new chat with no run), reuse it
|
// Navigate current tab to this run
|
||||||
if (activeTab && !activeTab.runId) {
|
setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t))
|
||||||
setOpenTabs(prev => prev.map(t => t.id === activeTabId ? { ...t, runId: runIdToLoad } : t))
|
void navigateToView({ type: 'chat', runId: runIdToLoad })
|
||||||
loadRun(runIdToLoad)
|
},
|
||||||
} else {
|
onOpenInNewTab: (targetRunId) => {
|
||||||
// Open in a new tab
|
openInNewTab(targetRunId)
|
||||||
openInNewTab(runIdToLoad)
|
|
||||||
}
|
|
||||||
if (selectedPath || isGraphOpen || selectedBackgroundTask) {
|
if (selectedPath || isGraphOpen || selectedBackgroundTask) {
|
||||||
setSelectedPath(null)
|
setSelectedPath(null)
|
||||||
setIsGraphOpen(false)
|
setIsGraphOpen(false)
|
||||||
|
|
|
||||||
|
|
@ -8,6 +8,7 @@ import {
|
||||||
ChevronsDownUp,
|
ChevronsDownUp,
|
||||||
ChevronsUpDown,
|
ChevronsUpDown,
|
||||||
Copy,
|
Copy,
|
||||||
|
ExternalLink,
|
||||||
FilePlus,
|
FilePlus,
|
||||||
FolderPlus,
|
FolderPlus,
|
||||||
AlertTriangle,
|
AlertTriangle,
|
||||||
|
|
@ -149,6 +150,7 @@ type TasksActions = {
|
||||||
onNewChat: () => void
|
onNewChat: () => void
|
||||||
onSelectRun: (runId: string) => void
|
onSelectRun: (runId: string) => void
|
||||||
onDeleteRun: (runId: string) => void
|
onDeleteRun: (runId: string) => void
|
||||||
|
onOpenInNewTab?: (runId: string) => void
|
||||||
onSelectBackgroundTask?: (taskName: string) => void
|
onSelectBackgroundTask?: (taskName: string) => void
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue