Skip to content

Conversation

@KO1231
Copy link
Owner

@KO1231 KO1231 commented Nov 16, 2025

No description provided.

@github-actions
Copy link

Pull request from main branch is restricted.

@github-actions github-actions bot closed this Nov 16, 2025
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 38 to +41
@staticmethod
def _decode_body(body: str, headers: list[dict]) -> str:
return base64.urlsafe_b64decode(body).decode("utf-8")
return (base64.urlsafe_b64decode(body).decode("utf-8")
.replace("\r", "").replace("\n", "").replace("\t", ""))

Choose a reason for hiding this comment

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

P1 Badge Preserve whitespace in decoded email bodies

The new _decode_body now strips every carriage return, newline, and tab by replacing them with the empty string (lines 38‑41). For any multi‑line plain‑text email this merges adjacent tokens—for example "Order number:\n1234" becomes "Order number:1234"—and collapses paragraphs before the text is fed to the classifier. Because _encode_thread_messages forwards this string to both OpenAI/GPTOSS prompts, every classification request on emails containing line breaks now operates on corrupted content, which will noticeably hurt accuracy. The decoded body needs to preserve its whitespace (or at least replace it with spaces) instead of deleting it outright.

Useful? React with 👍 / 👎.

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