160bf915aa4661dd3f5a0991be09bfb9cb2223df
Closes #40097 When multiple files are added sequentially to the agent panel, the request JSON incorrectly includes "text" elements containing only spaces. These empty elements cause the Zhipu AI API to return a "text cannot be empty" error. The fix filters out any "text" elements that are empty or contain only whitespaces. UI state when the error occurs: <img width="300" alt="Image" src="https://github.com/user-attachments/assets/c55e5272-3f03-42c0-b412-fa24be2b0043" /> Request JSON (causing the error): ``` { "model": "glm-4.6", "messages": [ { "role": "system", "content": "<<CUT>>" }, { "role": "user", "content": [ { "type": "text", "text": "[@1.txt](zed:///agent/file?path=C%3A%5CTemp%5CTest%5C1.txt)" }, { "type": "text", "text": " " }, { "type": "text", "text": "[@2.txt](zed:///agent/file?path=C%3A%5CTemp%5CTest%5C2.txt)" }, { "type": "text", "text": " describe" }, ``` Release Notes: - Fixed an issue when an OpenAI request contained whitespace-only text content Co-authored-by: Bennet Bo Fenner <bennetbo@gmx.de>
language_models: Filter out whitespace-only text content parts for OpenAI and OpenAI compatible providers (#40316)
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager.
Other platforms are not yet available:
- Web (tracking issue)
Developing Zed
- Building Zed for macOS
- Building Zed for Linux
- Building Zed for Windows
- Running Collaboration Locally
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Description
GPUI – Community Edition maintained by Oak Team
https://gpui-ce.github.io/
257 MiB
Languages
Rust
95.5%
WGSL
1.2%
Metal
1.1%
HLSL
1.1%
Python
0.7%
Other
0.3%