* improvement(integrations, models): ui/ux * fix(models, integrations): dedup ChevronArrow/provider colors, fix UTC date rendering - Extract PROVIDER_COLORS and getProviderColor to model-colors.ts to eliminate identical definitions in model-comparison-charts and model-timeline-chart - Remove duplicate private ChevronArrow from integration-card; import the exported one from model-primitives instead - Add timeZone: 'UTC' to formatShortDate so ISO date-only strings (parsed as UTC midnight) render the correct calendar day in all timezones * refactor(models): rename model-colors.ts to consts.ts * improvement(models): derive provider colors/resellers from definitions, reorient FAQs to agent builder Dynamic data: - Add `color` and `isReseller` fields to ProviderDefinition interface - Move brand colors for all 10 providers into their definitions - Mark 6 reseller providers (Azure, Bedrock, Vertex, OpenRouter, Fireworks) - consts.ts now derives color map from MODEL_CATALOG_PROVIDERS - model-comparison-charts derives RESELLER_PROVIDERS from catalog - Fix deepseek name: Deepseek → DeepSeek; remove now-redundant PROVIDER_NAME_OVERRIDES and getProviderDisplayName from utils - Add color/isReseller fields to CatalogProvider; clean up duplicate providerDisplayName in searchText array FAQs: - Replace all 4 main-page FAQs with 5 agent-builder-oriented ones covering model selection, context windows, pricing, tool use, and how to use models in a Sim agent workflow - buildProviderFaqs: add conditional tool use FAQ per provider - buildModelFaqs: add bestFor FAQ (conditional on field presence); improve context window answer to explain agent implications; tighten capabilities answer wording * chore(models): remove model-colors.ts (superseded by consts.ts) * update footer --------- Co-authored-by: waleed <walif6@gmail.com>
Block Documentation Generator
This directory contains scripts to automatically generate documentation for all blocks in the Sim platform.
Available Scripts
generate-docs.sh: Generates documentation for all blockssetup-doc-generator.sh: Installs dependencies required for the documentation generator
How It Works
The documentation generator:
- Scans the
apps/sim/blocks/blocks/directory for all block definition files - Extracts metadata from each block including:
- Name, description, and category
- Input and output specifications
- Configuration parameters
- Generates standardized Markdown documentation for each block
- Updates the navigation metadata in
meta.json
Running the Generator
To generate documentation manually:
# From the project root
./scripts/generate-docs.sh
Troubleshooting TypeScript Errors
If you encounter TypeScript errors when running the documentation generator, run the setup script to install the necessary dependencies:
./scripts/setup-doc-generator.sh
This will:
- Install TypeScript, ts-node, and necessary type definitions
- Create a proper tsconfig.json for the scripts directory
- Configure the scripts directory to use ES modules
Common Issues
- Missing Type Declarations: Run the setup script to install @types/node and @types/react
- JSX Errors in block-info-card.tsx: These don't affect functionality and can be ignored if you've run the setup script
- Module Resolution: The setup script configures proper ES module support
CI Integration
The documentation generator runs automatically as part of the CI/CD pipeline whenever changes are pushed to the main branch. The updated documentation is committed back to the repository.
Adding Support for New Block Properties
If you add new properties to block definitions that should be included in the documentation, update the generateMarkdownForBlock function in scripts/generate-docs.ts.
Preserving Manual Content
The documentation generator now supports preserving manually added content when regenerating docs. This allows you to enhance the auto-generated documentation with custom examples, additional context, or any other content without losing your changes when the docs are regenerated.
How It Works
- The generator creates clean documentation without any placeholders or markers
- If you add manual content to a file using special comment markers, that content will be preserved during regeneration
- The manual content is intelligently inserted at the appropriate section when docs are regenerated
Using Manual Content Markers
To add custom content to any tool's documentation, insert MDX comment blocks with section markers:
{/_ MANUAL-CONTENT-START:sectionName _/}
Your custom content here (Markdown formatting supported)
{/_ MANUAL-CONTENT-END _/}
Replace sectionName with one of the supported section names:
intro- Content at the top of the document after the BlockInfoCardusage- Additional usage instructions and examplesconfiguration- Custom configuration detailsoutputs- Additional output information or examplesnotes- Extra notes at the end of the document
Example
To add custom examples to a tool doc:
{/_ MANUAL-CONTENT-START:usage _/}
## Examples
### Basic Usage
```json
{
"parameter": "value",
"anotherParameter": "anotherValue"
}
```
Advanced Configuration
Here's how to use this tool for a specific use case... {/_ MANUAL-CONTENT-END _/}
When the documentation is regenerated, your manual content will be preserved in the appropriate section automatically. The script will not add any placeholders or markers to files by default.