src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const configSchematics = createConfigSchematics()
.field(
"wikiRoot",
"string",
{
displayName: "Wiki root",
hint: "Absolute path of the wiki directory (e.g. ~/Documents/wiki). Tilde (~) is expanded. The plugin manages pages/, sources/, index.md, log.md and WIKI.md inside this folder. Run wiki_init to scaffold a fresh wiki here.",
},
"",
)
.field(
"maxPageSizeKb",
"numeric",
{
displayName: "Max page/source size (KB)",
hint: "Pages or sources larger than this are refused by the read tools (avoids stuffing huge files into context).",
slider: { min: 16, max: 4096, step: 16 },
int: true,
},
512,
)
.field(
"maxSearchResults",
"numeric",
{
displayName: "Max search matches",
hint: "wiki_search stops after this many matching lines.",
slider: { min: 10, max: 1000, step: 10 },
int: true,
},
200,
)
.field(
"maxSearchFiles",
"numeric",
{
displayName: "Max search files scanned",
hint: "wiki_search stops after scanning this many files.",
slider: { min: 100, max: 10000, step: 100 },
int: true,
},
2000,
)
.build();