Skip to main content
Version: 2.4

tSM Studio Help

About the Program

tSM Studio is a powerful VS Code extension that provides essential features for working with Datalite's tSM software platform. It streamlines development, backup, and synchronization workflows for tSM servers.

Key Features

Quick Navigation


First Launch

Getting Started

The following steps are crucial for successful backup and synchronization. Follow them carefully to ensure optimal setup.

0. Prerequisites

First, you need to select a folder where data downloaded from the server will be stored.

Best Practice

It's highly recommended to initialize Git in this folder immediately:

git init

This allows you to:

  • Store data from individual servers in separate branches
  • Track changes over time
  • Rollback to previous states if needed

Recommended workflow:

  1. Keep the main branch clean with default configuration
  2. Create a dedicated branch for each server
  3. Switch to the server's branch before proceeding with setup

1. Server Setup

Configure the server connection in the extension settings.

Administrator Rights Required

The user must have administrator rights on the server if you need to upload data back to the server.

If migrating data between servers:

  • Configure connections for all servers involved in the migration
  • Test each connection before proceeding

2. Target Configuration

Review and customize the list of targets (entity types for backup and synchronization).

Action items:

  1. ✅ Review the preset list of entities
  2. ✅ Remove entities that don't exist on your server
  3. ✅ Add any missing entities specific to your setup
  4. ✅ Verify all entities meet the requirements
Important

Pay special attention to the requirements for added entities. Each entity must have a /page API endpoint available. Verify through tSM Public API.

Result: A customized list of entities relevant only to your server.


Main UI Elements

Application icon

Application Icon in the Action bar - Click to switch VS Code to tSM Studio working mode.

What happens on activation?

