zed icon indicating copy to clipboard operation
zed copied to clipboard

Agent Panel: Python Gemini code include \```python \```

Open EddyDavies opened this issue 7 months ago • 3 comments

Summary

Gemini 2.5 pro preview generate code with backticks ```python <all the code> ```

Description

Steps to trigger the problem:

  1. Connect gemini through google api key
  2. Request gemini 2.5 pro preview to generate python code for existing file
  3. Backticks should appear around

Actual Behaviour: Backticks appear around code e.g. ```python
<all the code>
```

Expected Behaviour:
<all the code>

Zed Version and System Specs

Zed: v0.186.11 (Zed) OS: macOS 15.3.1 Memory: 16 GiB Architecture: aarch64

EddyDavies avatar May 20 '25 15:05 EddyDavies

Also happens with JSON Image

EddyDavies avatar May 21 '25 07:05 EddyDavies

This happens for me when in agent mode and Gemini tries to write a whole file, looks fine when it applies diffs.

mattdaw avatar May 21 '25 14:05 mattdaw

I have this problem too. Everything is surrounded by back ticks and it took many prompts for me to realize Gemini is not aware of them, it does not know they are there. Also is happens whether I ask it to add to a file that I created, or a file it creates, regardless. It seems Gemini just doesn't work, everything gets surrounded by backticks that it's unaware of.

orazdow avatar May 25 '25 19:05 orazdow

Fixed in #31439. Should be in Nightly already, and soon in Preview and Stable.

Please re-open this issue if you see the issue again (after the update)

osyvokon avatar May 27 '25 18:05 osyvokon