This commit is contained in:
2026-04-26 20:50:58 +08:00
parent a3a9bfa194
commit 67161bd6d1
142 changed files with 3349 additions and 10674 deletions

View File

@@ -212,11 +212,10 @@ pub(super) async fn generate_reasoned_story_payload(
}
pub(super) fn should_generate_reasoned_combat_story(
battle: Option<&RuntimeBattlePresentation>,
_battle: Option<&RuntimeBattlePresentation>,
) -> bool {
battle
.and_then(|presentation| presentation.outcome.as_deref())
.is_some_and(|outcome| matches!(outcome, "victory" | "spar_complete" | "escaped"))
// 战斗动作、逃跑、胜利、切磋结束与死亡都只走确定性结算,避免战斗链路再次触发剧情推理。
false
}
pub(super) fn build_action_story_history(

View File

@@ -1913,7 +1913,7 @@ fn runtime_story_quest_turn_in_marks_quest_rewards_and_affinity() {
}
#[test]
fn runtime_story_reasoned_combat_story_guard_only_targets_terminal_outcomes() {
fn runtime_story_reasoned_combat_story_guard_blocks_all_battle_outcomes() {
assert!(!should_generate_reasoned_combat_story(None));
assert!(!should_generate_reasoned_combat_story(Some(
&RuntimeBattlePresentation {
@@ -1924,7 +1924,7 @@ fn runtime_story_reasoned_combat_story_guard_only_targets_terminal_outcomes() {
outcome: Some("ongoing".to_string()),
}
)));
assert!(should_generate_reasoned_combat_story(Some(
assert!(!should_generate_reasoned_combat_story(Some(
&RuntimeBattlePresentation {
target_id: Some("npc_merchant_01".to_string()),
target_name: Some("沈七".to_string()),
@@ -1933,7 +1933,7 @@ fn runtime_story_reasoned_combat_story_guard_only_targets_terminal_outcomes() {
outcome: Some("victory".to_string()),
}
)));
assert!(should_generate_reasoned_combat_story(Some(
assert!(!should_generate_reasoned_combat_story(Some(
&RuntimeBattlePresentation {
target_id: Some("npc_merchant_01".to_string()),
target_name: Some("沈七".to_string()),