vtmode

package
v0.3.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2026 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Overview

Package vtmode scans a terminal byte stream for DEC private-mode set/reset sequences. Shared by the daemon (to replay modes on attach) and the desktop TUI (to know when the agent owns the mouse).

Index

Constants

View Source
const ScrollbackLines = 10000

ScrollbackLines is the emulator history depth, shared so the desktop TUI's pager can page back through exactly what the daemon-side emulator retains.

Variables

This section is empty.

Functions

func UpdatePrivateModes

func UpdatePrivateModes(b []byte, modes map[int]bool)

UpdatePrivateModes scans b for DEC private-mode set/reset sequences (ESC [ ? params h/l) and applies them to modes: set on 'h', delete on 'l'. A sequence split across chunks won't match; that's rare (escapes are tiny vs. chunk size) and self-corrects on the next mode change. claude sets its modes once at startup in a single chunk, so they're captured reliably.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL