Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 19 additions & 9 deletions packages/app/src/components/prompt-input.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -1922,7 +1922,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
</Show>
</div>
<div class="relative p-3 flex items-center justify-between">
<div class="flex items-center justify-start gap-2">
<div class="flex items-center justify-start gap-1 sm:gap-2 min-w-0">
<Switch>
<Match when={store.mode === "shell"}>
<div class="flex items-center gap-2 px-2 h-6">
Expand All @@ -1941,7 +1941,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
options={local.agent.list().map((agent) => agent.name)}
current={local.agent.current()?.name ?? ""}
onSelect={local.agent.set}
class="capitalize"
class="capitalize shrink-0"
variant="ghost"
gutter={12}
/>
Expand All @@ -1957,13 +1957,15 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<Button
as="div"
variant="ghost"
class="px-2"
class="px-2 shrink-0"
onClick={() => dialog.show(() => <DialogSelectModelUnpaid />)}
>
<Show when={local.model.current()?.provider?.id}>
<ProviderIcon id={local.model.current()!.provider.id as IconName} class="size-4 shrink-0" />
</Show>
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
<span class="hidden sm:inline">
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
</span>
<MorphChevron
expanded={!!dialog.active?.id && dialog.active.id.startsWith("select-model-unpaid")}
/>
Expand All @@ -1976,13 +1978,19 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
title={language.t("command.model.choose")}
keybind={command.keybind("model.choose")}
>
<ModelSelectorPopover triggerAs={Button} triggerProps={{ variant: "ghost" }} gutter={12}>
<ModelSelectorPopover
triggerAs={Button}
triggerProps={{ variant: "ghost", class: "shrink-0" }}
gutter={12}
>
{(open) => (
<>
<Show when={local.model.current()?.provider?.id}>
<ProviderIcon id={local.model.current()!.provider.id as IconName} class="size-4 shrink-0" />
</Show>
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
<span class="hidden sm:inline">
{local.model.current()?.name ?? language.t("dialog.model.select.title")}
</span>
<MorphChevron expanded={open} class="text-text-weak" />
</>
)}
Expand All @@ -1998,13 +2006,15 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
<Button
data-action="model-variant-cycle"
variant="ghost"
class="text-text-strong text-12-regular"
class="text-text-strong text-12-regular shrink-0"
onClick={() => local.model.variant.cycle()}
>
<Show when={local.model.variant.list().length > 1}>
<ReasoningIcon percentage={reasoningPercentage()} size={16} strokeWidth={1.25} />
</Show>
<CycleLabel value={currrentModelVariant()} />
<span class="hidden sm:inline">
<CycleLabel value={currrentModelVariant()} />
</span>
</Button>
</TooltipKeybind>
</Show>
Expand Down Expand Up @@ -2040,7 +2050,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
</Match>
</Switch>
</div>
<div class="flex items-center gap-1 absolute right-3 bottom-3">
<div class="flex items-center gap-1 shrink-0">
<input
ref={fileInputRef}
type="file"
Expand Down
Loading