diff options
| author | Adam <[email protected]> | 2025-11-06 06:05:08 -0600 |
|---|---|---|
| committer | Adam <[email protected]> | 2025-11-06 09:48:50 -0600 |
| commit | ab345cf0dac4378163292a5fb99b102bb2922ee1 (patch) | |
| tree | eaed6e9071897e97229477d61420200a00f519ef /packages/desktop/src/components | |
| parent | a1836527ce75f2c1ba7c8d66ae9478c4444d8bfd (diff) | |
| download | opencode-ab345cf0dac4378163292a5fb99b102bb2922ee1.tar.gz opencode-ab345cf0dac4378163292a5fb99b102bb2922ee1.zip | |
feat(desktop): better tooltips
Diffstat (limited to 'packages/desktop/src/components')
| -rw-r--r-- | packages/desktop/src/components/prompt-input.tsx | 36 |
1 files changed, 28 insertions, 8 deletions
diff --git a/packages/desktop/src/components/prompt-input.tsx b/packages/desktop/src/components/prompt-input.tsx index 7dc67f6ae..cad1f2098 100644 --- a/packages/desktop/src/components/prompt-input.tsx +++ b/packages/desktop/src/components/prompt-input.tsx @@ -1,6 +1,6 @@ -import { Button, Icon, IconButton, Select, SelectDialog } from "@opencode-ai/ui" +import { Button, Icon, IconButton, Select, SelectDialog, Tooltip } from "@opencode-ai/ui" import { useFilteredList } from "@opencode-ai/ui/hooks" -import { createEffect, on, Component, Show, For, onMount, onCleanup } from "solid-js" +import { createEffect, on, Component, Show, For, onMount, onCleanup, Switch, Match } from "solid-js" import { createStore } from "solid-js/store" import { FileIcon } from "@/ui" import { getDirectory, getFilename } from "@/utils" @@ -519,12 +519,32 @@ export const PromptInput: Component<PromptInputProps> = (props) => { )} </SelectDialog> </div> - <IconButton - type="submit" - disabled={!session.prompt.dirty() && !session.working()} - icon={session.working() ? "stop" : "arrow-up"} - variant="primary" - /> + <Tooltip + placement="top" + value={ + <Switch> + <Match when={session.working()}> + <div class="flex items-center gap-2"> + <span>Stop</span> + <span class="text-icon-base text-12-medium text-[10px]!">ESC</span> + </div> + </Match> + <Match when={true}> + <div class="flex items-center gap-2"> + <span>Send</span> + <Icon name="enter" size="small" class="text-icon-base" /> + </div> + </Match> + </Switch> + } + > + <IconButton + type="submit" + disabled={!session.prompt.dirty() && !session.working()} + icon={session.working() ? "stop" : "arrow-up"} + variant="primary" + /> + </Tooltip> </div> </form> </div> |
