Keep [SPEAKER] provenance model-only: strip echoed tags from replies and history

The descriptive speaker.note let the model imitate the tag into its visible reply; the echoed tag was then stored and re-tagged by build_request next turn, stacking duplicates. Fix: speaker.note now forbids writing/repeating the tag; strip_speaker_tags removes leading echoed [SPEAKER: name - YYYY-MM-DD HH:MM] runs at persist, at the agent Final content, in get_messages (display+HTML) and before re-tagging history, so the tag stays prompt-only and never stacks. Frontend strips it from the live preview too. Legacy tagged rows heal on reload without migration. +2 tests (138 green), clippy/fmt clean; live two-turn verify shows no tag in browser-facing content.
This commit is contained in:
adm committed 2026-11-25 21:18:01 +01:00
1 parent 7dd66ea138
commit 77bfa72689
4 files changed
+121 -11

No files matched your search

+1 -1
View File
@@ -2,7 +2,7 @@
"identity.name": "Your name is {name}.",
"identity.folder": " Your personal folder is {folder}.",
"speaker.tag": "[SPEAKER: {name} - {when}]",
"speaker.note": " User and agent turns are prefixed with a [SPEAKER: name - local date and time] tag identifying who generated them and when.",
"speaker.note": " User and agent turns are prefixed with a [SPEAKER: name - local date and time] tag identifying who generated them and when. It is framework-added metadata: never write or repeat it in your own replies.",
"error.name_locked": "The session name is immutable after the first interaction.",
"error.name_empty": "The name must not be empty.",
"error.session_not_found": "Session not found.",