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

Method yank

packages/pi-tui/src/components/input.ts:309–318  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

307 }
308
309 private yank(): void {
310 const text = this.killRing.peek();
311 if (!text) return;
312
313 this.pushUndo();
314
315 this.value = this.value.slice(0, this.cursor) + text + this.value.slice(this.cursor);
316 this.cursor += text.length;
317 this.lastAction = "yank";
318 }
319
320 private yankPop(): void {
321 if (this.lastAction !== "yank" || this.killRing.length <= 1) return;

Callers 1

handleInputMethod · 0.95

Calls 2

pushUndoMethod · 0.95
peekMethod · 0.80

Tested by

no test coverage detected