prediction: split out maintenance (and thereby the logging interface) of the UI conversation to a separate task, so log::* can work in realtime.

This commit is contained in:
2026-06-17 22:16:19 +02:00
parent a8a44dae63
commit 89125d2def
5 changed files with 84 additions and 50 deletions
+2 -8
View File
@@ -1,7 +1,7 @@
use chrono::{DateTime, Duration, Utc};
use serde::{Deserialize, Serialize};
use crate::{artifacts::{Track, archive::Archive}, prediction::{GeneratedResponses, PossibleResponse}, scene::conversation::ConversationEntry};
use crate::{artifacts::{Track, archive::Archive}, prediction::{GeneratedResponses, PossibleResponse}};
pub mod conversation;
@@ -43,17 +43,15 @@ pub struct Scenery {
#[derive(Debug, Default, Clone, Serialize, Deserialize)]
pub struct Scene {
reply_options: GeneratedResponses,
conversation: Vec<ConversationEntry>,
direction: StageDirection,
pub tokens_consumed: usize,
scenery: Scenery
}
impl Scene {
pub fn new(reply_options: GeneratedResponses, conversation: Vec<ConversationEntry>, scenery: Scenery, tokens_consumed: usize, direction: StageDirection) -> Self {
pub fn new(reply_options: GeneratedResponses, scenery: Scenery, tokens_consumed: usize, direction: StageDirection) -> Self {
Self {
reply_options,
conversation,
scenery,
tokens_consumed,
direction
@@ -67,10 +65,6 @@ impl Scene {
pub fn scenery(&self) -> &Scenery {
&self.scenery
}
pub fn conversation(&self) -> &Vec<ConversationEntry> {
&self.conversation
}
pub fn reply_options(&self) -> &Vec<PossibleResponse> {
&self.reply_options.responses