feat: mark recommended ask options

This commit is contained in:
Erik Kotsiuba
2026-08-12 14:18:59 +02:00
parent 4de596ae54
commit bd5f4520a3
20 changed files with 231 additions and 20 deletions
+9 -2
View File
@@ -311,16 +311,23 @@ export function mergeColumns(
}
export function measurePreviewLeftWidth(
options: Array<{ label: string; description?: string }>,
options: Array<{
description?: string;
label: string;
recommended?: boolean;
}>,
width: number
): number {
let widest = 0;
for (let index = 0; index < options.length; index++) {
const option = options[index];
const description = option.recommended
? `${UI_TEXT.recommendedMarker}${option.description ? ` | ${option.description}` : ""}`
: option.description;
widest = Math.max(
widest,
visibleWidth(`${index + 1}. ${option.label}`),
option.description ? visibleWidth(option.description) : 0
description ? visibleWidth(description) : 0
);
}