Skip to content

Support multi-part tool results - #2

Open
ZOI-dayo wants to merge 1 commit into
egemengol:mainfrom
ZOI-dayo:fix/multi-part-tool-results
Open

Support multi-part tool results#2
ZOI-dayo wants to merge 1 commit into
egemengol:mainfrom
ZOI-dayo:fix/multi-part-tool-results

Conversation

@ZOI-dayo

Copy link
Copy Markdown

Description:

This PR updates the LanguageModelToolResult struct to support the multi-part content format introduced in Zed 1.1.0-pre (see zed-industries/zed#54518 ).

Changes:

  • Updated LanguageModelToolResult::content to Vec<LanguageModelToolResultContent> .
  • Implemented a custom Deserialize for LanguageModelToolResult to handle both:
    • The new format (array of objects).
    • The old format (single object), which is automatically wrapped in a Vec.

This ensures compatibility with both newer Zed exports and existing legacy exports.

Fixes: #1

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.

Deserialization Failed: missing field id

1 participant