Skip to content

fix(agent): handle UTF-16 files in agent edit#149

Open
hechibing wants to merge 1 commit intoCortexLM:mainfrom
hechibing:fix/agent-edit-utf16-11203
Open

fix(agent): handle UTF-16 files in agent edit#149
hechibing wants to merge 1 commit intoCortexLM:mainfrom
hechibing:fix/agent-edit-utf16-11203

Conversation

@hechibing
Copy link

Summary

  • replace UTF-8-only reads in �gent edit flow with
    ead_file_with_encoding
  • use byte-for-byte backup for rollback so original encoding is preserved
  • add regression test covering UTF-16 LE + BOM read path used by edit flow

Why

�gent edit used
ead_to_string, which fails on UTF-16 files even though agent loading supports UTF-16.

Validation

  • cargo test -p cortex-cli test_read_file_with_encoding_supports_utf16_for_edit_flow -- --nocapture

Related bounty report: PlatformNetwork/bounty-challenge#11203

Copy link

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

Your free trial has ended. If you'd like to continue receiving code reviews, you can add a payment method here.

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.

1 participant