From 884478776f2228020d501eb986c77079c5879a55 Mon Sep 17 00:00:00 2001 From: Ronan Kearns Date: Tue, 20 Jan 2026 18:15:37 -0500 Subject: [PATCH 1/2] feat(app): add manage models icon to selector --- .../src/components/dialog-select-model.tsx | 27 +++++++++++++++++-- packages/ui/src/components/list.tsx | 3 +++ 2 files changed, 28 insertions(+), 2 deletions(-) diff --git a/packages/app/src/components/dialog-select-model.tsx b/packages/app/src/components/dialog-select-model.tsx index d54f9369af1..c49fac0bcc1 100644 --- a/packages/app/src/components/dialog-select-model.tsx +++ b/packages/app/src/components/dialog-select-model.tsx @@ -4,6 +4,7 @@ import { useLocal } from "@/context/local" import { useDialog } from "@opencode-ai/ui/context/dialog" import { popularProviders } from "@/hooks/use-providers" import { Button } from "@opencode-ai/ui/button" +import { IconButton } from "@opencode-ai/ui/icon-button" import { Tag } from "@opencode-ai/ui/tag" import { Dialog } from "@opencode-ai/ui/dialog" import { List } from "@opencode-ai/ui/list" @@ -14,6 +15,7 @@ const ModelList: Component<{ provider?: string class?: string onSelect: () => void + action?: JSX.Element }> = (props) => { const local = useLocal() @@ -27,7 +29,7 @@ const ModelList: Component<{ return ( `${x.provider.id}:${x.id}`} items={models} @@ -71,6 +73,12 @@ export const ModelSelectorPopover: Component<{ children: JSX.Element }> = (props) => { const [open, setOpen] = createSignal(false) + const dialog = useDialog() + + const handleManage = () => { + setOpen(false) + dialog.show(() => ) + } return ( @@ -78,7 +86,22 @@ export const ModelSelectorPopover: Component<{ Select model - setOpen(false)} class="p-1" /> + setOpen(false)} + class="p-1" + action={ + + } + /> diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index 2815805adf0..b91ba17bfce 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -10,6 +10,7 @@ export interface ListSearchProps { autofocus?: boolean hideIcon?: boolean class?: string + action?: JSX.Element } export interface ListProps extends FilteredListProps { @@ -57,6 +58,7 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) const { filter, grouped, flat, active, setActive, onKeyDown, onInput } = useFilteredList(props) const searchProps = () => (typeof props.search === "object" ? props.search : {}) + const searchAction = () => searchProps().action const moved = (event: MouseEvent) => event.movementX !== 0 || event.movementY !== 0 @@ -196,6 +198,7 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) autocapitalize="off" /> + {searchAction()} setInternalFilter("")} /> From 241b856d65a19fc75dc1ffe566befa1bd2fddcf4 Mon Sep 17 00:00:00 2001 From: Ronan Kearns Date: Wed, 21 Jan 2026 00:16:21 -0500 Subject: [PATCH 2/2] fix(ui): move manage models icon outside search box --- packages/ui/src/components/list.css | 38 +++++++++++++++++++++++-- packages/ui/src/components/list.tsx | 44 +++++++++++++++-------------- 2 files changed, 58 insertions(+), 24 deletions(-) diff --git a/packages/ui/src/components/list.css b/packages/ui/src/components/list.css index ee9be422c97..95641bb202e 100644 --- a/packages/ui/src/components/list.css +++ b/packages/ui/src/components/list.css @@ -23,14 +23,46 @@ overflow: hidden; padding: 0 12px; - [data-slot="list-search"] { + [data-slot="list-search-wrapper"] { display: flex; flex-shrink: 0; - padding: 8px; align-items: center; - gap: 12px; + gap: 8px; align-self: stretch; margin-bottom: 4px; + padding-right: 4px; + + > [data-component="icon-button"] { + width: 24px; + height: 24px; + flex-shrink: 0; + background-color: transparent; + opacity: 0.5; + transition: opacity 0.15s ease; + + &:hover:not(:disabled), + &:focus:not(:disabled), + &:active:not(:disabled) { + background-color: transparent; + opacity: 0.7; + } + + &:hover:not(:disabled) [data-slot="icon-svg"] { + color: var(--icon-hover); + } + + &:active:not(:disabled) [data-slot="icon-svg"] { + color: var(--icon-active); + } + } + } + + [data-slot="list-search"] { + display: flex; + flex: 1; + padding: 8px; + align-items: center; + gap: 12px; border-radius: var(--radius-md); background: var(--surface-base); diff --git a/packages/ui/src/components/list.tsx b/packages/ui/src/components/list.tsx index b91ba17bfce..d8455c08a74 100644 --- a/packages/ui/src/components/list.tsx +++ b/packages/ui/src/components/list.tsx @@ -178,30 +178,32 @@ export function List(props: ListProps & { ref?: (ref: ListRef) => void }) return (
-
-
- - +
+
+
+ + + + +
+ + setInternalFilter("")} /> -
{searchAction()} - - setInternalFilter("")} /> -