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}
|
onContext={props.controller.openContext}
|
||||||
onShell={props.controller.openShell}
|
onShell={props.controller.openShell}
|
||||||
/>
|
/>
|
||||||
<Show when={view.agent}>
|
<Show when={view.agent} keyed>
|
||||||
{(control) => (
|
{(control) => (
|
||||||
<PromptInputV2ConfiguredSelect title="Choose agent" keybind={["Mod", "."]} control={control()} />
|
<PromptInputV2ConfiguredSelect title="Choose agent" keybind={["Mod", "."]} control={control} />
|
||||||
)}
|
)}
|
||||||
</Show>
|
</Show>
|
||||||
<Show
|
<Show
|
||||||
when={props.modelControl}
|
when={props.modelControl}
|
||||||
fallback={
|
fallback={
|
||||||
<Show when={view.model}>
|
<Show when={view.model} keyed>
|
||||||
{(control) => (
|
{(control) => (
|
||||||
<PromptInputV2ConfiguredSelect
|
<PromptInputV2ConfiguredSelect
|
||||||
title="Choose model"
|
title="Choose model"
|
||||||
keybind={["Mod", "M"]}
|
keybind={["Mod", "M"]}
|
||||||
control={control()}
|
control={control}
|
||||||
model
|
model
|
||||||
/>
|
/>
|
||||||
)}
|
)}
|
||||||
|
|
@ -234,13 +234,13 @@ export function PromptInputV2(props: PromptInputV2Props) {
|
||||||
>
|
>
|
||||||
{props.modelControl}
|
{props.modelControl}
|
||||||
</Show>
|
</Show>
|
||||||
<Show when={(props.variantControlVisible ?? true) && view.variant}>
|
<Show when={(props.variantControlVisible ?? true) && view.variant} keyed>
|
||||||
{(control) => (
|
{(control) => (
|
||||||
<Show when={control().options().length > 1}>
|
<Show when={control.options().length > 1}>
|
||||||
<PromptInputV2ConfiguredSelect
|
<PromptInputV2ConfiguredSelect
|
||||||
title="Choose model variant"
|
title="Choose model variant"
|
||||||
keybind={["Shift", "Mod", "D"]}
|
keybind={["Shift", "Mod", "D"]}
|
||||||
control={control()}
|
control={control}
|
||||||
/>
|
/>
|
||||||
</Show>
|
</Show>
|
||||||
)}
|
)}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue