fix(app): make prompt input agent toggle reactive (#38653)
This commit is contained in:
@@ -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",
|
||||||
|
|||||||
Reference in New Issue
Block a user