🛠️ chore: Typing and Remove Comments (#9732)

* chore: Update documentation for formatToolContent function, remove JSDoc types and duplicate comments

* chore: fix type errors due to attachment.filename in Attachment component
This commit is contained in:
Danny Avila 2025-09-19 16:22:53 -04:00 committed by GitHub
parent 68c9f668c1
commit aae3694b11
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 14 additions and 20 deletions

View file

@ -81,22 +81,14 @@ function parseAsString(result: t.MCPToolCallResponse): string {
return text;
}
/**
* Converts MCPToolCallResponse content into recognized content block types
* Recognized types: "image", "image_url", "text", "json"
*
* @param {t.MCPToolCallResponse} result - The MCPToolCallResponse object
* @param {string} provider - The provider name (google, anthropic, openai)
* @returns {Array<Object>} Formatted content blocks
*/
/**
* Converts MCPToolCallResponse content into recognized content block types
* First element: string or formatted content (excluding image_url)
* Second element: image_url content if any
* Second element: Recognized types - "image", "image_url", "text", "json"
*
* @param {t.MCPToolCallResponse} result - The MCPToolCallResponse object
* @param {string} provider - The provider name (google, anthropic, openai)
* @returns {t.FormattedContentResult} Tuple of content and image_urls
* @param result - The MCPToolCallResponse object
* @param provider - The provider name (google, anthropic, openai)
* @returns Tuple of content and image_urls
*/
export function formatToolContent(
result: t.MCPToolCallResponse,