Download packages/app/src/components/directory-picker.test.ts from SaylorTwift/opencode: direct link, hf CLI and curl.
- Browser
- Download file 645 Bytes
-
https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/directory-picker.test.ts
- Command line
-
hf download hf://SaylorTwift/opencode/packages/app/src/components/directory-picker.test.ts
-
curl -L -o directory-picker.test.ts https://huggingface.co/SaylorTwift/opencode/resolve/main/packages/app/src/components/directory-picker.test.ts
645 Bytes
| import { describe, expect, test } from "bun:test" | |
| import { directoryPickerKind } from "./directory-picker-policy" | |
| const local = { | |
| type: "sidecar", | |
| variant: "base", | |
| http: { url: "http://localhost:4096" }, | |
| } as const | |
| const remote = { | |
| type: "ssh", | |
| host: "example.test", | |
| http: { url: "http://localhost:4096" }, | |
| } as const | |
| describe("directoryPickerKind", () => { | |
| test("uses the native picker only for local desktop projects", () => { | |
| expect(directoryPickerKind("desktop", local)).toBe("native") | |
| expect(directoryPickerKind("desktop", remote)).toBe("server") | |
| expect(directoryPickerKind("web", local)).toBe("server") | |
| }) | |
| }) | |