Skip to content

feat: add ClientMetadata to ToolResultPart#258

Open
carsonfarmer wants to merge 3 commits into
charmbracelet:mainfrom
carsonfarmer:feat/tool-result-client-metadata
Open

feat: add ClientMetadata to ToolResultPart#258
carsonfarmer wants to merge 3 commits into
charmbracelet:mainfrom
carsonfarmer:feat/tool-result-client-metadata

Conversation

@carsonfarmer

Copy link
Copy Markdown
Contributor

Closes #257.

Carries tool-level client metadata through the message round-trip so downstream consumers can use it for display reconstruction without polluting the LLM conversation context.

  • ToolResultPart.ClientMetadata (string, omitempty)
  • toResponseMessages copies from ToolResultContent.ClientMetadata
  • JSON marshal/unmarshal includes the new field

Carries tool-level client metadata through the message round-trip so
downstream consumers can use it for display reconstruction without
polluting the LLM conversation context.

- ToolResultPart.ClientMetadata (string, omitempty)
- toResponseMessages copies from ToolResultContent.ClientMetadata
- JSON marshal/unmarshal includes the new field
- JSON marshal/unmarshal test case includes ClientMetadata
- compareMessageParts checks ClientMetadata equality
- toResponseMessages test verifies ClientMetadata survives conversion
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: add ClientMetadata to ToolResultPart

1 participant