MCPcopy Create free account
hub / github.com/MoonshotAI/kimi-code / pasteWithMarker

Function pasteWithMarker

packages/pi-tui/test/editor.test.ts:3819–3824  ·  view source on GitHub ↗

Helper: simulate a large paste that creates a marker

(editor: Editor)

Source from the content-addressed store, hash-verified

3817 describe("Paste marker atomic behavior", () => {
3818 /** Helper: simulate a large paste that creates a marker */
3819 function pasteWithMarker(editor: Editor): string {
3820 const bigContent = "line\n".repeat(20).trimEnd(); // 20 lines
3821 editor.handleInput(`\x1b[200~${bigContent}\x1b[201~`);
3822 // The editor replaces large pastes with a marker like "[paste #1 +20 lines]"
3823 return editor.getText();
3824 }
3825
3826 it("creates a paste marker for large pastes", () => {
3827 const editor = new Editor(createTestTUI(), defaultEditorTheme);

Callers 1

editor.test.tsFile · 0.85

Calls 2

handleInputMethod · 0.65
getTextMethod · 0.65

Tested by

no test coverage detected