feat: add stat completion source

Implement a new completion source that extracts stat definitions
from markdown files using `yaml` or `csv` code blocks with
`role=stat`.
This commit is contained in:
2026-07-09 09:52:34 +08:00
parent 45cd9a01ac
commit ef8b56e5b6
5 changed files with 224 additions and 2 deletions
+3
View File
@@ -5,6 +5,7 @@
import { diceSource } from "./sources/dice.js";
import { linksSource } from "./sources/links.js";
import { sparkTablesSource } from "./sources/spark-tables.js";
import { statsSource } from "./sources/stats.js";
import type { CompletionSource, CompletionsPayload } from "./types.js";
export type {
@@ -12,6 +13,7 @@ export type {
DiceCompletion,
LinkCompletion,
SparkTableCompletion,
StatDef,
} from "./types.js";
/** Registered sources — open for extension */
@@ -19,6 +21,7 @@ const sources: CompletionSource[] = [
diceSource,
linksSource,
sparkTablesSource,
statsSource,
];
/**