MCPcopy
hub / github.com/bombshell-dev/clack / _setUserInput

Method _setUserInput

packages/core/src/prompts/prompt.ts:198–205  ·  view source on GitHub ↗
(value: string | undefined, write?: boolean)

Source from the content-addressed store, hash-verified

196 }
197
198 protected _setUserInput(value: string | undefined, write?: boolean): void {
199 this.userInput = value ?? '';
200 this.emit('userInput', this.userInput);
201 if (write && this._track && this.rl) {
202 this.rl.write(this.userInput);
203 this._cursor = this.rl.cursor;
204 }
205 }
206
207 protected _clearUserInput(): void {
208 this.rl?.write(null, { ctrl: true, name: 'u' });

Callers 8

promptMethod · 0.95
_clearUserInputMethod · 0.95
onKeypressMethod · 0.95
#refreshMethod · 0.80
#onKeyMethod · 0.80
#insertAtCursorMethod · 0.80
_shouldSubmitMethod · 0.80
constructorMethod · 0.80

Calls 1

emitMethod · 0.95

Tested by

no test coverage detected