mirror of
https://github.com/rowboatlabs/rowboat.git
synced 2026-05-28 19:05:31 +02:00
tabs on the top pane
This commit is contained in:
parent
15f27c59ae
commit
8773a8ce64
2 changed files with 16 additions and 15 deletions
|
|
@ -2486,9 +2486,20 @@ function App() {
|
||||||
canNavigateForward={canNavigateForward}
|
canNavigateForward={canNavigateForward}
|
||||||
collapsedLeftPaddingPx={collapsedLeftPaddingPx}
|
collapsedLeftPaddingPx={collapsedLeftPaddingPx}
|
||||||
>
|
>
|
||||||
<span className="text-sm font-medium text-muted-foreground flex-1 min-w-0 truncate">
|
{openTabs.length > 1 ? (
|
||||||
{headerTitle}
|
<ChatTabBar
|
||||||
</span>
|
tabs={openTabs}
|
||||||
|
activeTabId={activeTabId}
|
||||||
|
getTabTitle={getTabTitle}
|
||||||
|
processingRunIds={processingRunIds}
|
||||||
|
onSwitchTab={switchToTab}
|
||||||
|
onCloseTab={closeTab}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<span className="text-sm font-medium text-muted-foreground flex-1 min-w-0 truncate">
|
||||||
|
{headerTitle}
|
||||||
|
</span>
|
||||||
|
)}
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => setIsSearchOpen(true)}
|
onClick={() => setIsSearchOpen(true)}
|
||||||
|
|
@ -2592,14 +2603,6 @@ function App() {
|
||||||
) : (
|
) : (
|
||||||
<FileCardProvider onOpenKnowledgeFile={(path) => { navigateToFile(path) }}>
|
<FileCardProvider onOpenKnowledgeFile={(path) => { navigateToFile(path) }}>
|
||||||
<div className="flex min-h-0 flex-1 flex-col">
|
<div className="flex min-h-0 flex-1 flex-col">
|
||||||
<ChatTabBar
|
|
||||||
tabs={openTabs}
|
|
||||||
activeTabId={activeTabId}
|
|
||||||
getTabTitle={getTabTitle}
|
|
||||||
processingRunIds={processingRunIds}
|
|
||||||
onSwitchTab={switchToTab}
|
|
||||||
onCloseTab={closeTab}
|
|
||||||
/>
|
|
||||||
<Conversation className="relative flex-1 overflow-y-auto [scrollbar-gutter:stable]">
|
<Conversation className="relative flex-1 overflow-y-auto [scrollbar-gutter:stable]">
|
||||||
<ScrollPositionPreserver />
|
<ScrollPositionPreserver />
|
||||||
<ConversationContent className={conversationContentClassName}>
|
<ConversationContent className={conversationContentClassName}>
|
||||||
|
|
|
||||||
|
|
@ -24,10 +24,8 @@ export function ChatTabBar({
|
||||||
onSwitchTab,
|
onSwitchTab,
|
||||||
onCloseTab,
|
onCloseTab,
|
||||||
}: ChatTabBarProps) {
|
}: ChatTabBarProps) {
|
||||||
if (tabs.length <= 1) return null
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="flex items-center gap-0 border-b border-border bg-sidebar overflow-x-auto px-1 shrink-0">
|
<div className="titlebar-no-drag flex flex-1 items-center gap-0 overflow-x-auto min-w-0">
|
||||||
{tabs.map((tab) => {
|
{tabs.map((tab) => {
|
||||||
const isActive = tab.id === activeTabId
|
const isActive = tab.id === activeTabId
|
||||||
const isProcessing = tab.runId ? processingRunIds.has(tab.runId) : false
|
const isProcessing = tab.runId ? processingRunIds.has(tab.runId) : false
|
||||||
|
|
@ -39,7 +37,7 @@ export function ChatTabBar({
|
||||||
type="button"
|
type="button"
|
||||||
onClick={() => onSwitchTab(tab.id)}
|
onClick={() => onSwitchTab(tab.id)}
|
||||||
className={cn(
|
className={cn(
|
||||||
"group/tab relative flex items-center gap-1.5 px-3 py-1.5 text-xs max-w-[180px] min-w-[80px] transition-colors",
|
"group/tab relative flex items-center gap-1.5 px-3 h-full text-xs max-w-[180px] min-w-[80px] transition-colors",
|
||||||
isActive
|
isActive
|
||||||
? "bg-accent text-accent-foreground"
|
? "bg-accent text-accent-foreground"
|
||||||
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
: "text-muted-foreground hover:bg-accent/50 hover:text-foreground"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue