fix(tui): restore legacy sync consumers (#31908)

This commit is contained in:
Dax
2026-06-11 15:01:20 +00:00
committed by GitHub
parent 2bde20c2ba
commit 567d6ed1a3
8 changed files with 97 additions and 97 deletions
@@ -7,7 +7,8 @@ import {
type ParentProps,
type Setter,
} from "solid-js"
import { useData } from "../../context/data"
import { useSync } from "../../context/sync"
import { useTuiPaths } from "../../context/runtime"
export type HomeSessionDestination = { type: "directory"; directory: string; subdirectory: boolean } | { type: "new" }
@@ -20,10 +21,11 @@ type Context = {
const HomeSessionDestinationContext = createContext<Context>()
export function HomeSessionDestinationProvider(props: ParentProps) {
const data = useData()
const sync = useSync()
const paths = useTuiPaths()
const [selected, setDestination] = createSignal<HomeSessionDestination>()
const destination = createMemo<HomeSessionDestination>(
() => selected() ?? { type: "directory", directory: data.location.default().directory, subdirectory: false },
() => selected() ?? { type: "directory", directory: sync.path.directory || paths.cwd, subdirectory: false },
)
return (
<HomeSessionDestinationContext.Provider