Skip to content

refactor(voice): extract shared forwardedTextFor helper - #1918

Merged
ShayneP merged 1 commit into
fix/phantom-utterance-interrupted-transcriptfrom
refactor/forwarded-text-helper
Jun 30, 2026
Merged

refactor(voice): extract shared forwardedTextFor helper#1918
ShayneP merged 1 commit into
fix/phantom-utterance-interrupted-transcriptfrom
refactor/forwarded-text-helper

Conversation

@u9g

@u9g u9g commented Jun 30, 2026

Copy link
Copy Markdown
Contributor

Description

Refactors the interrupted-speech forwarded-text logic introduced in #1916 into a single shared forwardedTextFor helper used by both the pipeline and realtime reply paths, mirroring Python's _ForwardOutput.forwarded_text.

Changes Made

  • Add exported forwardedTextFor helper in generation.ts, typed on a shared ForwardOutput interface
  • Back SegmentOutput and MessageOutput with ForwardOutput, dropping the duplicated inline forwarded-text logic in both reply paths

Pre-Review Checklist

  • Build passes: All builds (lint, typecheck, tests) pass locally
  • AI-generated code reviewed: Removed unnecessary comments and ensured code quality
  • Changes explained: All changes are properly documented and justified above
  • Scope appropriate: All changes relate to the PR title

Testing

Additional Notes

Stacked on top of #1916 — base is fix/phantom-utterance-interrupted-transcript. Pure refactor, no behavior change.

Hoist the per-segment forwarded-text logic into a single forwardedTextFor
helper (mirroring Python's _ForwardOutput.forwarded_text) used by both the
pipeline and realtime reply paths, replacing the duplicated inline logic.
Introduce a shared ForwardOutput interface backing SegmentOutput and
MessageOutput.
@changeset-bot

changeset-bot Bot commented Jun 30, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 40bb87f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@ShayneP
ShayneP merged commit dfe9dfb into fix/phantom-utterance-interrupted-transcript Jun 30, 2026
1 of 2 checks passed
@ShayneP
ShayneP deleted the refactor/forwarded-text-helper branch June 30, 2026 16:00

@devin-ai-integration devin-ai-integration Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no bugs or issues to report.

Open in Devin Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants