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

Method submitValue

packages/pi-tui/src/components/editor.ts:1354–1368  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1352 }
1353
1354 private submitValue(): void {
1355 this.cancelAutocomplete();
1356 const result = this.expandPasteMarkers(this.state.lines.join("\n")).trim();
1357
1358 this.state = { lines: [""], cursorLine: 0, cursorCol: 0 };
1359 this.pastes.clear();
1360 this.pasteCounter = 0;
1361 this.exitHistoryBrowsing();
1362 this.scrollOffset = 0;
1363 this.undoStack.clear();
1364 this.lastAction = null;
1365
1366 if (this.onChange) this.onChange("");
1367 if (this.onSubmit) this.onSubmit(result);
1368 }
1369
1370 private handleBackspace(): void {
1371 this.exitHistoryBrowsing();

Callers 1

handleInputMethod · 0.95

Calls 4

cancelAutocompleteMethod · 0.95
expandPasteMarkersMethod · 0.95
exitHistoryBrowsingMethod · 0.95
clearMethod · 0.65

Tested by

no test coverage detected