Commit 49ae7ca
committed
fix(dispatch): exclude isReasoning payloads from TTS synthesis
When a channel opts in via supportsReasoningBlocks (Matrix), explicit
isReasoning payloads flow past the generic suppression guards and can
reach TTS: the per-block TTS application, sendFinalPayload final TTS,
and the post-stream accumulated-block TTS-only synthetic reply.
Reasoning is private thinking text delivered as its own notice
(Matrix m.notice); it must never be synthesized into audio. Exclude
isReasoning from the block TTS accumulator (accumulatedBlockTtsText +
blockCount) and short-circuit maybeApplyTtsToReplyPayload for
isReasoning payloads. The TTS skip is a no-op for channels that
suppress reasoning before delivery, since such payloads never reach
TTS today.
Addresses ClawSweeper P2 review findings on PR #93830:
- dispatch-from-config.ts:3107 (accumulated block TTS)
- dispatch-from-config.ts:3279 (final TTS)
Adds two regression tests covering both paths.1 parent 3fe241a commit 49ae7ca
2 files changed
Lines changed: 93 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
7396 | 7396 | | |
7397 | 7397 | | |
7398 | 7398 | | |
| 7399 | + | |
| 7400 | + | |
| 7401 | + | |
| 7402 | + | |
| 7403 | + | |
| 7404 | + | |
| 7405 | + | |
| 7406 | + | |
| 7407 | + | |
| 7408 | + | |
| 7409 | + | |
| 7410 | + | |
| 7411 | + | |
| 7412 | + | |
| 7413 | + | |
| 7414 | + | |
| 7415 | + | |
| 7416 | + | |
| 7417 | + | |
| 7418 | + | |
| 7419 | + | |
| 7420 | + | |
| 7421 | + | |
| 7422 | + | |
| 7423 | + | |
| 7424 | + | |
| 7425 | + | |
| 7426 | + | |
| 7427 | + | |
| 7428 | + | |
| 7429 | + | |
| 7430 | + | |
| 7431 | + | |
| 7432 | + | |
| 7433 | + | |
| 7434 | + | |
| 7435 | + | |
| 7436 | + | |
| 7437 | + | |
| 7438 | + | |
| 7439 | + | |
| 7440 | + | |
| 7441 | + | |
| 7442 | + | |
| 7443 | + | |
| 7444 | + | |
| 7445 | + | |
| 7446 | + | |
| 7447 | + | |
| 7448 | + | |
| 7449 | + | |
| 7450 | + | |
| 7451 | + | |
| 7452 | + | |
| 7453 | + | |
| 7454 | + | |
| 7455 | + | |
| 7456 | + | |
| 7457 | + | |
| 7458 | + | |
| 7459 | + | |
| 7460 | + | |
| 7461 | + | |
| 7462 | + | |
| 7463 | + | |
| 7464 | + | |
| 7465 | + | |
| 7466 | + | |
| 7467 | + | |
| 7468 | + | |
| 7469 | + | |
| 7470 | + | |
| 7471 | + | |
| 7472 | + | |
| 7473 | + | |
| 7474 | + | |
| 7475 | + | |
7399 | 7476 | | |
7400 | 7477 | | |
7401 | 7478 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
345 | 345 | | |
346 | 346 | | |
347 | 347 | | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
348 | 357 | | |
349 | 358 | | |
350 | 359 | | |
| |||
3180 | 3189 | | |
3181 | 3190 | | |
3182 | 3191 | | |
3183 | | - | |
| 3192 | + | |
| 3193 | + | |
| 3194 | + | |
| 3195 | + | |
| 3196 | + | |
3184 | 3197 | | |
3185 | | - | |
| 3198 | + | |
| 3199 | + | |
3186 | 3200 | | |
3187 | 3201 | | |
3188 | 3202 | | |
| |||
0 commit comments