fix(acp): address code review comments on PR #46863

- Remove redundant getBlockCount() check (accumulatedBlockText.trim() is sufficient)
- Simplifies condition for final TTS synthesis
- Addresses Codex review feedback
This commit is contained in:
Contributor 2026-03-21 11:22:06 +08:00
parent 5e6204b677
commit 30f0aa827d

View File

@ -314,7 +314,7 @@ export async function tryDispatchAcpReply(params: {
await projector.flush(true);
const ttsMode = resolveTtsConfig(params.cfg).mode ?? "final";
const accumulatedBlockText = delivery.getAccumulatedBlockText();
if (ttsMode === "final" && delivery.getBlockCount() > 0 && accumulatedBlockText.trim()) {
if (ttsMode === "final" && accumulatedBlockText.trim()) {
try {
const ttsSyntheticReply = await maybeApplyTtsToPayload({
payload: { text: accumulatedBlockText },