fix(app): make prompt input agent toggle reactive (#38653)
This commit is contained in:
parent
bce2992729
commit
ce7f54d5e7
1 changed files with 5 additions and 4 deletions
|
|
@ -447,15 +447,16 @@ export function usePromptInputV2Controller(props: PromptInputV2ControllerProps):
|
||||||
},
|
},
|
||||||
view: {
|
view: {
|
||||||
placeholder: designPlaceholder,
|
placeholder: designPlaceholder,
|
||||||
agent:
|
get agent() {
|
||||||
props.controls.agents.visible && props.controls.agents.options.length > 0
|
return props.controls.agents.visible && props.controls.agents.options.length > 0
|
||||||
? {
|
? {
|
||||||
options: () => props.controls.agents.options.map((name) => ({ id: name, label: name })),
|
options: () => props.controls.agents.options.map((name) => ({ id: name, label: name })),
|
||||||
current: () => props.controls.agents.current,
|
current: () => props.controls.agents.current,
|
||||||
onSelect: props.controls.agents.select,
|
onSelect: (value: string) => props.controls.agents.select(value),
|
||||||
keybind: () => command.keybindParts("agent.cycle"),
|
keybind: () => command.keybindParts("agent.cycle"),
|
||||||
}
|
}
|
||||||
: undefined,
|
: undefined
|
||||||
|
},
|
||||||
variant: {
|
variant: {
|
||||||
options: () => variants().map((value) => ({ id: value, label: value })),
|
options: () => variants().map((value) => ({ id: value, label: value })),
|
||||||
current: () => props.controls.model.selection.variant.current() ?? "default",
|
current: () => props.controls.model.selection.variant.current() ?? "default",
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue