Add configurable minimum sentence length for N+1 targets

This commit is contained in:
2026-02-15 18:34:10 -08:00
parent f1b5082801
commit 667bde944c
11 changed files with 180 additions and 9 deletions

View File

@@ -128,6 +128,7 @@ export const DEFAULT_CONFIG: ResolvedConfig = {
refreshMinutes: 1440,
matchMode: "headword",
decks: [],
minSentenceWords: 3,
nPlusOne: "#c6a0f6",
knownWord: "#a6da95",
},
@@ -333,6 +334,13 @@ export const CONFIG_OPTION_REGISTRY: ConfigOptionRegistryEntry[] = [
defaultValue: DEFAULT_CONFIG.ankiConnect.nPlusOne.refreshMinutes,
description: "Minutes between known-word cache refreshes.",
},
{
path: "ankiConnect.nPlusOne.minSentenceWords",
kind: "number",
defaultValue: DEFAULT_CONFIG.ankiConnect.nPlusOne.minSentenceWords,
description:
"Minimum sentence word count required for N+1 targeting (default: 3).",
},
{
path: "ankiConnect.nPlusOne.decks",
kind: "array",