refactor: normalize channel capabilities typing

This commit is contained in:
Peter Steinberger
2026-01-17 07:58:54 +00:00
parent 1a4fc8dea6
commit e6477363e9
3 changed files with 22 additions and 17 deletions

View File

@@ -1,5 +1,5 @@
// eslint-disable-next-line no-control-regex
const DSR_PATTERN = /\x1b\[\??6n/g;
const ESC = String.fromCharCode(0x1b);
const DSR_PATTERN = new RegExp(`${ESC}\\[\\??6n`, "g");
export function stripDsrRequests(input: string): { cleaned: string; requests: number } {
let requests = 0;