| ... | ... | @@ -3072,6 +3072,10 @@ function OpenCommandPaletteDialog(props: { |
| 3072 | 3072 | ? "Create & Add" |
| 3073 | 3073 | : "Add"; |
| 3074 | 3074 | const addShortcutLabel = hasHighlightedBrowseItem ? `${submitModifierLabel} Enter` : "Enter"; |
| 3075 | const hasHighlightedNewProjectItem = newProjectFlow !== null && highlightedItemValue !== null; |
| 3076 | const createShortcutLabel = hasHighlightedNewProjectItem |
| 3077 | ? `${submitModifierLabel} Enter` |
| 3078 | : "Enter"; |
| 3075 | 3079 | const remoteProjectButtonLabel = addProjectCloneFlow |
| 3076 | 3080 | ? addProjectCloneFlow.source === "url" |
| 3077 | 3081 | ? "Continue" |
| ... | ... | @@ -3165,15 +3169,17 @@ function OpenCommandPaletteDialog(props: { |
| 3165 | 3169 | } |
| 3166 | 3170 | |
| 3167 | 3171 | // Enter creates the project unless an item below the name is |
| 3168 | | // highlighted, in which case it runs that item. |
| 3172 | // highlighted, in which case it runs that item. Mod+Enter always creates. |
| 3169 | 3173 | if ( |
| 3170 | 3174 | newProjectFlow !== null && |
| 3171 | 3175 | event.key === "Enter" && |
| 3172 | | highlightedItemValue === null && |
| 3176 | (!hasHighlightedNewProjectItem || isPrimaryModifierPressed(event)) && |
| 3173 | 3177 | // Enter that confirms an IME composition is part of typing the name. |
| 3174 | 3178 | !event.nativeEvent.isComposing && |
| 3175 | 3179 | event.keyCode !== 229 |
| 3176 | 3180 | ) { |
| 3181 | // Base UI would otherwise also click the highlighted row. |
| 3182 | (event as typeof event & { preventBaseUIHandler?: () => void }).preventBaseUIHandler?.(); |
| 3177 | 3183 | event.preventDefault(); |
| 3178 | 3184 | void submitNewProject(); |
| 3179 | 3185 | return; |
| ... | ... | @@ -3383,7 +3389,7 @@ function OpenCommandPaletteDialog(props: { |
| 3383 | 3389 | size="xs" |
| 3384 | 3390 | tabIndex={-1} |
| 3385 | 3391 | className="absolute inset-e-2.5 top-1/2 -translate-y-1/2" |
| 3386 | | aria-label="Create (Enter)" |
| 3392 | aria-label={`Create (${createShortcutLabel})`} |
| 3387 | 3393 | disabled={!canSubmitNewProject} |
| 3388 | 3394 | onMouseDown={(event) => { |
| 3389 | 3395 | event.preventDefault(); |
| ... | ... | @@ -3396,10 +3402,10 @@ function OpenCommandPaletteDialog(props: { |
| 3396 | 3402 | > |
| 3397 | 3403 | <span>{isCreatingNewProject ? "Creating" : "Create"}</span> |
| 3398 | 3404 | <KbdGroup className="pointer-events-none -me-0.5"> |
| 3399 | | <Kbd>Enter</Kbd> |
| 3405 | <Kbd>{createShortcutLabel}</Kbd> |
| 3400 | 3406 | </KbdGroup> |
| 3401 | 3407 | </TooltipTrigger> |
| 3402 | | <TooltipPopup side="top">Create (Enter)</TooltipPopup> |
| 3408 | <TooltipPopup side="top">{`Create (${createShortcutLabel})`}</TooltipPopup> |
| 3403 | 3409 | </Tooltip> |
| 3404 | 3410 | ) : addProjectCloneFlow?.step === "repository" ? ( |
| 3405 | 3411 | <Tooltip> |
| ... | ... | @@ -3512,8 +3518,9 @@ function OpenCommandPaletteDialog(props: { |
| 3512 | 3518 | inputProps={{ |
| 3513 | 3519 | // The submit button is absolutely positioned over the field, so the |
| 3514 | 3520 | // inner input must reserve enough room for the full action label. |
| 3515 | | className: |
| 3516 | | addProjectCloneFlow?.step === "repository" || newProjectFlow !== null |
| 3521 | className: hasHighlightedNewProjectItem |
| 3522 | ? "*:data-[slot=autocomplete-input]:pe-38!" |
| 3523 | : addProjectCloneFlow?.step === "repository" || newProjectFlow !== null |
| 3517 | 3524 | ? "*:data-[slot=autocomplete-input]:pe-32!" |
| 3518 | 3525 | : isBrowsing |
| 3519 | 3526 | ? browseInputEndPaddingClass({ |