fix(docs): fixed docs script to reflect the new output format for all blocks#653
fix(docs): fixed docs script to reflect the new output format for all blocks#653waleedlatif1 merged 2 commits intostagingfrom
Conversation
|
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
There was a problem hiding this comment.
PR Summary
Extensive documentation update across all tool and block files to remove the 'response' wrapper object from output structures, reflecting a breaking change in the block output format.
- Modified
scripts/generate-block-docs.tsto handle flat field outputs and improve output extraction with fallback support - Updated 40+ tool documentation files (e.g.
apps/docs/content/docs/tools/*.mdx) to directly expose output fields rather than nesting under a 'response' object - Simplified output parameter tables by removing nested '↳' notation and flattening the structure
- Added better type inference for generated markdown tables in the documentation generator
- Enhanced error handling and logging for documentation output processing
54 files reviewed, 22 comments
Edit PR Review Bot Settings | Greptile
| | Output | Type | Description | | ||
| | ------ | ---- | ----------- | | ||
| | `response` | object | Output from response | | ||
| | ↳ `content` | string | content of the response | | ||
| | `content` | string | content output from the block | |
There was a problem hiding this comment.
style: The output table's description could be more specific - consider "Raw text content extracted from the target URL"
| | `total_items` | number | total_items output from the block | | ||
| | `page_count` | number | page_count output from the block | | ||
| | `items` | json | items output from the block | |
There was a problem hiding this comment.
style: improve description formatting consistency - other blocks capitalize first word of descriptions
|
|
||
| | Output | Type | Description | | ||
| | ------ | ---- | ----------- | | ||
| | `response` | object | Output from response | | ||
| | ↳ `results` | json | results of the response | | ||
| | ↳ `answer` | any | answer of the response | | ||
| | ↳ `query` | string | query of the response | | ||
| | ↳ `content` | string | content of the response | | ||
| | ↳ `title` | string | title of the response | | ||
| | ↳ `url` | string | url of the response | | ||
| | `results` | json | results output from the block | | ||
| | `answer` | any | answer output from the block | | ||
| | `query` | string | query output from the block | | ||
| | `content` | string | content output from the block | | ||
| | `title` | string | title output from the block | | ||
| | `url` | string | url output from the block | |
There was a problem hiding this comment.
style: Missing response type definitions. The output parameter types should be more specific than 'json' and 'any'. Consider defining exact types like string[], object, etc.
| - **result**: The value returned by your function | ||
| - **stdout**: Any console output from your function |
There was a problem hiding this comment.
style: update output fields documentation to include type information (e.g., result: any and stdout: string)
| | `description` | string | description output from the block | | ||
| | `created` | string | created output from the block | | ||
| | `updated` | string | updated output from the block | | ||
| | `success` | boolean | success output from the block | |
There was a problem hiding this comment.
logic: Data type for 'success' should be 'string' to match actual output shown in jira_update and jira_write tool sections
| | `success` | boolean | success output from the block | | |
| | `success` | string | success output from the block | |
| | ------ | ---- | ----------- | | ||
| | `response` | object | Output from response | | ||
| | ↳ `tweet` | json | tweet of the response | | ||
| | ↳ `replies` | any | replies of the response | | ||
| | ↳ `context` | any | context of the response | | ||
| | ↳ `tweets` | json | tweets of the response | | ||
| | ↳ `includes` | any | includes of the response | | ||
| | ↳ `meta` | json | meta of the response | | ||
| | ↳ `user` | json | user of the response | | ||
| | ↳ `recentTweets` | any | recentTweets of the response | | ||
| | `tweet` | json | tweet output from the block | | ||
| | `replies` | any | replies output from the block | | ||
| | `context` | any | context output from the block | | ||
| | `tweets` | json | tweets output from the block | | ||
| | `includes` | any | includes output from the block | | ||
| | `meta` | json | meta output from the block | | ||
| | `user` | json | user output from the block | | ||
| | `recentTweets` | any | recentTweets output from the block | |
There was a problem hiding this comment.
style: Inconsistent type casing. All types should follow consistent casing - either 'JSON' or 'json', 'Any' or 'any'
|
|
||
| | Output | Type | Description | | ||
| | ------ | ---- | ----------- | | ||
| | `response` | object | Output from response | | ||
| | ↳ `content` | string | content of the response | | ||
| | ↳ `metadata` | json | metadata of the response | | ||
| | ↳ `updatedContent` | boolean | updatedContent of the response | | ||
| | `content` | string | content output from the block | | ||
| | `metadata` | json | metadata output from the block | | ||
| | `updatedContent` | boolean | updatedContent output from the block | |
There was a problem hiding this comment.
style: Description text should be capitalized for consistency with other fields in the documentation ('content output' -> 'Content output')
| | `results` | json | results output from the block | | ||
| | `similarLinks` | json | similarLinks output from the block | | ||
| | `answer` | string | answer output from the block | | ||
| | `citations` | json | citations output from the block | |
There was a problem hiding this comment.
style: Consider adding descriptions more specific to each field's contents/purpose rather than just stating they are 'output from the block'
| | `results` | json | results output from the block | | |
| | `similarLinks` | json | similarLinks output from the block | | |
| | `answer` | string | answer output from the block | | |
| | `citations` | json | citations output from the block | | |
| | `results` | json | Contains search results including title, URL, and text snippets for exa_search operations | | |
| | `similarLinks` | json | List of related URLs and their similarity scores for exa_find_similar_links operations | | |
| | `answer` | string | AI-generated response to the query for exa_answer operations | | |
| | `citations` | json | Source URLs and text snippets that support the answer for exa_answer operations | |
| | `tweet` | json | tweet output from the block | | ||
| | `replies` | any | replies output from the block | | ||
| | `context` | any | context output from the block | | ||
| | `tweets` | json | tweets output from the block | | ||
| | `includes` | any | includes output from the block | | ||
| | `meta` | json | meta output from the block | | ||
| | `user` | json | user output from the block | | ||
| | `recentTweets` | any | recentTweets output from the block | |
There was a problem hiding this comment.
style: Output descriptions are generic and not descriptive enough. Add specific details about what each field contains
| | ------ | ---- | ----------- | | ||
| | `response` | object | Output from response | | ||
| | ↳ `content` | string | content of the response | | ||
| | ↳ `metadata` | json | metadata of the response | | ||
| | `content` | string | content output from the block | | ||
| | `metadata` | json | metadata output from the block | |
There was a problem hiding this comment.
style: output parameter descriptions should be capitalized and end with periods to match style of input parameter descriptions above
|
✅ No security or compliance issues detected. Reviewed everything up to 7e97a7c. Security Overview
Detected Code Changes
Reply to this PR with |
… blocks (simstudioai#653) * fix(docs): fixed tool docs generator script to match new output structure from blocks * updated outdated docs
Description
fixed docs script to reflect the new output format for all blocks, since we got rid of the
responsewrapperType of change
How Has This Been Tested?
Ran the script and ensured that all outputs were not corrupted, but just reflected the new output structure
Checklist:
bun run test)Security Considerations: