config: hot-reload via RPC, Arc<Config> for cheap sharing
Config is now stored in RwLock<Arc<Config>> instead of OnceLock<Config>. get() returns Arc<Config> (cheap clone), and reload() re-reads from disk. New RPC: "reload-config" — reloads config.jsonl without restarting the daemon. Logs the change to daemon.log. Useful for switching between API backends and claude accounts without losing in-flight tasks. New CLI: poc-memory agent daemon reload-config Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
0944ecc43f
commit
af3171d6ec
4 changed files with 43 additions and 7 deletions
|
|
@ -268,7 +268,7 @@ pub fn cmd_load_context(stats: bool) -> Result<(), String> {
|
|||
println!("{}", "-".repeat(42));
|
||||
|
||||
for group in &cfg.context_groups {
|
||||
let entries = get_group_content(group, &store, cfg);
|
||||
let entries = get_group_content(group, &store, &cfg);
|
||||
let words: usize = entries.iter()
|
||||
.map(|(_, c)| c.split_whitespace().count())
|
||||
.sum();
|
||||
|
|
@ -287,7 +287,7 @@ pub fn cmd_load_context(stats: bool) -> Result<(), String> {
|
|||
println!();
|
||||
|
||||
for group in &cfg.context_groups {
|
||||
let entries = get_group_content(group, &store, cfg);
|
||||
let entries = get_group_content(group, &store, &cfg);
|
||||
if !entries.is_empty() && group.source == crate::config::ContextSource::Journal {
|
||||
println!("--- recent journal entries ({}/{}) ---",
|
||||
entries.len(), cfg.journal_max);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue