Initial commit: file-browser-picker Paseo plugin

This commit is contained in:
nandi committed 2026-11-18 15:22:40 -08:00
commit 069e1d2082
15 files changed
+5599

No files matched your search

+36
View File
@@ -0,0 +1,36 @@
import { defineSettings } from "@getpaseo/plugin";
import { z } from "zod";
export const pickerSchema = z.object({
// Which program draws the folder picker on the host. "auto" tries the
// desktop's own picker first, then the XDG portal dialog.
picker: z
.enum(["auto", "kdialog", "zenity", "yad", "portal", "osascript", "powershell", "custom"])
.default("auto"),
// Used only when picker is "custom". The command runs in a shell on the
// host and must print the chosen folder to stdout. {dir} is replaced with
// the start folder.
customCommand: z.string().default(""),
// Folder the picker starts in. Empty means the home folder on the host.
startDir: z.string().default(""),
// Title shown by the file browser dialog.
prompt: z.string().default("Select project folder"),
});
export type PickerSettings = z.output<typeof pickerSchema>;
// Host scope: the picker runs on the machine running the daemon, so the
// choice belongs to that host, not to each connected client.
export const pickerSettings = defineSettings({
id: "picker",
scope: "host",
version: 1,
schema: pickerSchema,
});
export const defaultPickerSettings: PickerSettings = {
picker: "auto",
customCommand: "",
startDir: "",
prompt: "Select project folder",
};