fix(app): prevent stale prompt control reads (#39842)
This commit is contained in:
parent
19231fce4b
commit
f67e80c275
1 changed files with 7 additions and 7 deletions
|
|
@ -212,20 +212,20 @@ export function PromptInputV2(props: PromptInputV2Props) {
|
|||
onContext={props.controller.openContext}
|
||||
onShell={props.controller.openShell}
|
||||
/>
|
||||
<Show when={view.agent}>
|
||||
<Show when={view.agent} keyed>
|
||||
{(control) => (
|
||||
<PromptInputV2ConfiguredSelect title="Choose agent" keybind={["Mod", "."]} control={control()} />
|
||||
<PromptInputV2ConfiguredSelect title="Choose agent" keybind={["Mod", "."]} control={control} />
|
||||
)}
|
||||
</Show>
|
||||
<Show
|
||||
when={props.modelControl}
|
||||
fallback={
|
||||
<Show when={view.model}>
|
||||
<Show when={view.model} keyed>
|
||||
{(control) => (
|
||||
<PromptInputV2ConfiguredSelect
|
||||
title="Choose model"
|
||||
keybind={["Mod", "M"]}
|
||||
control={control()}
|
||||
control={control}
|
||||
model
|
||||
/>
|
||||
)}
|
||||
|
|
@ -234,13 +234,13 @@ export function PromptInputV2(props: PromptInputV2Props) {
|
|||
>
|
||||
{props.modelControl}
|
||||
</Show>
|
||||
<Show when={(props.variantControlVisible ?? true) && view.variant}>
|
||||
<Show when={(props.variantControlVisible ?? true) && view.variant} keyed>
|
||||
{(control) => (
|
||||
<Show when={control().options().length > 1}>
|
||||
<Show when={control.options().length > 1}>
|
||||
<PromptInputV2ConfiguredSelect
|
||||
title="Choose model variant"
|
||||
keybind={["Shift", "Mod", "D"]}
|
||||
control={control()}
|
||||
control={control}
|
||||
/>
|
||||
</Show>
|
||||
)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue