session: --session flag, journal agent cycle, conversation bytes config
- memory-search: add --session flag for multi-session support - config: add surface_conversation_bytes option - journal_agent_cycle: trigger journal agent every 10KB of conversation - Session::from_id() constructor Co-Authored-By: ProofOfConcept <poc@bcachefs.org>
This commit is contained in:
parent
7c0c376e0f
commit
84c78f7ae1
4 changed files with 91 additions and 18 deletions
|
|
@ -32,9 +32,8 @@ impl Session {
|
|||
self.state_dir.join(format!("{}-{}", prefix, self.session_id))
|
||||
}
|
||||
|
||||
/// Load from POC_SESSION_ID environment variable
|
||||
pub fn from_env() -> Option<Self> {
|
||||
let session_id = std::env::var("POC_SESSION_ID").ok()?;
|
||||
/// Load from a session ID string
|
||||
pub fn from_id(session_id: String) -> Option<Self> {
|
||||
if session_id.is_empty() { return None; }
|
||||
let state_dir = PathBuf::from("/tmp/claude-memory-search");
|
||||
Some(Session {
|
||||
|
|
@ -45,6 +44,11 @@ impl Session {
|
|||
})
|
||||
}
|
||||
|
||||
/// Load from POC_SESSION_ID environment variable
|
||||
pub fn from_env() -> Option<Self> {
|
||||
Self::from_id(std::env::var("POC_SESSION_ID").ok()?)
|
||||
}
|
||||
|
||||
/// Get the seen set for this session
|
||||
pub fn seen(&self) -> HashSet<String> {
|
||||
super::hippocampus::memory_search::load_seen(&self.state_dir, &self.session_id)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue