Relocate src/common/primitives and src/common/runtime to src/primitives
and src/runtime. Add src/tsconfig.json as the primitives+runtime solution.
Update tsconfigs, esbuild, webpack aliases, publish path, and docs.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
- Add composite TypeScript projects for common/primitives and common/runtime
- Decouple primitives from runtime (buffer service interfaces, UnicodeProperties, CellTypes, etc.)
- Move Types.ts to runtime; re-export primitive types from runtime/Types
- Rename src/browser -> src/target-browser, src/headless -> src/target-headless
- Update import paths (target-browser/*, target-headless/*) across repo
- Fix esbuild outbase so common/* and target-* resolve under out-esbuild/
- Point unicode addons at primitives for UnicodeTypes/UnicodeProperties
- Update ARCHITECTURE.md and AGENTS.md
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Reorganize src/common per issue #5963: move building blocks under
primitives/ and services/integration under runtime/. Preserve existing
common/* import paths via TypeScript path mapping. Add src/ARCHITECTURE.md
documenting modules and goals.
Fix two relative imports broken by the directory depth change.
Co-authored-by: Daniel Imms <Tyriar@users.noreply.github.com>
Refs #5176.
forEachDecorationAtCell and getDecorationsAtCell previously scanned every
registered decoration on each call. With thousands of search highlights this
becomes O(total decorations) per cell and blocks rendering during viewport
refreshes.
Maintain a Map of buffer line -> decorations that cover that line. Multi-line
decorations are indexed on every line in their span, so mixed single-line and
multi-line workloads stay fast without falling back to a full scan.
Keep the index aligned with buffer mutations:
- Register and unregister decorations in the line buckets on add/dispose.
- On trim, shift line keys synchronously (before marker handlers run).
- On insert/delete, re-index affected decorations in a microtask after marker
line updates are applied.
Inject IBufferService so line listeners follow the active buffer. Add unit
tests for trim, dispose-on-trim, insert, and dense single-line plus multi-line
lookup. Add DecorationService.benchmark.ts to measure sparse hits and
viewport-sized grid scans with 20k decorations.
Co-authored-by: Cursor <cursoragent@cursor.com>
- reorder exception throwing to be sync to band position
- document WriteBuffer._innerWrite
- remove any declarations
- remove conditional assigments
- use faster return value branching in all parsers
- remove dead code in benchmark
- better perf for short DCS without params (8 times faster)
- test perf for class and string based interfaces of OSC and DCS
separately
- undo wrong commit on parser
1. add 8 secs timeout for SerializeAddon API test
2. move demo page's addons control panel into a single div
3. remove unnecessary config in demo page
4. remove v8-profiler-node8 dependency
5. remove duplicate css option