fix(channel): save original user text to conversation history
Previously, the memory-enriched message (with [Memory context] block prepended) was saved to per-sender conversation history. On subsequent turns the LLM saw stale memory fragments with raw keys baked into prior "user" messages, creating compounding noise. Save the original msg.content instead. Memory context is still injected for the current LLM call but no longer persists across turns. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
ea2ff7c53b
commit
6cbdef8c16
1 changed files with 1 additions and 1 deletions
|
|
@ -838,7 +838,7 @@ async fn process_channel_message(
|
|||
append_sender_turn(
|
||||
ctx.as_ref(),
|
||||
&history_key,
|
||||
ChatMessage::user(&enriched_message),
|
||||
ChatMessage::user(&msg.content),
|
||||
);
|
||||
|
||||
// Build history from per-sender conversation cache.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue