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:
1 parent
7dd66ea138
commit
77bfa72689
4 files changed
+121
-11
No files matched your search
+1
-1
@@ -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.",
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@
|
||||
"identity.name": "Il tuo nome è {name}.",
|
||||
"identity.folder": " La tua cartella personale è {folder}.",
|
||||
"speaker.tag": "[SPEAKER: {name} - {when}]",
|
||||
"speaker.note": " I turni dell'utente e dell'agente sono preceduti da un tag [SPEAKER: nome - data e ora locale] che identifica chi li ha generati e quando.",
|
||||
"speaker.note": " I turni dell'utente e dell'agente sono preceduti da un tag [SPEAKER: nome - data e ora locale] che identifica chi li ha generati e quando. È un metadato aggiunto dal framework: non scriverlo né ripeterlo mai nelle tue risposte.",
|
||||
"error.name_locked": "Il nome della sessione è immutabile dopo la prima interazione.",
|
||||
"error.name_empty": "Il nome non può essere vuoto.",
|
||||
"error.session_not_found": "Sessione non trovata.",
|
||||
|
||||
Reference in new issue
Block a user