src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"allowedPaths",
"stringArray",
{
displayName: "Allowed root paths",
hint: "Absolute paths the model is allowed to read/write under (e.g. /Users/me/project, ~/Documents/notes). Tilde (~) is expanded to your home directory. Add at least one path; nothing outside these roots is reachable.",
},
[],
)
.field(
"maxFileSizeKb",
"numeric",
{
displayName: "Max file size (KB)",
hint: "Files larger than this are refused by read_file (avoids stuffing huge files into the model's context).",
slider: { min: 16, max: 4096, step: 16 },
int: true,
},
512,
)
.field(
"maxGrepResults",
"numeric",
{
displayName: "Max grep matches",
hint: "Grep stops after this many matching lines.",
slider: { min: 10, max: 1000, step: 10 },
int: true,
},
200,
)
.field(
"maxGrepFiles",
"numeric",
{
displayName: "Max grep files scanned",
hint: "Grep stops after scanning this many files (defends against giant trees).",
slider: { min: 100, max: 10000, step: 100 },
int: true,
},
2000,
)
.build();