Project Files
src / config.ts
/**
* @file config.ts
* Plugin configuration schema - generates the LM Studio settings UI.
*/
import { createConfigSchematics } from "@lmstudio/sdk";
import { DEFAULT_DB_STORAGE_FILENAME, getDefaultStoragePath } from "./db";
const defaultStoragePath = getDefaultStoragePath();
const dbStorageFilenameSubtitle = `Filename inside the default storage path (${defaultStoragePath}), default is '${DEFAULT_DB_STORAGE_FILENAME}'. Allowed: letters, numbers, dot, dash, underscore. No path segments or '..'`;
export const configSchematics = createConfigSchematics()
.field(
"dbStorageFilename",
"string",
{
displayName: "DB storage filename",
subtitle: dbStorageFilenameSubtitle,
},
DEFAULT_DB_STORAGE_FILENAME,
)
.field(
"enableTimestampUtilityTool",
"select",
{
displayName: "Enable timestamp utility",
subtitle: "Whether to enable the 'get_current_timestamp' tool, which provides the system date/time to models",
options: [
{
value: "on",
displayName: "On",
},
{
value: "off",
displayName: "Off",
},
],
},
"off",
)
.build();