Skip to content

Strip ANSI escape codes from structuredContent#23

Merged
shellicar merged 1 commit intomainfrom
fix/ansi-strip-structured-content
Mar 26, 2026
Merged

Strip ANSI escape codes from structuredContent#23
shellicar merged 1 commit intomainfrom
fix/ansi-strip-structured-content

Conversation

@shellicar
Copy link
Copy Markdown
Owner

Summary

Ansi stripping was applied to content output but not to structuredContent. Programs that emit coloured output would produce raw escape sequences in the structured path.

Related Issues

Closes #12

Changes

  • Apply clean() to stdout and stderr of each result before building structuredContent

Co-Authored-By: Claude noreply@anthropic.com

@shellicar shellicar added this to the 1.0 milestone Mar 26, 2026
@shellicar shellicar added the bug Something isn't working label Mar 26, 2026
@shellicar shellicar self-assigned this Mar 26, 2026
@shellicar shellicar enabled auto-merge (squash) March 26, 2026 15:09
@shellicar shellicar disabled auto-merge March 26, 2026 15:09
Copy link
Copy Markdown
Collaborator

@bananabot9000 bananabot9000 left a comment

Choose a reason for hiding this comment

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

Clean fix. cleanedResults maps clean() + trimEnd() over stdout/stderr before building structuredContent, matching the existing treatment in the content path.

One canonical cleaning step, both output paths get the same treatment. Closes #12.

Session log is thorough — Stage 1/Stage 2 split with manual verification gate between them. Good discipline.

🍌

@shellicar shellicar force-pushed the fix/ansi-strip-structured-content branch from 09f1a70 to b14ee65 Compare March 26, 2026 15:12
@shellicar shellicar merged commit f752ede into main Mar 26, 2026
3 checks passed
@shellicar shellicar deleted the fix/ansi-strip-structured-content branch March 26, 2026 15:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ANSI escape codes not stripped from structuredContent

2 participants