Project Files
src / config-schematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const globalConfigSchematics = createConfigSchematics()
.field(
"dataRoot",
"string",
{
displayName: "Data Root Directory",
hint: "Absolute path where databases and tables are stored. Use ~/ for home directory.",
placeholder: "~/.lmstudio/plugins/data-plugin/data",
maxLength: 512,
},
"~/.lmstudio/plugins/data-plugin/data",
)
.field(
"csv.delimiter",
"string",
{
displayName: "CSV Delimiter",
hint: "Character used to separate values in CSV files",
placeholder: ",",
maxLength: 2,
},
",",
)
.scope("csv", (csv) =>
csv.field(
"encoding",
"select",
{
displayName: "CSV Encoding",
options: [
{ value: "utf-8", displayName: "UTF-8" },
{ value: "utf-16", displayName: "UTF-16" },
{ value: "latin1", displayName: "Latin-1" },
],
},
"utf-8",
),
)
.build();
export const perChatConfigSchematics = createConfigSchematics()
.field(
"maxRowsPerPage",
"numeric",
{
displayName: "Max Rows Per Page",
hint: "Default number of rows returned per page in queries",
min: 1,
max: 10000,
int: true,
},
100,
)
.field(
"dateFormat",
"select",
{
displayName: "Date Format",
hint: "Format for date display in query results",
options: [
{ value: "ISO", displayName: "ISO 8601" },
{ value: "US", displayName: "MM/DD/YYYY" },
{ value: "EU", displayName: "DD/MM/YYYY" },
],
},
"ISO",
)
.build();