Conversation
Gateway auto-TTS was reading visible section labels like Reasoning: or thinking: aloud. Strip allowlisted labels only at text start so mid-prose uses stay spoken. Co-authored-by: Cursor <cursoragent@cursor.com>
|
Exact-head comment on #107047 head 6f9eb4e. KEEP |
|
Checked the KEEP/CHECK notes against Empty spoken text (
Stacked labels ( CJK labels: agree — Gateway / Telegram path: Telegram does not override KEEP items (shared pipeline placement, start-anchored allowlist, |
|
Thanks — ACK on the no-code path. Agreed KEEP/CHECK covered; empty spoken text / reasoning-label handling looks fine at head 6f9eb4e without further change from me. |
Duplicate comparison vs #34213 (triage mark)Classifier treated this as a duplicate because a comment said
Not the same change. #34213 does not remove a visible leading section label. On current Independent delta — keep on #107047
Do not fold this into #34213 (already closed/landed) or into #77079 (open; expands tag variants only — no leading-label strip). Closed sibling #107048 targeted the same #107044 label case and is not live; this PR is the remaining candidate. No code change this round. Focused tests: |
Duplicate re-check vs #34213 (this maintenance round)Classifier still marks this as a duplicate of #34213. That is a triage mark, not a close instruction. Re-compared against current
Not the same change. #34213 /
Independent delta — keep on #107047
Do not fold this into #34213 (closed issue; landed). Do not fold into #77079 (still open; expands tag variants only — no No review threads, no CI failures, mergeable, no code change this round. Focused tests: |
6f9eb4e to
bcfc139
Compare
What does this PR do?
Gateway auto-TTS (and the shared TTS tool path) already strips tagged
<think>blocks (#34213), but a reply that starts with a visible section label such asReasoning:orthinking:still reachesprepare_spoken_text()and gets spoken aloud (observed on Telegram).This PR adds an allowlisted leading-label strip in
tools/tts_text_normalize.pyon the sharedprepare_spoken_text()pipeline, immediately afterstrip_nonspoken_blocksand before markdown cleanup. Onlyreasoning/thinking/analysis/// `` at the very start of the text, followed by:, `:`, or a newline, are removed. Mid-prose uses and non-allowlisted headers stay spoken.Related Issue
Fixes #107044
Type of Change
Changes Made
tools/tts_text_normalize.py— add and wire it intotests/tools/test_tts_prepare_spoken.py— focused RED/GREEN coverage for leading-label strip + fail-open mid-prose / non-allowlisted labelsHow to Test
scripts/run_tests.shon the files in Changes Made — focused verificationscripts/run_tests.sh tests/tools/test_tts_prepare_spoken.py -qscripts/run_tests.sh tests/tools/test_tts_text_normalize.py -qEvidence
scripts/run_tests.shon the files in Changes Made — focused verification — -> 19 passedChecklist
Code
Documentation & Housekeeping
cli-config.yaml.example: N/ACONTRIBUTING.mdorAGENTS.md: N/A