MCPcopy Index your code
hub / github.com/wavetermdev/waveterm / selectVisibleNodeAt

Function selectVisibleNodeAt

frontend/app/treeview/treeview.tsx:358–368  ·  view source on GitHub ↗
(index: number)

Source from the content-addressed store, hash-verified

356 };
357
358 const selectVisibleNodeAt = (index: number) => {
359 if (index < 0 || index >= visibleRows.length) {
360 return;
361 }
362 const row = visibleRows[index];
363 if (row.kind !== "node") {
364 return;
365 }
366 commitSelection(row.id);
367 scrollToId(row.id);
368 };
369
370 const onKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {
371 const selectedIndex = selectedId != null ? idToIndex.get(selectedId) : undefined;

Callers 1

onKeyDownFunction · 0.85

Calls 2

commitSelectionFunction · 0.85
scrollToIdFunction · 0.85

Tested by

no test coverage detected