diff --git a/proto/anki/scheduler.proto b/proto/anki/scheduler.proto index 01f092a39..1294b4543 100644 --- a/proto/anki/scheduler.proto +++ b/proto/anki/scheduler.proto @@ -404,6 +404,7 @@ message SimulateFsrsReviewRequest { repeated float easy_days_percentages = 10; deck_config.DeckConfig.Config.ReviewCardOrder review_order = 11; optional uint32 suspend_after_lapse_count = 12; + float historical_retention = 13; } message SimulateFsrsReviewResponse { diff --git a/rslib/src/scheduler/fsrs/simulator.rs b/rslib/src/scheduler/fsrs/simulator.rs index 2d43cc4a7..4e0907eb3 100644 --- a/rslib/src/scheduler/fsrs/simulator.rs +++ b/rslib/src/scheduler/fsrs/simulator.rs @@ -146,7 +146,6 @@ impl Collection { let new_cards = cards.iter().filter(|c| c.queue == CardQueue::New).count() + req.deck_size as usize; let fsrs = FSRS::new(Some(&req.params))?; - let historical_retention = req.desired_retention; let mut converted_cards = cards .into_iter() .filter(is_included_card) @@ -157,7 +156,7 @@ impl Collection { .memory_state_from_sm2( c.ease_factor(), c.interval as f32, - historical_retention, + req.historical_retention, ) .ok()? .into(), diff --git a/ts/routes/deck-options/FsrsOptions.svelte b/ts/routes/deck-options/FsrsOptions.svelte index 706407889..cfdea341c 100644 --- a/ts/routes/deck-options/FsrsOptions.svelte +++ b/ts/routes/deck-options/FsrsOptions.svelte @@ -95,6 +95,7 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html newCardsIgnoreReviewLimit: $newCardsIgnoreReviewLimit, easyDaysPercentages: $config.easyDaysPercentages, reviewOrder: $config.reviewOrder, + historicalRetention: $config.historicalRetention, }); const DESIRED_RETENTION_LOW_THRESHOLD = 0.8;