diff options
| author | Adam <[email protected]> | 2025-12-11 13:02:57 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-12-11 13:42:47 -0600 |
| commit | 16b7370d8cac304eb2af800b9c6a584784a0c600 (patch) | |
| tree | 8b181d31ce119d1f8cd8bb47d5268c08edde5ed7 /packages/desktop/src/components | |
| parent | 634fd62b25169619ffcbf87beec8777bf5a0d9bd (diff) | |
| download | opencode-16b7370d8cac304eb2af800b9c6a584784a0c600.tar.gz opencode-16b7370d8cac304eb2af800b9c6a584784a0c600.zip | |
wip(desktop): progress
Diffstat (limited to 'packages/desktop/src/components')
| -rw-r--r-- | packages/desktop/src/components/prompt-input.tsx | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx index 7f8568291..2c153ecc3 100644 --- a/packages/desktop/src/components/prompt-input.tsx +++ b/packages/desktop/src/components/prompt-input.tsx @@ -33,7 +33,6 @@ import { popularProviders, useProviders } from "@/hooks/use-providers" import { Dialog } from "@opencode-ai/ui/dialog" import { List, ListRef } from "@opencode-ai/ui/list" import { iife } from "@opencode-ai/util/iife" -import { Input } from "@opencode-ai/ui/input" import { ProviderIcon } from "@opencode-ai/ui/provider-icon" import { IconName } from "@opencode-ai/ui/icons/provider" @@ -557,6 +556,14 @@ export const PromptInput: Component<PromptInputProps> = (props) => { if (e.key === "Escape") return listRef?.onKeyDown(e) } + + onMount(() => { + document.addEventListener("keydown", handleKey) + onCleanup(() => { + document.removeEventListener("keydown", handleKey) + }) + }) + return ( <Dialog modal @@ -574,7 +581,6 @@ export const PromptInput: Component<PromptInputProps> = (props) => { <Dialog.CloseButton tabIndex={-1} /> </Dialog.Header> <Dialog.Body> - <Input hidden type="text" class="opacity-0 size-0" autofocus onKeyDown={handleKey} /> <div class="flex flex-col gap-3 px-2.5"> <div class="text-14-medium text-text-base px-2.5">Free models provided by OpenCode</div> <List |
