zed icon indicating copy to clipboard operation
zed copied to clipboard

AI: Inline assist response inserted into wrong character position

Open quinncomendant opened this issue 5 months ago • 0 comments
trafficstars

Summary

Every time I use Inline Assist, the response is corrupted, like the merge starts at the wrong character position.

Description

Steps to trigger the problem:

  1. Reset Zed to clean install.
  2. Open a blank document, saved as text.txt.
  3. Type, Hello, World!
  4. Invoke inline assist and give it these instructions: Change Hello to Goodbye
  5. The result will be inserted at a random character position (perhaps the insertion point?)

Actual Behavior: The result is corrupted, LLM response is not merged in the text correctly, like this:

Image

Expected Behavior: The response should be exactly: Goodbye, World!

Model Provider Details

  • Provider: Anthropic via API key, OpenAI via API key
  • Model Name: it happens with both Sonnet 4 and GPT 4.1
  • Mode: Inline Assistant
  • MCP Servers in-use: none

A clue?

At one point the assistant output this text, which might be a clue what is broken:

I need to change "Hello" to "Goodbye", but I can only insert text at the marked location, not replace existing text. Since the insertion point is after "Hello, World!" and I cannot replace the existing "Hello", I cannot fulfill this request as stated.

Image

More screenshots:

Image Image Image Image Image

Zed Version and System Specs

Zed: v0.188.6 (Zed) OS: macOS 15.5.0 Memory: 32 GiB Architecture: aarch64

quinncomendant avatar Jun 04 '25 01:06 quinncomendant