src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const pluginConfigSchematics = createConfigSchematics()
.field("sqlitePath", "string", {
displayName: "SQLite Database Path",
subtitle: "Absolute path to a .db or .sqlite file. Used when db_type is 'sqlite' or not specified.",
}, "")
.field("postgresDsn", "string", {
displayName: "Postgres Connection String",
subtitle: "e.g. postgresql://user:pass@localhost:5432/mydb. Used when db_type is 'postgres'.",
}, "")
.field("allowWrites", "boolean", {
displayName: "Allow Write Queries",
subtitle: "Enable INSERT, UPDATE, DELETE, CREATE, DROP. DANGER: modifies your database.",
}, false)
.field("maxRows", "numeric", {
int: true, min: 1, max: 1000,
displayName: "Max Result Rows",
subtitle: "Truncate query results to this many rows.",
slider: { min: 10, max: 1000, step: 10 },
}, 200)
.build();