@@ -3,11 +3,12 @@ import type { JSX } from "solid-js"
33import { createSortable } from "@thisbeyond/solid-dnd"
44import { FileIcon } from "@opencode-ai/ui/file-icon"
55import { IconButton } from "@opencode-ai/ui/icon-button"
6- import { Tooltip } from "@opencode-ai/ui/tooltip"
6+ import { TooltipKeybind } from "@opencode-ai/ui/tooltip"
77import { Tabs } from "@opencode-ai/ui/tabs"
88import { getFilename } from "@opencode-ai/util/path"
99import { useFile } from "@/context/file"
1010import { useLanguage } from "@/context/language"
11+ import { useCommand } from "@/context/command"
1112
1213export function FileVisual ( props : { path : string ; active ?: boolean } ) : JSX . Element {
1314 return (
@@ -27,6 +28,7 @@ export function FileVisual(props: { path: string; active?: boolean }): JSX.Eleme
2728export function SortableTab ( props : { tab : string ; onTabClose : ( tab : string ) => void } ) : JSX . Element {
2829 const file = useFile ( )
2930 const language = useLanguage ( )
31+ const command = useCommand ( )
3032 const sortable = createSortable ( props . tab )
3133 const path = createMemo ( ( ) => file . pathFromTab ( props . tab ) )
3234 return (
@@ -36,15 +38,19 @@ export function SortableTab(props: { tab: string; onTabClose: (tab: string) => v
3638 < Tabs . Trigger
3739 value = { props . tab }
3840 closeButton = {
39- < Tooltip value = { language . t ( "common.closeTab" ) } placement = "bottom" >
41+ < TooltipKeybind
42+ title = { language . t ( "common.closeTab" ) }
43+ keybind = { command . keybind ( "tab.close" ) }
44+ placement = "bottom"
45+ >
4046 < IconButton
4147 icon = "close-small"
4248 variant = "ghost"
4349 class = "h-5 w-5"
4450 onClick = { ( ) => props . onTabClose ( props . tab ) }
4551 aria-label = { language . t ( "common.closeTab" ) }
4652 />
47- </ Tooltip >
53+ </ TooltipKeybind >
4854 }
4955 hideCloseButton
5056 onMiddleClick = { ( ) => props . onTabClose ( props . tab ) }
0 commit comments