When you click the icon, the extension:

  • 🔄 Synchronizes with the local repository
  • 🚀 Starts the MCP server (accessible at http://127.0.0.1:32000/)
  • 📡 Makes the MCP server available to external applications

Local Files

Local Files panel

Panel displaying locally stored records from the server.

Panel Information:

  • Updated - Timestamp of the last save from cache to local storage
    note

    Direct file changes during cache synchronization have no effect

Toolbar:

  • Filter Filter by file name

Context Menu Commands

On Folders:

Context menu on folder

Right-click on a folder → Open Tabular Editor to work with a group of records

On Files:

Context menu on file
  • Single click - Open in standard edit mode
  • Right-click on SpEL files (scriptType: SPEL) - Open script in edit and validation mode

.tsm-audit.json

Automatically created audit file containing modification history.

Audit file view

Features:

  • 👤 Track who modified files
  • 📅 See when changes were made
  • 🔍 Context menu: "Show user by ID" - Display detailed user information
note

User information may be unavailable in some cases (e.g., deleted users)


Diff Cache

Diff Cache panel

Purpose: Temporary storage for records downloaded from the server. Shows the difference between local storage and the active server.

Panel Header:

  • Server name - Active server from which data is downloaded
  • Date, time - Last download timestamp
  • Connection status Connection status and server URL

Panel Commands

IconCommandDescription
DownloadDownload ALL to LocalSaves all data from cache to local disk
UploadUpload ALL to ServerUploads all local data to the server
ClearClear cacheClears the cache
Get dataGet data from serverDownloads fresh data from server
ConfigOpen configurationOpens settings panel
MenuMenuCreate SpEL or TQL query documents
Menu Options
Menu dropdown

Output Panel

Output panel

Purpose: Displays the extension's internal activity log for diagnostics and process monitoring.

How to open:

  • Keyboard shortcut: Ctrl+Shift+U (Windows/Linux) or Cmd+Shift+U (Mac)
  • Menu: View → Output
  • Then select tSM Studio from the dropdown

Features:

  • Autoscroll Enable automatic scrolling to track latest log entries
Debug Mode

The Output panel is invaluable for troubleshooting. Keep it open during initial setup or when diagnosing sync issues.


Tabular Editor

Purpose: Convenient spreadsheet-like interface for working with groups of records.

How to open:

  1. Right-click on a folder in the Local Files panel
  2. Select Open Tabular Editor from the context menu

Tabular editor toolbar

Tabular editor view

Toolbar Commands

IconCommandDescription
SaveSave All ChangesSaves all modified records
AddAdd RowCreates a new record for the entity type
DeleteDelete SelectedRemoves selected record(s)
Clear sortsClear SortsResets sorting to defaults
Export CSVExport to CSVExports records to CSV format
Export JSONExport to JSONExports records to JSON format

Editing Workflow

  1. Click on a cell to start editing
  2. Double-click on a cell to open a side panel for long text editing
  3. Orange dot in upper-right corner indicates unsaved changes
  4. Click Save All Changes when done
Bulk Operations

The Tabular Editor is ideal for making changes to multiple records at once. Use it for batch updates, data validation, or quick exports.


SpEL Editor

Purpose: Dedicated editor for validating, debugging, and executing SpEL scripts with real-time results.

How to open:

  1. Open a JSON file containing a SpEL script
  2. Right-click to open context menu
  3. Select Edit SpEL Script

Requirements:

  • JSON file must have property: { scriptType: "SPEL" }
  • The content property must contain the SpEL script

Features

Automatic Validation:

  • Script is automatically verified when opening the editor
  • Syntax errors are highlighted in real-time

Execution:

  • Keyboard: Ctrl + Enter or F5
  • Mouse: Click the run button in the toolbar
  • Results display in a side window (success or error details)

Toolbar Commands

IconCommandShortcutDescription
ExecuteExecute SpEL ExpressionCtrl+Enter / F5Runs the script and shows results
Select serviceSelect SpEL Microservice-Choose which microservice to use for execution

Current Microservice:

The selected microservice is also visible in the status bar:

Status bar with microservice

Development Workflow

Use the SpEL Editor to:

  • Test expressions before deploying to production
  • Debug complex scripts with immediate feedback
  • Experiment with different microservices
  • Validate syntax and logic

Git Integration

Why Git?

Initializing Git (git init) in your local storage folder provides powerful version control capabilities for your tSM configurations.

Benefits

Multi-Server Management:

  • Store data from individual servers in separate branches
  • Keep each server's configuration isolated
  • Easy switching between server contexts

Version Control:

  • Save backups in commits for each server
  • Return to previous configurations if needed
  • Track who changed what and when

Migration Workflows:

  • Merge branches to prepare for data migration
  • Compare configurations across servers
  • Test migrations in feature branches before applying

Git branch diagram

Workflow:

  1. Main branch - Keep clean with default/template configuration
  2. Server branches - One branch per server (e.g., server-prod, server-dev)
  3. Migration branch - Merge multiple server branches for complex migrations
  4. Feature branches - Test configuration changes before applying
Best Practice

Always commit after successful synchronization. Use descriptive commit messages like:

  • "Sync from PROD - 2026-01-23"
  • "Updated listing configurations"
  • "Added new process definitions"

Configuration

Server Management

Configure your tSM server connections for backup and synchronization.

SettingDescription
Display nameAny suitable name for the server. Used only for display within the extension.
Server URLComplete server address including https://
UsernameLogin name (must be registered on the server)
PasswordSecurely stored in VS Code secure storage
SSL Certificate (optional)Required only if the server uses a self-signed certificate
Security

Passwords are stored securely in VS Code's credential storage. Never commit credentials to version control.


Sync Targets

On first launch, the extension automatically creates .tsm/.tsm-sync.json to store synchronization configuration.

Configuration Structure

Each target is a JSON object with the following properties:

{
"folder": "Config/Listing/ListingProfile",
"entity": "ListingProfile",
"active": true,
"priority": "", // optional
"searchLimit": 3500, // optional, default 10000
"maxSizePerRequest": 200, // optional, default 5000
"filenamePattern": "<listingCode>/<code>-<userId>", // optional
"filtering": [ // optional
{
"field": "code",
"value": "Test",
"operator": "eq"
}
],
"ignoreDiffProps": [ "nextSendExec" ] // optional
}
Configuration Methods
  • Basic properties - Edit through the configuration panel UI
  • Advanced properties - Edit directly in .tsm/.tsm-sync.json

Property Reference

Required Properties

folder (Folder Path)

  • Specifies the local storage path for the entity
  • Created inside the environments folder
  • Allows logical grouping of related records

entity (Entity Type)

  • Must exactly match the Entity Type name on the server
  • Requires /page API endpoint to exist
  • Verify availability through tSM Public API
Entity Requirements

Entities without a /page API will cause errors (404, 403) during synchronization!

active (Boolean)

  • true - Include in synchronization
  • false - Temporarily deactivate without removing from config
  • Allows flexible control of sync scope
Optional Properties

priority (String)

  • Controls upload order to server
  • Lower values = earlier in queue
  • Only needed for special cases with strict ordering requirements
When to Use Priority

Use only when upload/deletion order matters for data integrity. In most cases, leave empty.

searchLimit (Number)

  • Maximum records downloaded per entity type
  • Default: 10000
  • Adjust based on server capacity and data volume

maxSizePerRequest (Number)

  • Records downloaded per iteration
  • Default: 5000
  • Reduce if encountering timeout errors
Performance Tuning

If you see timeout errors, gradually reduce maxSizePerRequest until stable. Find the sweet spot between speed and reliability.

filenamePattern (String)

  • Template for generating unique file names
  • Use when <code> values may repeat
  • Supports property placeholders and path separators

Examples:

Simple pattern with version:

{
"folder": "Process/ProcessDefinition",
"entity": "ProcessDefinition",
"filenamePattern": "<code>-<processVersion>"
}

Filename pattern example

Pattern with subfolders:

{
"folder": "Config/Listing/ListingColumn",
"entity": "ListingColumn",
"filenamePattern": "<listingCode>/<field>"
}

Filename pattern with subfolders

filtering (Array)

  • Download only records matching filter criteria
  • Multiple filters applied sequentially
  • Uses standard filter operators (eq, ne, gt, lt, etc.)

ignoreDiffProps (Array)

  • Property names to ignore when detecting changes
  • Prevents marking files as modified for specified properties
  • Useful for timestamps, counters, or other auto-updated fields
Use Case

Ignore properties like lastModified, executionCount, or other system-managed fields that change frequently but don't represent meaningful updates.


Backup and Synchronization

Starting a Sync

To initiate data synchronization, click:

  • The Get data icon in the Diff Cache panel, or
  • The "Connected: ..." text showing your active server

Workflow

1. Data Download

  • Extension downloads current data from the active server
  • Progress shown in Output panel

2. Difference Analysis

  • Data is compared with local storage
  • Changes are displayed in the Diff Cache panel

3. Review Changes

  • Examine what's changed
  • Verify updates before applying

4. Apply Changes

Choose one of these actions:

ActionIconDescription
Save to LocalDownloadAccept server changes and update local files
Upload to ServerUploadPush local changes to the server
Granular Control

Operations can be performed on:

  • Entire list - Use toolbar buttons
  • Individual records - Right-click for context menu

Context Menu Operations

Context menu on record

Right-click any file to:

  • Download/upload individually
  • View in compare mode
  • Exclude from sync
  • Delete locally or on server

Comparing Changes

Click any file in Diff Cache to open compare mode:

  • Left side: Local copy
  • Right side: Server version
  • Highlighting: Added, removed, and modified lines

Change Indicators

Each file shows an icon indicating its status:

IconStatusDescription
NewNewRecord exists on server but not locally
ModifiedModifiedRecord changed since last sync
DeletedDeletedRecord removed from server
FilteredFiltered OutRecord no longer matches filter criteria
Filtered Records

A "Filtered Out" status means the record still exists on the server, but changes to it prevent it from passing the filter configured in your sync targets.

Best Practices

Before Uploading to Server:

  1. ✅ Review all changes in compare mode
  2. ✅ Test configurations locally if possible
  3. ✅ Commit changes to Git
  4. ✅ Have a backup/rollback plan

After Successful Sync:

  1. ✅ Commit to Git with descriptive message
  2. ✅ Clear the cache if no further changes needed
  3. ✅ Document significant changes
Production Safety

Always be extra cautious when uploading to production servers. Consider testing changes in a development environment first.


AI Capabilities

tSM Studio provides powerful AI integration through Copilot Chat and MCP (Model Context Protocol) server support.

Copilot Chat Integration

No setup required - Ready to use immediately after installing tSM Studio.

Available Commands

Use @tsm to invoke the chatbot with these commands:

CommandPurposeExample
@tsm /autocompleteAuto-complete SpEL expressionsGet suggestions for partial code
@tsm /executeRun SpEL expressionsExecute and see results
@tsm /validateValidate SpEL syntaxCheck for errors before running
@tsm /docsQuery tSM documentationAsk questions about features
@tsm /guideGet chatbot helpLearn available commands
Quick Start

Simply type @tsm /guide in Copilot Chat to see all available commands and usage examples.


MCP Server (tsm-mcp)

Purpose: Extends tSM Studio capabilities to any MCP-compatible chat interface.

Server URL: http://127.0.0.1:32000/

Server Lifecycle

The MCP server starts automatically when you open tSM Studio and stops when you close it.

Supported Transports

  • SSE (Server-Sent Events) - Legacy transport: /sse
  • Streamable - Current standard: /mcp

VS Code Chat Configuration

Step 1: Create configuration file

Create .vscode/mcp.json in your project folder:

{
"servers": {
"tsm-mcp": {
"url": "http://127.0.0.1:32000/sse"
}
}
}

Step 2: Configure in VS Code

Open chat settings and configure the MCP server as needed.

MCP chat settings

Step 3: Activate tools

Enable individual tools in the MCP tools panel:

MCP tools view


Codex Integration

Configuration file: .codex/config.toml

Add this configuration:

[mcp_servers.tsm-mcp]
url = "http://127.0.0.1:32000/mcp"

Codex configuration


Other MCP-Compatible Clients

The setup process is similar for other applications that support MCP:

  1. Find the MCP configuration section
  2. Add server endpoint: http://127.0.0.1:32000/mcp (or /sse for legacy)
  3. Enable desired tools/features
  4. Ensure tSM Studio is running
Prerequisites

Remember: The MCP server only runs when tSM Studio is active in VS Code. Make sure to open the extension before using MCP features.

Use Cases

Development:

  • Auto-complete SpEL expressions while coding
  • Validate scripts before deployment
  • Quick documentation lookup

Debugging:

  • Execute SpEL expressions in context
  • Test different scenarios
  • Troubleshoot configuration issues

Learning:

  • Explore tSM APIs through conversational interface
  • Get code examples and best practices
  • Understand complex features
Pro Tip

Combine MCP with the SpEL Editor for a powerful development workflow: use chat for exploration and quick tests, then refine in the SpEL Editor.