Skip to content

agent_ui: Fix panic when inserting context prefix with multi-byte characters (#48179) (cherry-pick to preview) - #48180

Merged
zed-zippy[bot] merged 1 commit into
v0.222.xfrom
cherry-pick-v0.222.x-9ee0f089
Feb 2, 2026
Merged

agent_ui: Fix panic when inserting context prefix with multi-byte characters (#48179) (cherry-pick to preview)#48180
zed-zippy[bot] merged 1 commit into
v0.222.xfrom
cherry-pick-v0.222.x-9ee0f089

Conversation

@zed-zippy

@zed-zippy zed-zippy Bot commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

Cherry-pick of #48179 to preview


Closes ZED-4R9

Introduced in #47768

The insert_context_prefix function was using byte offsets to check if
the prefix already exists at the cursor. This caused a panic with
multi-byte characters like emojis. Now uses character counts instead.

Release Notes:

  • Fixed a crash in the Agent Panel when inserting context mentions with
    emojis in the message editor.

…racters (#48179)

Closes ZED-4R9

Introduced in #47768

The `insert_context_prefix` function was using byte offsets to check if
the prefix already exists at the cursor. This caused a panic with
multi-byte characters like emojis. Now uses character counts instead.

Release Notes:

- Fixed a crash in the Agent Panel when inserting context mentions with
emojis in the message editor.
@cla-bot cla-bot Bot added the cla-signed The user has signed the Contributor License Agreement label Feb 2, 2026
@zed-zippy
zed-zippy Bot merged commit b1735ea into v0.222.x Feb 2, 2026
27 checks passed
@zed-zippy
zed-zippy Bot deleted the cherry-pick-v0.222.x-9ee0f089 branch February 2, 2026 11:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla-signed The user has signed the Contributor License Agreement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant