Forked from ceveyne/playbook
Forked from ceveyne/playbook
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
import { homedir } from "os";
import path from "path";
const DEFAULTS = {
playbookDirectories: [path.join(homedir(), "Documents", "Playbook")],
};
export const configSchematics = createConfigSchematics()
.field(
"playbookDirectories",
"stringArray",
{
displayName: "Playbook Directories",
subtitle: "Absolute paths to directories containing your Markdown/skill files. The first directory is the write target for memorize; all directories are searched and readable.",
},
[...DEFAULTS.playbookDirectories],
)
.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();
src / config.ts
import { createConfigSchematics } from "@lmstudio/sdk";
import { homedir } from "os";
import path from "path";
const DEFAULTS = {
playbookDirectories: [path.join(homedir(), "Documents", "Playbook")],
};
export const configSchematics = createConfigSchematics()
.field(
"playbookDirectories",
"stringArray",
{
displayName: "Playbook Directories",
subtitle: "Absolute paths to directories containing your Markdown/skill files. The first directory is the write target for memorize; all directories are searched and readable.",
},
[...DEFAULTS.playbookDirectories],
)
.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();