deepseek-harness/packages/host/directory-picker-native
2026-08-11 03:20:36 +08:00
..
src build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
tests build(vendor): rescope the vendored Cordis packages into @deepseek-ai 2026-08-10 22:04:13 +08:00
package.json release(dsh): 0.0.1-rc.1 2026-08-11 03:20:36 +08:00
README.i18n.yaml fix(docs): close final translation review gaps 2026-08-09 13:46:14 +08:00
README.md feat(client): inject slot declaration lifetimes 2026-08-06 11:28:46 +08:00
README.zh.md fix(docs): close final translation review gaps 2026-08-09 13:46:14 +08:00
tsconfig.json feat(host,client): compose directory picking through slots — dual-face -native, no wire advertisement 2026-07-28 21:51:01 +08:00
tsdown.config.ts fix(build): align Client build metadata 2026-08-08 12:02:58 +08:00

@deepseek-ai/dsh-host-directory-picker-native

English | 中文

The native-OS-chooser backend of the directory-picker seam: NativeDirectoryPicker registers ctx.directoryPicker with the native capability, whose pick(signal) opens one native chooser per call and resolves the chosen absolute path (null on cancel). Platform tools run without a shell: osascript on macOS and Zenity with a KDialog fallback on Linux; the caller's abort terminates the native process. Windows opens the modern IFileOpenDialog in a spawned child process — a koffi-driven COM conversation on the child's main thread with the best thread DPI awareness the host accepts (per-monitor-v2 first), aborted by posting WM_CLOSE to the dialog thread. Only viable when the operator sits at the host's display — remote deployments compose -browse instead. The command boundary (DirectoryPickerRunner) and platform facts are injectable. The shared no-shell subprocess runner lives in dsh-native-command.

Dual-face package: the browser half (./client) registers a renderless flow occupant into ui-workspace's two directory-flow holes — each open request drives host.pickDirectory and reports the one outcome (picked path / cancel / failure) through the hole's owner conversation. Both directory-flow declarations must be live before either contribution installs. One cordis.yml row therefore composes both sides of the native interaction; the client carries no capability-kind branching, and mounting a second flow package fails at load (the holes are single kind).

Model Experience

None, as the backend serves the GUI host's directory selection; nothing here reaches a model request.

KV Cache effect

None; this package neither assembles nor sends a provider request.

Known Limitations and Deferred Work

  • Linux requires desktop tooling — with neither Zenity nor KDialog installed, pick rejects with an actionable error; it does not fall back to a typed-path prompt (the browse backend is that fallback at the composition level).
  • Windows has no mechanism fallback — the child-process picker through packaged koffi is the only native tier, so a COM refusal or dialog crash surfaces the failure. The browse backend remains the fallback at the composition level.