Project Files
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
import { homedir } from "os";
import path from "path";
const DEFAULTS = {
playbookDirectory: path.join(homedir(), "Documents", "Playbook"),
};
export const configSchematics = createConfigSchematics()
.field(
"playbookDirectory",
"string",
{
displayName: "Playbook Directory",
subtitle: "Absolute path to the directory containing your Markdown knowledge files.",
placeholder: path.join(homedir(), "Documents", "Playbook"),
},
DEFAULTS.playbookDirectory,
)
.field(
"embeddingModel",
"string",
{
displayName: "Embedding Model",
subtitle: "Name of the embedding model loaded in LM Studio. Leave empty to use BM25-only search.",
},
"text-embedding-nomic-embed-text-v1.5",
)
.field(
"lmStudioBaseUrl",
"string",
{
displayName: "LM Studio Base URL",
subtitle: "Base URL for the LM Studio local API.",
},
"http://127.0.0.1:1234",
)
.field(
"maxRecallDocuments",
"numeric",
{
int: true,
min: 1,
max: 20,
displayName: "Max Recall Documents",
subtitle: "Maximum number of documents returned by a single recall call.",
slider: { min: 1, max: 20, step: 1 },
},
5,
)
.field(
"minRecallScore",
"numeric",
{
int: true,
min: 0,
max: 100,
displayName: "Min Recall Score",
subtitle: "Minimum relevance score (0–100) for a document to appear in recall results.",
slider: { min: 0, max: 100, step: 5 },
},
60,
)
.build();