Vicinae

Preferences

Read user-configured settings at runtime. See Preferences for how to declare them in the manifest.

getPreferenceValues

import { getPreferenceValues } from "@vicinae/api";

interface Preferences {
  apiKey: string;
  showDetails: boolean;
}

const { apiKey, showDetails } = getPreferenceValues<Preferences>();

Opening Preferences

Navigate the user to the extension or command preferences in the settings window.

import { openExtensionPreferences, openCommandPreferences } from "@vicinae/api";

await openExtensionPreferences();
await openCommandPreferences();