fix(app): navigate to tabs when opening file

This commit is contained in:
adamelmore
2026-01-27 08:17:00 -06:00
parent 3297e5230e
commit eac2d4c699
2 changed files with 29 additions and 3 deletions

View File

@@ -26,7 +26,7 @@ type Entry = {
type DialogSelectFileMode = "all" | "files"
export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
export function DialogSelectFile(props: { mode?: DialogSelectFileMode; onOpenFile?: (path: string) => void }) {
const command = useCommand()
const language = useLanguage()
const layout = useLayout()
@@ -164,6 +164,7 @@ export function DialogSelectFile(props: { mode?: DialogSelectFileMode }) {
tabs().open(value)
file.load(path)
view().reviewPanel.open()
props.onOpenFile?.(path)
}
const handleSelect = (item: Entry | undefined) => {