fix(app): show picker for custom agents
This commit is contained in:
parent
a27ffb20f0
commit
d9358df6ff
3 changed files with 4 additions and 3 deletions
|
|
@ -180,6 +180,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
|
||||||
|
|
||||||
const agent = {
|
const agent = {
|
||||||
list,
|
list,
|
||||||
|
hasCustom: createMemo(() => list().some((item) => item.name !== "build" && item.name !== "plan")),
|
||||||
current() {
|
current() {
|
||||||
return pickAgent(scope()?.agent ?? store.current)
|
return pickAgent(scope()?.agent ?? store.current)
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -41,7 +41,7 @@ export function createPromptInputController(input: {
|
||||||
options: local.agent.list().map((agent) => agent.name),
|
options: local.agent.list().map((agent) => agent.name),
|
||||||
current: local.agent.current()?.name ?? "",
|
current: local.agent.current()?.name ?? "",
|
||||||
loading: agentsQuery.isLoading,
|
loading: agentsQuery.isLoading,
|
||||||
visible: settings.visibility.customAgents(),
|
visible: settings.visibility.customAgents() || local.agent.hasCustom(),
|
||||||
select: local.agent.set,
|
select: local.agent.set,
|
||||||
},
|
},
|
||||||
model: {
|
model: {
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,7 @@ export const useComposerCommands = (input: { model?: ModelSelection } = {}) => {
|
||||||
description: language.t("command.agent.cycle.description"),
|
description: language.t("command.agent.cycle.description"),
|
||||||
keybind: "mod+.",
|
keybind: "mod+.",
|
||||||
slash: "agent",
|
slash: "agent",
|
||||||
disabled: !settings.visibility.customAgents(),
|
disabled: !settings.visibility.customAgents() && !local.agent.hasCustom(),
|
||||||
onSelect: () => local.agent.move(1),
|
onSelect: () => local.agent.move(1),
|
||||||
}),
|
}),
|
||||||
agentCommand({
|
agentCommand({
|
||||||
|
|
@ -78,7 +78,7 @@ export const useComposerCommands = (input: { model?: ModelSelection } = {}) => {
|
||||||
title: language.t("command.agent.cycle.reverse"),
|
title: language.t("command.agent.cycle.reverse"),
|
||||||
description: language.t("command.agent.cycle.reverse.description"),
|
description: language.t("command.agent.cycle.reverse.description"),
|
||||||
keybind: "shift+mod+.",
|
keybind: "shift+mod+.",
|
||||||
disabled: !settings.visibility.customAgents(),
|
disabled: !settings.visibility.customAgents() && !local.agent.hasCustom(),
|
||||||
onSelect: () => local.agent.move(-1),
|
onSelect: () => local.agent.move(-1),
|
||||||
}),
|
}),
|
||||||
])
|
])
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue