more reorg
This commit is contained in:
parent
fcd77fb79e
commit
390b6c6c0a
8 changed files with 117 additions and 133 deletions
|
|
@ -17,7 +17,6 @@ pub mod api;
|
|||
pub mod context;
|
||||
pub mod oneshot;
|
||||
pub mod tools;
|
||||
pub mod training;
|
||||
|
||||
use std::sync::Arc;
|
||||
use anyhow::Result;
|
||||
|
|
@ -28,8 +27,9 @@ use api::types::{ContentPart, Message, MessageContent, Role};
|
|||
use context::{ConversationEntry, ContextState, ContextBudget};
|
||||
use tools::{summarize_args, working_stack};
|
||||
|
||||
use crate::user::log::ConversationLog;
|
||||
use crate::mind::log::ConversationLog;
|
||||
use crate::user::ui_channel::{ContextSection, SharedContextState, StreamTarget, StatusInfo, UiMessage, UiSender};
|
||||
use crate::subconscious::learn;
|
||||
|
||||
/// Result of a single agent turn.
|
||||
pub struct TurnResult {
|
||||
|
|
@ -570,7 +570,7 @@ impl Agent {
|
|||
}
|
||||
|
||||
/// Build context state summary for the debug screen.
|
||||
pub fn context_state_summary(&self, memory_scores: Option<&crate::agent::training::MemoryScore>) -> Vec<ContextSection> {
|
||||
pub fn context_state_summary(&self, memory_scores: Option<&learn::MemoryScore>) -> Vec<ContextSection> {
|
||||
let count = |s: &str| self.tokenizer.encode_with_special_tokens(s).len();
|
||||
|
||||
let mut sections = Vec::new();
|
||||
|
|
@ -869,7 +869,7 @@ impl Agent {
|
|||
self.publish_context_state_with_scores(None);
|
||||
}
|
||||
|
||||
pub fn publish_context_state_with_scores(&self, memory_scores: Option<&crate::agent::training::MemoryScore>) {
|
||||
pub fn publish_context_state_with_scores(&self, memory_scores: Option<&learn::MemoryScore>) {
|
||||
let summary = self.context_state_summary(memory_scores);
|
||||
if let Ok(mut dbg) = std::fs::OpenOptions::new().create(true).append(true)
|
||||
.open("/tmp/poc-journal-debug.log") {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue