mirror of
https://github.com/ankitects/anki.git
synced 2026-01-13 05:53:53 -05:00
Add historical retention field to FSRS review request and update related logic
- Added `historical_retention` field to `SimulateFsrsReviewRequest` in `scheduler.proto`. - Updated `simulator.rs` to use `req.historical_retention` instead of the removed `desired_retention`. - Modified `FsrsOptions.svelte` to include `historicalRetention` in the options passed to the component.
This commit is contained in:
parent
267f763b8e
commit
d159aaa704
3 changed files with 3 additions and 2 deletions
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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(),
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue