src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const pluginConfigSchematics = createConfigSchematics()
.field("maxSearchResults", "numeric", {
int: true, min: 3, max: 20,
displayName: "Max Results",
subtitle: "Search results per query.",
slider: { min: 3, max: 20, step: 1 },
}, 8)
.field("fetchTimeoutMs", "numeric", {
int: true, min: 3000, max: 15000,
displayName: "Fetch Timeout (ms)",
subtitle: "Page load timeout.",
slider: { min: 3000, max: 15000, step: 1000 },
}, 8000)
.field("searchRecencyWindow", "string", {
displayName: "Default Time Window",
subtitle: "day, week, month, or year",
}, "year")
.field("cacheTTLMinutes", "numeric", {
int: true, min: 5, max: 120,
displayName: "Cache TTL (min)",
subtitle: "How long to cache results.",
slider: { min: 5, max: 120, step: 5 },
}, 30)
.field("maxCacheSize", "numeric", {
int: true, min: 20, max: 200,
displayName: "Cache Size",
subtitle: "Max cached entries.",
slider: { min: 20, max: 200, step: 10 },
}, 50)
.build();
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
export const pluginConfigSchematics = createConfigSchematics()
.field("maxSearchResults", "numeric", {
int: true, min: 3, max: 20,
displayName: "Max Results",
subtitle: "Search results per query.",
slider: { min: 3, max: 20, step: 1 },
}, 8)
.field("fetchTimeoutMs", "numeric", {
int: true, min: 3000, max: 15000,
displayName: "Fetch Timeout (ms)",
subtitle: "Page load timeout.",
slider: { min: 3000, max: 15000, step: 1000 },
}, 8000)
.field("searchRecencyWindow", "string", {
displayName: "Default Time Window",
subtitle: "day, week, month, or year",
}, "year")
.field("cacheTTLMinutes", "numeric", {
int: true, min: 5, max: 120,
displayName: "Cache TTL (min)",
subtitle: "How long to cache results.",
slider: { min: 5, max: 120, step: 5 },
}, 30)
.field("maxCacheSize", "numeric", {
int: true, min: 20, max: 200,
displayName: "Cache Size",
subtitle: "Max cached entries.",
slider: { min: 20, max: 200, step: 10 },
}, 50)
.build();