MCPcopy Create free account
hub / github.com/arctic-cli/interface / useDirectory

Function useDirectory

packages/arctic/src/cli/cmd/tui/context/directory.ts:5–13  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { Global } from "@/global"
4
5export function useDirectory() {
6 const sync = useSync()
7 return createMemo(() => {
8 const directory = sync.data.path.directory || process.cwd()
9 const result = directory.replace(Global.Path.home, "~")
10 if (sync.data.vcs?.branch) return result + ":" + sync.data.vcs.branch
11 return result
12 })
13}

Callers 2

LogoFunction · 0.90
FooterFunction · 0.90

Calls 1

cwdMethod · 0.65

Tested by

no test coverage detected