memoryd: sync begins when Honcho is turned on, and conclusions are matched by peer
Co-Authored-By: ornith-1.5-35b-a3b <agent@wntrmute.dev>
This commit is contained in:
@@ -4,9 +4,9 @@
|
||||
|
||||
use std::path::Path;
|
||||
|
||||
use bxcore::{DataClass, LogRecord, SessionId, SessionStateReply};
|
||||
use bxcore::{DataClass, LogRecord, SessionId, SessionStateReply, Timestamp};
|
||||
|
||||
use crate::logs::{assistant, at, result};
|
||||
use crate::logs::{assistant, result};
|
||||
|
||||
pub fn sid(s: &str) -> SessionId {
|
||||
SessionId::new(s).unwrap()
|
||||
@@ -19,9 +19,15 @@ pub fn clean() -> SessionStateReply {
|
||||
}
|
||||
}
|
||||
|
||||
/// A speaker's message. Its time is the last one there is, so that it is after any time sync
|
||||
/// began (M5c-1 task 15); `spoken_at` gives another.
|
||||
pub fn spoken(content: &str, speaker: Option<&str>) -> LogRecord {
|
||||
spoken_at(Timestamp::MAX, content, speaker)
|
||||
}
|
||||
|
||||
pub fn spoken_at(time: Timestamp, content: &str, speaker: Option<&str>) -> LogRecord {
|
||||
LogRecord::User {
|
||||
time: at(1),
|
||||
time,
|
||||
content: content.to_string(),
|
||||
speaker: speaker.map(str::to_string),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user