list room senders in prompt for per-person notes discovery
This commit is contained in:
parent
9aa85549b5
commit
6a3e7a8019
1 changed files with 19 additions and 0 deletions
19
src/main.rs
19
src/main.rs
|
|
@ -359,6 +359,25 @@ async fn invoke_claude(
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
|
// Collect unique non-self senders for per-person note discovery
|
||||||
|
let mut senders: Vec<&OwnedUserId> = history
|
||||||
|
.iter()
|
||||||
|
.filter(|m| !m.is_self)
|
||||||
|
.map(|m| &m.sender)
|
||||||
|
.collect();
|
||||||
|
senders.sort();
|
||||||
|
senders.dedup();
|
||||||
|
if !senders.is_empty() {
|
||||||
|
writeln!(
|
||||||
|
prompt,
|
||||||
|
"\n[people in this room — check ../people/<user_id>/notes.md for each]"
|
||||||
|
)
|
||||||
|
.unwrap();
|
||||||
|
for s in &senders {
|
||||||
|
writeln!(prompt, " {s}").unwrap();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
let seen = seen_idx.min(history.len());
|
let seen = seen_idx.min(history.len());
|
||||||
let (old, new) = history.split_at(seen);
|
let (old, new) = history.split_at(seen);
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue