TUSTEP for VS Code
Experimental, unofficial integration of TUSTEP into VS Code — in development. The extension is being built around persistent interactive TUSTEP sessions running in a VS Code terminal.
The TUSTEP behavior verified for this extension (dialog sessions, TSD start
files) and the target architecture are documented in
docs/tustep-session-integration.md in the repository.
Prerequisites
- A TUSTEP installation, usually in
/opt/tustepon Linux start -chas been run once for the user (creates the config files in~/.tustep)
The extension looks for the TUSTEP start program under the configured
tustep.tustepLib and falls back to the platform’s usual install locations
(Linux: /opt, /usr/local; Windows: the Program Files folders, where the
Windows installer puts TUSTEP into a folder ending in \tustep). When no
installation is found, it explains what was searched for — on macOS it
recognizes a TUSTEP.app bundle too.
Platform support: the session-in-a-terminal workflow has been verified
against the Linux TUSTEP, whose start program can be pointed at a start
file from a terminal. The Windows and macOS TUSTEPs are started as
applications (Start menu / iTerm-based TUSTEP.app) and do not document this
kind of start; on those systems the integrated session therefore needs a
Linux TUSTEP, locally or reachable via SSH. File issues about what you
encounter — the goal is to support what the platforms allow.
Usage
Start the session from the command palette (Ctrl+Shift+P →
TUSTEP: Start session), or by clicking the $(terminal) TUSTEP item in the
status bar. The interactive TUSTEP session opens in the terminal panel and
stays open; you can type commands directly into it.
Predefined commands
The extension ships a set of predefined TUSTEP commands, shown in the
Commands view next to the Sessions view: click an entry to send its command
into the open session. The same commands are available everywhere as tasks of
type tustep (Tasks: Run Task) — running such a task forwards the command to
the session instead of spawning a process.
The command list is configured through the tustep.commands setting (label,
raw TUSTEP command, optional description — for example a task labeled
“Create work file” with the command #DA, arbeit, SEQ-P setting up a permanent
sequential file named arbeit). An entry with a prompt asks for a value
before sending and substitutes it for $input. Without an open session,
executing a command asks to start one first.
The + button in the Commands view’s title bar guides through a new command
entry — name, command line and an optional input request — and saves it to
this workspace’s own command list; the predefined commands stay untouched.
Settings
| Setting | Default | Meaning |
|---|---|---|
tustep.tustepLib | /opt | Parent directory of the installation (TUSTEP_LIB, not /opt/tustep) |
tustep.workDir | Workspace folder | Working directory TUSTEP_DSK of the session |
tustep.scratchDir | <workspace>/.tustep-vscode/tmp | Scratch directory TUSTEP_SCR (created if missing) |
tustep.project | (empty) | Project TUSTEP_PRJ; a subdirectory of that name on work and scratch dir. Empty = no project: work files live directly on the carriers. |
tustep.sessionId | 00100000 | Unique 8-digit decimal session number TUSTEP_MEM; must not start with 000 |
tustep.commands | see manifest | Predefined TUSTEP commands offered in the Commands view and as tustep tasks |
tustep.userCommands | [] | Own workspace commands added via the + button; supplement the predefined list |
Development
npm install # typescript, @types, eslint, prettier, mocha, test-electron
npm run compile # tsc -> out/ (extension + tests)
npm run lint # eslint src
npm test # compile + lint + format:check, then unit and integration tests
Integration tests run through @vscode/test-electron in the fixture workspace
test/fixtures/workspaces/integration (a VS Code instance is downloaded into
.vscode-test/ on first run).
On Linux, the VS Code test instance can be kept off your screen by setting
TUSTEP_HEADLESS=1 (Chromium’s headless ozone platform, no display needed), or
by running the suite on an invisible Xvfb display (apt install xvfb):
TUSTEP_HEADLESS=1 npm test
xvfb-run -a npm test
Workspaces for tests and debugging
test/fixtures/workspaces/integration— opened by the integration test runner; restored to its pristine state (onlyREADME.md) before and after each run, so TUSTEP session files never leak into the repository.test/fixtures/workspaces/debug— opened by the “Run Extension” launch configuration for manual debugging; only itsREADME.mdis part of the repository, the session files a debugging run creates (start file, scratch, project directories,.tsfstate) are ignored.