Overview
The Simforge VS Code extension provides IDE integration for working with Simforge functions:- Jump to Portal: Quickly open functions in the Simforge web portal from your code
- Type Checking: Get real-time type checking for
simforge.call()invocations (TypeScript only)
Installation
From VS Code Marketplace
- Open VS Code
- Go to Extensions (
Cmd+Shift+XorCtrl+Shift+X) - Search for “Simforge”
- Click Install
From Command Line
Configuration
Set API Key
The extension needs your Simforge API key to fetch function schemas for type checking. Option 1: Settings UI- Open VS Code Settings (
Cmd+,orCtrl+,) - Search for “Simforge”
- Enter your API key in the Simforge: Api Key field
- Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run Simforge: Set API Key
- Enter your API key
Configuration Options
| Setting | Type | Default | Description |
|---|---|---|---|
simforge.apiKey | string | "" | Your Simforge API key |
simforge.typeChecking.enabled | boolean | true | Enable type checking for simforge.call() |
simforge.typeChecking.cacheTimeout | number | 300000 | Cache timeout in milliseconds (default: 5 minutes) |
Features
Jump to Portal
Hover over asimforge.call() invocation and click Open in Simforge Portal to open the function in your browser.
Or use the Command Palette:
- Place your cursor on a
simforge.call()invocation - Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run Simforge: Open in Portal
Type Checking
The extension provides real-time type checking for function calls:Refresh Types
If you’ve updated a function in the portal, refresh the cached schemas:- Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run Simforge: Refresh Types
Clear Cache
To clear all cached data:- Open Command Palette (
Cmd+Shift+PorCtrl+Shift+P) - Run Simforge: Clear Cache
Commands
| Command | Description |
|---|---|
Simforge: Set API Key | Set your Simforge API key |
Simforge: Open in Portal | Open current function in web portal |
Simforge: Refresh Types | Refresh cached function schemas |
Simforge: Clear Cache | Clear all cached data |
Supported Languages
The extension supports type checking in:- TypeScript (
.ts,.tsx)
Troubleshooting
Type checking not working
- Ensure your API key is set correctly
- Check that the function name matches exactly (case-sensitive)
- Try running Simforge: Refresh Types
- Check the Output panel (
View > Output > Simforge) for errors
Extension not activating
The extension activates when you open a TypeScript file. Check:- The file has the correct extension (
.tsor.tsx) - The extension is installed and enabled
- Reload VS Code (
Developer: Reload Window)
Connection errors
If you’re getting connection errors:- Check your internet connection
- Ensure your API key is valid
- Check if you’re behind a firewall or proxy