For AI agents: the complete documentation index is available at https://open-spaced-repetition.github.io/ts-fsrs/zh-TW/llms.txt, the full documentation bundle is available at https://open-spaced-repetition.github.io/ts-fsrs/zh-TW/llms-full.txt, and this page is available as Markdown at https://open-spaced-repetition.github.io/ts-fsrs/zh-TW/guide/index.md.
  • 繁體中文
  • 介紹

    ts-fsrs 是用於建立 FSRS 間隔重複系統的 TypeScript 工具包。宣告式 API 會將模型、時間系統與選用 middleware 組合成可重複使用的排程器定義。

    組成部分

    模型是 FSRS 演算法及其參數。FSRS7Model 是目前版本;FSRS-3 至 FSRS-6 仍然保留,用於建立在這些版本上的既有複習歷史。

    時間系統決定如何表示時間。dateChrono 使用 Date,numericChrono 使用以天為單位的數字,temporalInstantChrono 使用 Temporal.Instant。

    Middleware 負責排程策略,例如 schedulerLearningStepsMiddleware、schedulerFuzzingMiddleware、schedulerMaximumIntervalMiddleware、schedulerLeechMiddleware。建立排程器前,透過 .use(...) 組合它們。

    defineScheduler 將這些項目組合成 definition。.create() 會驗證設定並回傳獨立的排程器,因此同一個 definition 可以建立多個排程器。

    For your Agent
    在 TypeScript 應用程式中整合 ts-fsrs

    複製這段提示詞並傳送給 AI Agent,讓它安裝 ts-fsrs 並建立可執行的 FSRS-7 排程器。

    接下來前往快速開始,安裝 package 並在瀏覽器中執行排程器。