mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 09:01:14 +00:00
fix(tui,coding-agent): add OSC 133 user message markers support closes #1805
This commit is contained in:
parent
689e7b4ac2
commit
4cb1a56b53
5 changed files with 41 additions and 6 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue