Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion desktop/frontend/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1467,7 +1467,6 @@ export default function App() {
onTabClose={(id) => void handleTabClose(id)}
onTabsClose={(ids, nextActiveTabId) => void handleTabsClose(ids, nextActiveTabId)}
onTabsReorder={(ids) => void handleTabsReorder(ids)}
onNewTab={() => void handleNewTab()}
/>
{!workspacePanelMaximized && (
<Tooltip
Expand Down
11 changes: 2 additions & 9 deletions desktop/frontend/src/components/TabBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@
// open project/global topic, so switching tabs switches the active conversation.
import { useEffect, useRef, useState } from "react";
import type { CSSProperties, DragEvent, KeyboardEvent as ReactKeyboardEvent, MouseEvent as ReactMouseEvent } from "react";
import { FileText, Plus, X } from "lucide-react";
import { FileText, X } from "lucide-react";
import type { TabMeta } from "../lib/types";
import { projectColorValue } from "../lib/projectColors";
import { useT } from "../lib/i18n";
import { Tooltip } from "./Tooltip";
import { ContextMenu, contextMenuPointFromEvent, type ContextMenuItem, type ContextMenuPoint } from "./ContextMenu";

interface TabBarProps {
Expand All @@ -16,7 +15,6 @@ interface TabBarProps {
onTabClose: (tabId: string) => void;
onTabsClose: (tabIds: string[], nextActiveTabId?: string) => void;
onTabsReorder: (tabIds: string[]) => void;
onNewTab: () => void;
revealActiveSignal?: number;
}

Expand Down Expand Up @@ -50,7 +48,7 @@ function projectAccentStyle(color?: string): CSSProperties | undefined {
return { "--project-accent": value } as CSSProperties;
}

export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose, onTabsReorder, onNewTab, revealActiveSignal = 0 }: TabBarProps) {
export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose, onTabsReorder, revealActiveSignal = 0 }: TabBarProps) {
const t = useT();
const [draggingTabId, setDraggingTabId] = useState<string | null>(null);
const [dropTarget, setDropTarget] = useState<{ id: string; side: DropSide } | null>(null);
Expand Down Expand Up @@ -250,11 +248,6 @@ export function TabBar({ tabs, activeTabId, onTabChange, onTabClose, onTabsClose
);
})}
</div>
<Tooltip label={t("tabBar.newSession")}>
<button className="tabbar__new" type="button" aria-label={t("tabBar.newSession")} onClick={onNewTab}>
<Plus size={13} />
</button>
</Tooltip>
<ContextMenu
open={Boolean(menuTabId)}
point={menuPoint}
Expand Down
2 changes: 1 addition & 1 deletion desktop/frontend/src/locales/en.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export const en = {
"tabBar.closeTab": "Close tab",
"tabBar.closeOtherTabs": "Close other tabs",
"tabBar.closeTabsToRight": "Close tabs to right",
"tabBar.newSession": "New session",

"tabBar.tabActions": "Tab actions",

// sidebar
Expand Down
2 changes: 1 addition & 1 deletion desktop/frontend/src/locales/zh.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const zh: Record<DictKey, string> = {
"tabBar.closeTab": "关闭标签页",
"tabBar.closeOtherTabs": "关闭其他标签页",
"tabBar.closeTabsToRight": "关闭右侧标签页",
"tabBar.newSession": "新建会话",

"tabBar.tabActions": "标签页操作",

// 侧边栏
Expand Down
19 changes: 0 additions & 19 deletions desktop/frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -9478,25 +9478,6 @@ a[href] {
color: var(--fg);
}

.tabbar__new {
flex: 0 0 auto;
width: 30px;
height: 30px;
display: flex;
align-items: center;
justify-content: center;
margin-left: 1px;
border: none;
border-radius: 7px;
background: transparent;
color: var(--fg-dim);
}

.tabbar__new:hover {
background: var(--button-bg);
color: var(--fg);
}

.project-tree {
--project-tree-action-column: 36px;
--project-tree-edge-gap: 6px;
Expand Down