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

Method setText

packages/pi-tui/src/components/editor.ts:1106–1116  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

1104 }
1105
1106 setText(text: string): void {
1107 this.cancelAutocomplete();
1108 this.lastAction = null;
1109 this.exitHistoryBrowsing();
1110 const normalized = this.normalizeText(text);
1111 // Push undo snapshot if content differs (makes programmatic changes undoable)
1112 if (this.getText() !== normalized) {
1113 this.pushUndoSnapshot();
1114 }
1115 this.setTextInternal(normalized);
1116 }
1117
1118 /**
1119 * Insert text at the current cursor position.

Callers

nothing calls this directly

Calls 6

cancelAutocompleteMethod · 0.95
exitHistoryBrowsingMethod · 0.95
normalizeTextMethod · 0.95
getTextMethod · 0.95
pushUndoSnapshotMethod · 0.95
setTextInternalMethod · 0.95

Tested by

no test coverage detected