feat: add AskUserDialog for UI component of AskUser tool (#17344)

Co-authored-by: jacob314 <jacob314@gmail.com>
This commit is contained in:
Jack Wotherspoon
2026-01-23 15:42:48 -05:00
committed by GitHub
parent 25c0802b52
commit 2c0cc7b9a5
10 changed files with 3009 additions and 1 deletions

View File

@@ -31,6 +31,7 @@ export interface BaseSelectionListProps<
showScrollArrows?: boolean;
maxItemsToShow?: number;
wrapAround?: boolean;
focusKey?: string;
renderItem: (item: TItem, context: RenderItemContext) => React.ReactNode;
}
@@ -61,6 +62,7 @@ export function BaseSelectionList<
showScrollArrows = false,
maxItemsToShow = 10,
wrapAround = true,
focusKey,
renderItem,
}: BaseSelectionListProps<T, TItem>): React.JSX.Element {
const { activeIndex } = useSelectionList({
@@ -71,6 +73,7 @@ export function BaseSelectionList<
isFocused,
showNumbers,
wrapAround,
focusKey,
});
const [scrollOffset, setScrollOffset] = useState(0);
@@ -143,7 +146,7 @@ export function BaseSelectionList<
</Box>
{/* Item number */}
{showNumbers && (
{showNumbers && !item.hideNumber && (
<Box
marginRight={1}
flexShrink={0}