refactor(agents): hide pty paste markers · openclaw/openclaw@479e9d9
vincentkoc
·
2026-06-17
·
via Recent Commits to openclaw:main
| Original file line number | Diff line number | Diff line change |
|---|
@@ -4,12 +4,7 @@
|
4 | 4 | */ |
5 | 5 | import { expect, test } from "vitest"; |
6 | 6 | import { buildCursorPositionResponse, stripDsrRequests } from "./pty-dsr.js"; |
7 | | -import { |
8 | | -BRACKETED_PASTE_END, |
9 | | -BRACKETED_PASTE_START, |
10 | | -encodeKeySequence, |
11 | | -encodePaste, |
12 | | -} from "./pty-keys.js"; |
| 7 | +import { encodeKeySequence, encodePaste } from "./pty-keys.js"; |
13 | 8 | |
14 | 9 | const ESC = "\x1b"; |
15 | 10 | |
@@ -120,8 +115,8 @@ test("encodeKeySequence supports hex + literal with warnings", () => {
|
120 | 115 | |
121 | 116 | test("encodePaste wraps bracketed sequences by default", () => { |
122 | 117 | const payload = encodePaste("line1\nline2\n"); |
123 | | -expect(payload.startsWith(BRACKETED_PASTE_START)).toBe(true); |
124 | | -expect(payload.endsWith(BRACKETED_PASTE_END)).toBe(true); |
| 118 | +expect(payload.startsWith(`${ESC}[200~`)).toBe(true); |
| 119 | +expect(payload.endsWith(`${ESC}[201~`)).toBe(true); |
125 | 120 | }); |
126 | 121 | |
127 | 122 | test("stripDsrRequests removes cursor queries and counts them", () => { |
|
此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。