Skip to content

Commit a5710ed

Browse files
committed
Revert "tui: keep model + thinking selectors beside Add file"
This reverts commit 426dcfa.
1 parent 2efdc9d commit a5710ed

1 file changed

Lines changed: 99 additions & 94 deletions

File tree

packages/app/src/components/prompt-input.tsx

Lines changed: 99 additions & 94 deletions
Original file line numberDiff line numberDiff line change
@@ -1291,7 +1291,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
12911291

12921292
<div class="pointer-events-none absolute bottom-2 left-2">
12931293
<div
1294-
class="pointer-events-auto flex items-center gap-1.5"
1294+
aria-hidden={store.mode !== "normal"}
1295+
class="pointer-events-auto"
12951296
style={{
12961297
"pointer-events": buttonsSpring() > 0.5 ? "auto" : "none",
12971298
}}
@@ -1320,99 +1321,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
13201321
<Icon name="plus" class="size-4.5" />
13211322
</Button>
13221323
</TooltipKeybind>
1323-
1324-
<Show
1325-
when={providers.paid().length > 0}
1326-
fallback={
1327-
<TooltipKeybind
1328-
placement="top"
1329-
gutter={8}
1330-
title={language.t("command.model.choose")}
1331-
keybind={command.keybind("model.choose")}
1332-
>
1333-
<Button
1334-
as="div"
1335-
variant="ghost"
1336-
size="small"
1337-
class="min-w-0 max-w-[240px] text-13-regular group"
1338-
style={{
1339-
opacity: buttonsSpring(),
1340-
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1341-
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1342-
}}
1343-
onClick={() => dialog.show(() => <DialogSelectModelUnpaid />)}
1344-
>
1345-
<Show when={local.model.current()?.provider?.id}>
1346-
<ProviderIcon
1347-
id={local.model.current()!.provider.id}
1348-
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
1349-
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
1350-
/>
1351-
</Show>
1352-
<span class="truncate">
1353-
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
1354-
</span>
1355-
<Icon name="chevron-down" size="small" class="shrink-0" />
1356-
</Button>
1357-
</TooltipKeybind>
1358-
}
1359-
>
1360-
<TooltipKeybind
1361-
placement="top"
1362-
gutter={8}
1363-
title={language.t("command.model.choose")}
1364-
keybind={command.keybind("model.choose")}
1365-
>
1366-
<ModelSelectorPopover
1367-
triggerAs={Button}
1368-
triggerProps={{
1369-
variant: "ghost",
1370-
size: "small",
1371-
style: {
1372-
opacity: buttonsSpring(),
1373-
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1374-
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1375-
},
1376-
class: "min-w-0 max-w-[240px] text-13-regular group",
1377-
}}
1378-
>
1379-
<Show when={local.model.current()?.provider?.id}>
1380-
<ProviderIcon
1381-
id={local.model.current()!.provider.id}
1382-
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
1383-
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
1384-
/>
1385-
</Show>
1386-
<span class="truncate">
1387-
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
1388-
</span>
1389-
<Icon name="chevron-down" size="small" class="shrink-0" />
1390-
</ModelSelectorPopover>
1391-
</TooltipKeybind>
1392-
</Show>
1393-
1394-
<TooltipKeybind
1395-
placement="top"
1396-
gutter={8}
1397-
title={language.t("command.model.variant.cycle")}
1398-
keybind={command.keybind("model.variant.cycle")}
1399-
>
1400-
<Select
1401-
size="small"
1402-
options={variants()}
1403-
current={local.model.variant.current() ?? "default"}
1404-
label={(x) => (x === "default" ? language.t("common.default") : x)}
1405-
onSelect={(x) => local.model.variant.set(x === "default" ? undefined : x)}
1406-
class="capitalize max-w-[160px]"
1407-
valueClass="truncate text-13-regular"
1408-
triggerStyle={{
1409-
opacity: buttonsSpring(),
1410-
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1411-
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1412-
}}
1413-
variant="ghost"
1414-
/>
1415-
</TooltipKeybind>
14161324
</div>
14171325
</div>
14181326
</div>
@@ -1458,6 +1366,103 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
14581366
variant="ghost"
14591367
/>
14601368
</TooltipKeybind>
1369+
<Show
1370+
when={providers.paid().length > 0}
1371+
fallback={
1372+
<TooltipKeybind
1373+
placement="top"
1374+
gutter={4}
1375+
title={language.t("command.model.choose")}
1376+
keybind={command.keybind("model.choose")}
1377+
>
1378+
<Button
1379+
as="div"
1380+
variant="ghost"
1381+
size="normal"
1382+
class="min-w-0 max-w-[320px] text-13-regular group"
1383+
style={{
1384+
height: "28px",
1385+
opacity: buttonsSpring(),
1386+
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1387+
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1388+
"pointer-events": buttonsSpring() > 0.5 ? "auto" : "none",
1389+
}}
1390+
onClick={() => dialog.show(() => <DialogSelectModelUnpaid />)}
1391+
>
1392+
<Show when={local.model.current()?.provider?.id}>
1393+
<ProviderIcon
1394+
id={local.model.current()!.provider.id}
1395+
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
1396+
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
1397+
/>
1398+
</Show>
1399+
<span class="truncate">
1400+
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
1401+
</span>
1402+
<Icon name="chevron-down" size="small" class="shrink-0" />
1403+
</Button>
1404+
</TooltipKeybind>
1405+
}
1406+
>
1407+
<TooltipKeybind
1408+
placement="top"
1409+
gutter={4}
1410+
title={language.t("command.model.choose")}
1411+
keybind={command.keybind("model.choose")}
1412+
>
1413+
<ModelSelectorPopover
1414+
triggerAs={Button}
1415+
triggerProps={{
1416+
variant: "ghost",
1417+
size: "normal",
1418+
style: {
1419+
height: "28px",
1420+
opacity: buttonsSpring(),
1421+
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1422+
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1423+
"pointer-events": buttonsSpring() > 0.5 ? "auto" : "none",
1424+
},
1425+
class: "min-w-0 max-w-[320px] text-13-regular group",
1426+
}}
1427+
>
1428+
<Show when={local.model.current()?.provider?.id}>
1429+
<ProviderIcon
1430+
id={local.model.current()!.provider.id}
1431+
class="size-4 shrink-0 opacity-40 group-hover:opacity-100 transition-opacity duration-150"
1432+
style={{ "will-change": "opacity", transform: "translateZ(0)" }}
1433+
/>
1434+
</Show>
1435+
<span class="truncate">
1436+
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
1437+
</span>
1438+
<Icon name="chevron-down" size="small" class="shrink-0" />
1439+
</ModelSelectorPopover>
1440+
</TooltipKeybind>
1441+
</Show>
1442+
<TooltipKeybind
1443+
placement="top"
1444+
gutter={4}
1445+
title={language.t("command.model.variant.cycle")}
1446+
keybind={command.keybind("model.variant.cycle")}
1447+
>
1448+
<Select
1449+
size="normal"
1450+
options={variants()}
1451+
current={local.model.variant.current() ?? "default"}
1452+
label={(x) => (x === "default" ? language.t("common.default") : x)}
1453+
onSelect={(x) => local.model.variant.set(x === "default" ? undefined : x)}
1454+
class="capitalize max-w-[160px]"
1455+
valueClass="truncate text-13-regular"
1456+
triggerStyle={{
1457+
height: "28px",
1458+
opacity: buttonsSpring(),
1459+
transform: `scale(${0.95 + buttonsSpring() * 0.05})`,
1460+
filter: `blur(${(1 - buttonsSpring()) * 2}px)`,
1461+
"pointer-events": buttonsSpring() > 0.5 ? "auto" : "none",
1462+
}}
1463+
variant="ghost"
1464+
/>
1465+
</TooltipKeybind>
14611466

14621467
<TooltipKeybind
14631468
placement="top"

0 commit comments

Comments
 (0)