From 52f6843ffb7314b3feff0eb011e4d96d94a0dd04 Mon Sep 17 00:00:00 2001 From: Brendan Allan Date: Wed, 29 Apr 2026 18:59:44 +0800 Subject: [PATCH] feat: update prompt input --- packages/app/src/components/prompt-input.tsx | 246 ++++++++++--------- 1 file changed, 133 insertions(+), 113 deletions(-) diff --git a/packages/app/src/components/prompt-input.tsx b/packages/app/src/components/prompt-input.tsx index 0a18096164..014f474b10 100644 --- a/packages/app/src/components/prompt-input.tsx +++ b/packages/app/src/components/prompt-input.tsx @@ -1267,7 +1267,7 @@ export const PromptInput: Component = (props) => { ) return ( -
+
{(promptReady(), null)} = (props) => {
-
+
e.stopPropagation()} + style={control()} + >
= (props) => {
+ + +
+ 0} + fallback={ + + + + } + > + + + + + + + {local.model.current()?.name ?? language.t("dialog.model.select.title")} + + + + + +
+ 2}> +
+ + (x === "default" ? language.t("common.default") : x)} - onSelect={(value) => { - local.model.variant.set(value === "default" ? undefined : value) - restoreFocus() - }} - class="capitalize max-w-[160px] text-text-base" - valueClass="truncate text-13-regular text-text-base" - triggerStyle={control()} - triggerProps={{ "data-action": "prompt-model-variant" }} - variant="ghost" - /> - -
-
-
+ )}
@@ -1613,3 +1624,12 @@ export const PromptInput: Component = (props) => { ) } + +const omit = >(obj: T, key: keyof T) => { + const { [key]: _, ...rest } = obj + return rest +} + +const objPick = >(obj: T, key: keyof T) => { + return { [key]: obj[key] } +}