MCPcopy
hub / github.com/bombshell-dev/clack / #navigate

Method #navigate

packages/core/src/prompts/date.ts:213–224  ·  view source on GitHub ↗
(direction: 1 | -1)

Source from the content-addressed store, hash-verified

211 }
212
213 #navigate(direction: 1 | -1) {
214 this.inlineError = '';
215 this.#pendingTensDigit = null;
216 const ctx = this.#seg();
217 if (!ctx) return;
218 this.#cursor.segmentIndex = Math.max(
219 0,
220 Math.min(this.#segments.length - 1, ctx.index + direction)
221 );
222 this.#cursor.positionInSegment = 0;
223 this.#segmentSelected = true;
224 }
225
226 #adjust(direction: 1 | -1) {
227 const ctx = this.#seg();

Callers 2

#onCursorMethod · 0.95
#onKeyMethod · 0.95

Calls 1

#segMethod · 0.95

Tested by

no test coverage detected