fix(tui,coding-agent): add OSC 133 user message markers support closes #1805

This commit is contained in:
Mario Zechner 2026-03-04 18:33:22 +01:00
parent 689e7b4ac2
commit 4cb1a56b53
5 changed files with 41 additions and 6 deletions

View file

@ -111,6 +111,16 @@ describe("wrapTextWithAnsi", () => {
}
});
it("should ignore OSC 133 semantic markers in visible width", () => {
const text = "\x1b]133;A\x07hello\x1b]133;B\x07";
assert.strictEqual(visibleWidth(text), 5);
});
it("should ignore OSC sequences terminated with ST in visible width", () => {
const text = "\x1b]133;A\x1b\\hello\x1b]133;B\x1b\\";
assert.strictEqual(visibleWidth(text), 5);
});
it("should treat isolated regional indicators as width 2", () => {
assert.strictEqual(visibleWidth("🇨"), 2);
assert.strictEqual(visibleWidth("🇨🇳"), 2);