refactor(tui): extract standalone package (#31193)

This commit is contained in:
Dax
2026-06-07 05:24:27 +00:00
committed by GitHub
parent 7a2c49e762
commit 106f8e94d6
84 changed files with 1148 additions and 1919 deletions
@@ -8,7 +8,7 @@ import {
type Setter,
} from "solid-js"
import { useSync } from "../../context/sync"
import { useTuiEnvironment } from "../../runtime"
import { useTuiPaths } from "../../context/runtime"
export type HomeSessionDestination = { type: "directory"; directory: string; subdirectory: boolean } | { type: "new" }
@@ -22,10 +22,10 @@ const HomeSessionDestinationContext = createContext<Context>()
export function HomeSessionDestinationProvider(props: ParentProps) {
const sync = useSync()
const environment = useTuiEnvironment()
const paths = useTuiPaths()
const [selected, setDestination] = createSignal<HomeSessionDestination>()
const destination = createMemo<HomeSessionDestination>(
() => selected() ?? { type: "directory", directory: sync.path.directory || environment.cwd, subdirectory: false },
() => selected() ?? { type: "directory", directory: sync.path.directory || paths.cwd, subdirectory: false },
)
return (
<HomeSessionDestinationContext.Provider