The open source coding agent.
TypeScript
wip(desktop): progress
Adam6866a060bc48
diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsxindex 6590b6d182f..824d3da1217 100644--- a/packages/desktop/src/components/prompt-input.tsx+++ b/packages/desktop/src/components/prompt-input.tsx@@ -488,7 +488,7 @@ export const PromptInput: Component<PromptInputProps> = (props) => {{(i) => (<div class="w-full flex items-center justify-between gap-x-3"><div class="flex items-center gap-x-2.5 text-text-muted grow min-w-0">- <ProviderIcon name={i.provider.id as IconName} class="size-6 p-0.5 shrink-0" />+ {/* <ProviderIcon name={i.provider.id as IconName} class="size-6 p-0.5 shrink-0" /> */}<div class="flex gap-x-3 items-baseline flex-[1_0_0]"><span class="text-14-medium text-text-strong overflow-hidden text-ellipsis">{i.name}</span><Show when={false}>diff --git a/packages/ui/src/components/dialog.css b/packages/ui/src/components/dialog.cssindex 2ac0709dddd..267c891f392 100644--- a/packages/ui/src/components/dialog.css+++ b/packages/ui/src/components/dialog.css@@ -36,14 +36,14 @@flex-direction: column;align-items: flex-start;align-self: stretch;- gap: 8px;width: 100%;max-height: 100%;+ min-height: 280px;/* padding: 8px; */- padding: 8px 8px 0 8px;+ /* padding: 8px 8px 0 8px; */border: 1px solid var(--border-base);- border-radius: var(--radius-md);+ border-radius: var(--radius-xl);background: var(--surface-raised-stronger-non-alpha);box-shadow:0 15px 45px 0 rgba(19, 16, 16, 0.22),@@ -58,8 +58,9 @@[data-slot="dialog-header"] {display: flex;- height: 40px;- padding: 4px 4px 4px 8px;+ /* height: 40px; */+ /* padding: 4px 4px 4px 8px; */+ padding: 20px;justify-content: space-between;align-items: center;flex-shrink: 0;diff --git a/packages/ui/src/components/dialog.tsx b/packages/ui/src/components/dialog.tsxindex 4625482b548..a16705a57ba 100644--- a/packages/ui/src/components/dialog.tsx+++ b/packages/ui/src/components/dialog.tsx@@ -79,7 +79,7 @@ function DialogDescription(props: DialogDescriptionProps & ComponentProps<"p">)}function DialogCloseButton(props: DialogCloseButtonProps & ComponentProps<"button">) {- return <Kobalte.CloseButton data-slot="dialog-close-button" as={IconButton} icon="close" {...props} />+ return <Kobalte.CloseButton data-slot="dialog-close-button" as={IconButton} icon="close" variant="ghost" {...props} />}export const Dialog = Object.assign(DialogRoot, {diff --git a/packages/ui/src/components/input.css b/packages/ui/src/components/input.cssindex 9e8a3b16427..c5f8cb8c599 100644--- a/packages/ui/src/components/input.css+++ b/packages/ui/src/components/input.css@@ -1,7 +1,9 @@[data-component="input"] {+ width: 100%;/* [data-slot="input-label"] {} */[data-slot="input-input"] {+ width: 100%;color: var(--text-strong);/* text-14-regular */diff --git a/packages/ui/src/components/select-dialog.css b/packages/ui/src/components/select-dialog.cssindex 6263cee67f6..6b78639a830 100644--- a/packages/ui/src/components/select-dialog.css+++ b/packages/ui/src/components/select-dialog.css@@ -1,3 +1,12 @@+[data-slot="select-dialog-content"] {+ width: 100%;+ display: flex;+ flex-direction: column;+ overflow: hidden;+ gap: 12px;+ padding: 0 10px;+}+[data-component="select-dialog-input"] {display: flex;height: 40px;@@ -29,11 +38,11 @@[data-component="select-dialog"] {display: flex;flex-direction: column;- gap: 8px;+ gap: 12px;[data-slot="select-dialog-empty-state"] {display: flex;- padding: 32px 160px;+ padding: 32px 0px;flex-direction: column;justify-content: center;align-items: center;@@ -63,25 +72,30 @@}[data-slot="select-dialog-group"] {+ position: relative;display: flex;flex-direction: column;gap: 4px;[data-slot="select-dialog-header"] {display: flex;- padding: 4px 8px;+ height: 28px;+ padding: 0 10px;justify-content: space-between;align-items: center;align-self: stretch;+ background: var(--surface-raised-stronger-non-alpha);+ position: sticky;+ top: 0;- color: var(--text-weak);+ color: var(--text-base);- /* text-12-medium */+ /* text-14-medium */font-family: var(--font-family-sans);- font-size: var(--font-size-small);+ font-size: 14px;font-style: normal;font-weight: var(--font-weight-medium);- line-height: var(--line-height-large); /* 166.667% */+ line-height: var(--line-height-large); /* 142.857% */letter-spacing: var(--letter-spacing-normal);}diff --git a/packages/ui/src/components/select-dialog.tsx b/packages/ui/src/components/select-dialog.tsxindex 2f2d3e41482..bfc39508e02 100644--- a/packages/ui/src/components/select-dialog.tsx+++ b/packages/ui/src/components/select-dialog.tsx@@ -20,6 +20,7 @@ interface SelectDialogProps<T>export function SelectDialog<T>(props: SelectDialogProps<T>) {const [dialog, others] = splitProps(props, ["trigger", "onOpenChange", "defaultOpen"])let closeButton!: HTMLButtonElement+ let inputRef: HTMLInputElement | undefinedlet scrollRef: HTMLDivElement | undefinedconst [store, setStore] = createStore({mouseActive: false,@@ -87,77 +88,80 @@ export function SelectDialog<T>(props: SelectDialogProps<T>) {<Dialog modal {...dialog} onOpenChange={handleOpenChange}><Dialog.Header><Dialog.Title>{others.title}</Dialog.Title>- <Dialog.CloseButton ref={closeButton} style={{ display: "none" }} />+ <Dialog.CloseButton ref={closeButton} tabIndex={-1} /></Dialog.Header>- <div data-component="select-dialog-input">- <div data-slot="select-dialog-input-container">- <Icon name="magnifying-glass" />- <Input- data-slot="select-dialog-input"- type="text"- value={filter()}- onChange={(value) => handleInput(value)}- onKeyDown={handleKey}- placeholder={others.placeholder}- autofocus- spellcheck={false}- autocorrect="off"- autocomplete="off"- autocapitalize="off"- />+ <div data-slot="select-dialog-content">+ <div data-component="select-dialog-input">+ <div data-slot="select-dialog-input-container">+ <Icon name="magnifying-glass" />+ <Input+ ref={inputRef}+ autofocus+ data-slot="select-dialog-input"+ type="text"+ value={filter()}+ onChange={(value) => handleInput(value)}+ onKeyDown={handleKey}+ placeholder={others.placeholder}+ spellcheck={false}+ autocorrect="off"+ autocomplete="off"+ autocapitalize="off"+ />+ </div>+ <Show when={filter()}>+ <IconButton+ icon="circle-x"+ variant="ghost"+ onClick={() => {+ onInput("")+ reset()+ }}+ />+ </Show></div>- <Show when={filter()}>- <IconButton- icon="circle-x"- variant="ghost"- onClick={() => {- onInput("")- reset()- }}- />- </Show>- </div>- <Dialog.Body ref={scrollRef} data-component="select-dialog" class="no-scrollbar">- <Show- when={flat().length > 0}- fallback={- <div data-slot="select-dialog-empty-state">- <div data-slot="select-dialog-message">- {props.emptyMessage ?? "No search results"} for{" "}- <span data-slot="select-dialog-filter">"{filter()}"</span>- </div>- </div>- }- >- <For each={grouped()}>- {(group) => (- <div data-slot="select-dialog-group">- <Show when={group.category}>- <div data-slot="select-dialog-header">{group.category}</div>- </Show>- <div data-slot="select-dialog-list">- <For each={group.items}>- {(item) => (- <button- data-slot="select-dialog-item"- data-key={others.key(item)}- data-active={others.key(item) === active()}- onClick={() => handleSelect(item)}- onMouseMove={() => {- setStore("mouseActive", true)- setActive(others.key(item))- }}- >- {others.children(item)}- </button>- )}- </For>+ <Dialog.Body ref={scrollRef} data-component="select-dialog" class="no-scrollbar">+ <Show+ when={flat().length > 0}+ fallback={+ <div data-slot="select-dialog-empty-state">+ <div data-slot="select-dialog-message">+ {props.emptyMessage ?? "No search results"} for{" "}+ <span data-slot="select-dialog-filter">"{filter()}"</span></div></div>- )}- </For>- </Show>- </Dialog.Body>+ }+ >+ <For each={grouped()}>+ {(group) => (+ <div data-slot="select-dialog-group">+ <Show when={group.category}>+ <div data-slot="select-dialog-header">{group.category}</div>+ </Show>+ <div data-slot="select-dialog-list">+ <For each={group.items}>+ {(item) => (+ <button+ data-slot="select-dialog-item"+ data-key={others.key(item)}+ data-active={others.key(item) === active()}+ onClick={() => handleSelect(item)}+ onMouseMove={() => {+ setStore("mouseActive", true)+ setActive(others.key(item))+ }}+ >+ {others.children(item)}+ </button>+ )}+ </For>+ </div>+ </div>+ )}+ </For>+ </Show>+ </Dialog.Body>+ </div></Dialog>)}diff --git a/packages/ui/src/styles/tailwind/index.css b/packages/ui/src/styles/tailwind/index.cssindex bc6bb6f6daa..d0a414fee7e 100644--- a/packages/ui/src/styles/tailwind/index.css+++ b/packages/ui/src/styles/tailwind/index.css@@ -57,6 +57,7 @@--radius-sm: 0.25rem;--radius-md: 0.375rem;--radius-lg: 0.5rem;+ --radius-xl: 0.625rem;--shadow-xs: var(--shadow-xs);--shadow-md: var(--shadow-md);diff --git a/packages/ui/src/styles/theme.css b/packages/ui/src/styles/theme.cssindex 4450358f839..338e045ef05 100644--- a/packages/ui/src/styles/theme.css+++ b/packages/ui/src/styles/theme.css@@ -43,6 +43,7 @@--radius-sm: 0.25rem;--radius-md: 0.375rem;--radius-lg: 0.5rem;+ --radius-xl: 0.625rem;--shadow-xs:0 1px 2px -1px rgba(19, 16, 16, 0.04), 0 1px 2px 0 rgba(19, 16, 16, 0.06), 0 1px 3px 0 rgba(19, 16, 16, 0.08);