src / configSchematics.ts
import { createConfigSchematics } from "@lmstudio/sdk";
/**
* Settings for the OneNote Manager plugin. Because this plugin talks to the
* OneNote COM API directly (via PowerShell), there is no server command to
* configure — only timeouts, paging sizes, and the default export directory.
*/
export const configSchematics = createConfigSchematics()
.field(
"timeoutSeconds",
"numeric",
{
displayName: "OneNote operation timeout (seconds)",
subtitle: "Max time for a single OneNote COM operation.",
hint: "Raise this if the first call after a cold start times out while OneNote loads.",
int: true,
min: 10,
max: 600,
slider: { min: 10, max: 600, step: 5 },
},
90,
)
.field(
"markdownTimeoutSeconds",
"numeric",
{
displayName: "Markdown conversion timeout (seconds)",
subtitle: "Only used when writing Markdown content (requires the OneMore add-in).",
int: true,
min: 5,
max: 120,
slider: { min: 5, max: 120, step: 5 },
},
30,
)
.field(
"defaultPageChars",
"numeric",
{
displayName: "Default page size (characters)",
subtitle: "Characters returned per call for text/XML reads when max_chars is omitted.",
hint: "Lower this if large reads still get cut off in your model's context.",
int: true,
min: 500,
max: 60000,
slider: { min: 1000, max: 60000, step: 500 },
},
8000,
)
.field(
"defaultItemLimit",
"numeric",
{
displayName: "Default item page size",
subtitle: "Items returned per call for list/search reads when limit is omitted.",
int: true,
min: 1,
max: 500,
slider: { min: 5, max: 500, step: 5 },
},
50,
)
.field(
"defaultOutputDir",
"string",
{
displayName: "Default export directory",
subtitle: "Where save_*_to_file commands write when no output_dir is given.",
hint: "Absolute path on the machine running OneNote. Empty = the plugin's working directory.",
placeholder: "C:\\Users\\you\\Documents\\OneNoteExports",
},
"",
)
.build();