|
|
@@ -19,7 +19,7 @@ import { useDialog } from "@opencode-ai/ui/context/dialog"
|
|
|
import { DialogSelectModel } from "@/components/dialog-select-model"
|
|
|
import { DialogSelectModelUnpaid } from "@/components/dialog-select-model-unpaid"
|
|
|
import { useProviders } from "@/hooks/use-providers"
|
|
|
-import { useCommand, formatKeybind } from "@/context/command"
|
|
|
+import { useCommand } from "@/context/command"
|
|
|
import { persisted } from "@/utils/persist"
|
|
|
import { Identifier } from "@/utils/id"
|
|
|
|
|
|
@@ -889,8 +889,8 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|
|
custom
|
|
|
</span>
|
|
|
</Show>
|
|
|
- <Show when={cmd.keybind}>
|
|
|
- <span class="text-12-regular text-text-subtle">{formatKeybind(cmd.keybind!)}</span>
|
|
|
+ <Show when={command.keybind(cmd.id)}>
|
|
|
+ <span class="text-12-regular text-text-subtle">{command.keybind(cmd.id)}</span>
|
|
|
</Show>
|
|
|
</div>
|
|
|
</button>
|
|
|
@@ -990,26 +990,46 @@ export const PromptInput: Component<PromptInputProps> = (props) => {
|
|
|
</div>
|
|
|
</Match>
|
|
|
<Match when={store.mode === "normal"}>
|
|
|
- <Select
|
|
|
- options={local.agent.list().map((agent) => agent.name)}
|
|
|
- current={local.agent.current().name}
|
|
|
- onSelect={local.agent.set}
|
|
|
- class="capitalize"
|
|
|
- variant="ghost"
|
|
|
- />
|
|
|
- <Button
|
|
|
- as="div"
|
|
|
- variant="ghost"
|
|
|
- onClick={() =>
|
|
|
- dialog.show(() =>
|
|
|
- providers.paid().length > 0 ? <DialogSelectModel /> : <DialogSelectModelUnpaid />,
|
|
|
- )
|
|
|
+ <Tooltip
|
|
|
+ placement="top"
|
|
|
+ value={
|
|
|
+ <div class="flex items-center gap-2">
|
|
|
+ <span>Cycle agent</span>
|
|
|
+ <span class="text-icon-base text-12-medium">{command.keybind("agent.cycle")}</span>
|
|
|
+ </div>
|
|
|
}
|
|
|
>
|
|
|
- {local.model.current()?.name ?? "Select model"}
|
|
|
- <span class="ml-0.5 text-text-weak text-12-regular">{local.model.current()?.provider.name}</span>
|
|
|
- <Icon name="chevron-down" size="small" />
|
|
|
- </Button>
|
|
|
+ <Select
|
|
|
+ options={local.agent.list().map((agent) => agent.name)}
|
|
|
+ current={local.agent.current().name}
|
|
|
+ onSelect={local.agent.set}
|
|
|
+ class="capitalize"
|
|
|
+ variant="ghost"
|
|
|
+ />
|
|
|
+ </Tooltip>
|
|
|
+ <Tooltip
|
|
|
+ placement="top"
|
|
|
+ value={
|
|
|
+ <div class="flex items-center gap-2">
|
|
|
+ <span>Choose model</span>
|
|
|
+ <span class="text-icon-base text-12-medium">{command.keybind("model.choose")}</span>
|
|
|
+ </div>
|
|
|
+ }
|
|
|
+ >
|
|
|
+ <Button
|
|
|
+ as="div"
|
|
|
+ variant="ghost"
|
|
|
+ onClick={() =>
|
|
|
+ dialog.show(() =>
|
|
|
+ providers.paid().length > 0 ? <DialogSelectModel /> : <DialogSelectModelUnpaid />,
|
|
|
+ )
|
|
|
+ }
|
|
|
+ >
|
|
|
+ {local.model.current()?.name ?? "Select model"}
|
|
|
+ <span class="ml-0.5 text-text-weak text-12-regular">{local.model.current()?.provider.name}</span>
|
|
|
+ <Icon name="chevron-down" size="small" />
|
|
|
+ </Button>
|
|
|
+ </Tooltip>
|
|
|
</Match>
|
|
|
</Switch>
|
|
|
</div>
|