Skip to content
ƒtsforgev0.52.0
19

TypeScript language server

2 min read

VS Code uses the TypeScript language server for go-to-definition, find-all-references, and red squiggles. tsforge embeds the same engine in-process. You do not run a separate tsserver process.

It does two jobs:

  1. Navigation tools for the model on existing codebases (search symbols, rename, etc.)
  2. Write diagnostics after each edit (Write diagnostics)

The full-project gate still runs tsc separately when a task finishes. The language server is for faster, file-local feedback and smarter exploration.

Offered when tsforge detects real code to explore (existing repo, resumed session, non-empty tree). Omitted on greenfield scratch work so the model does not wander.

ToolWhat it does
searchripgrep by text pattern
symbol_searchfind declarations by name
find_referencesall usages of a symbol
go_to_definitionjump to where a symbol is declared
type_atinferred type at a position
impactblast radius: which files/lines reference a symbol (excluding its declaration)
symbol_context360° view: type, definition site(s), and every reference in one call
diagnosticserrors for one file on demand
rename_symbolrename across the project
move_filemove/rename a file and rewrite every importer
organize_importssort and clean imports

Navigation and write feedback (instant per-file type diagnostics after each edit) are always on for real work; navigation can be withheld for eval/headless runs with TSFORGE_NO_LSP_TOOLS=1.

On existing repos the model is also offered git_context: read-only, structured access to history and diffs (scope a fix to what changed). It is git-backed, not part of the language server, so TSFORGE_NO_LSP_TOOLS does not affect it; withhold it for eval/headless runs with TSFORGE_NO_GIT_TOOL=1. See Git context.

tsforge can apply TypeScript quick fixes that match its strict gate (imports, unused vars, missing await). It skips fixes that add ! or unsafe as casts.

On each write, tsforge can lint just the touched file for idioms tsc misses (same rules as the gate, scoped to one file).

  • tsconfig.json in the project for full semantic features
  • tsforge refreshes its view after harness writes so diagnostics stay current

Big picture · Write diagnostics · File ops