Skip to content

fix(tui): normalize carriage returns in question text#36088

Open
umi008 wants to merge 1 commit into
anomalyco:v2from
umi008:fix-question-carriage-return
Open

fix(tui): normalize carriage returns in question text#36088
umi008 wants to merge 1 commit into
anomalyco:v2from
umi008:fix-question-carriage-return

Conversation

@umi008

@umi008 umi008 commented Jul 9, 2026

Copy link
Copy Markdown

Issue for this PR

Closes #36040

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Some LLMs emit question strings containing \r (carriage return) characters. The parseQuestions function in the TUI split on newlines but did not strip \r, causing each word to render on its own line. Added .replace(/\r/g, "") to normalize the text before parsing.

How did you verify your code works?

  • tsgo --noEmit passes from packages/tui
  • Manual testing: questions now display correctly as flowing text

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

Models that emit \r characters in question strings cause the TUI to
render one word per line. Strip carriage returns in parseQuestions
before passing text to the renderer.

Fixes anomalyco#36040
@github-actions github-actions Bot added needs:issue needs:compliance This means the issue will auto-close after 2 hours. labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for your contribution!

This PR doesn't have a linked issue. All PRs must reference an existing issue.

Please:

  1. Open an issue describing the bug/feature (if one doesn't exist)
  2. Add Fixes #<number> or Closes #<number> to this PR description

See CONTRIBUTING.md for details.

@github-actions github-actions Bot removed the needs:compliance This means the issue will auto-close after 2 hours. label Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant