For AI agents: the complete documentation index is available at https://open-spaced-repetition.github.io/ts-fsrs/zh-CN/llms.txt, the full documentation bundle is available at https://open-spaced-repetition.github.io/ts-fsrs/zh-CN/llms-full.txt, and this page is available as Markdown at https://open-spaced-repetition.github.io/ts-fsrs/zh-CN/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 将这些组合成一个定义。.create() 会校验配置并返回独立的调度器,因此一个定义可以支撑多个调度器。

    For your Agent
    在 TypeScript 应用中集成 ts-fsrs

    复制这段提示词并发送给 AI Agent,让它安装 ts-fsrs 并创建可运行的 FSRS-7 调度器。

    接下来前往快速开始,安装 package 并在浏览器中运行调度器。