fix(app): show picker for custom agents

This commit is contained in:
Brendan Allan
2026-07-15 15:30:27 +00:00
committed by OpenCode Agent
parent a27ffb20f0
commit d9358df6ff
3 changed files with 4 additions and 3 deletions
+1
View File
@@ -180,6 +180,7 @@ export const { use: useLocal, provider: LocalProvider } = createSimpleContext({
const agent = {
list,
hasCustom: createMemo(() => list().some((item) => item.name !== "build" && item.name !== "plan")),
current() {
return pickAgent(scope()?.agent ?? store.current)
},
@@ -41,7 +41,7 @@ export function createPromptInputController(input: {
options: local.agent.list().map((agent) => agent.name),
current: local.agent.current()?.name ?? "",
loading: agentsQuery.isLoading,
visible: settings.visibility.customAgents(),
visible: settings.visibility.customAgents() || local.agent.hasCustom(),
select: local.agent.set,
},
model: {
@@ -70,7 +70,7 @@ export const useComposerCommands = (input: { model?: ModelSelection } = {}) => {
description: language.t("command.agent.cycle.description"),
keybind: "mod+.",
slash: "agent",
disabled: !settings.visibility.customAgents(),
disabled: !settings.visibility.customAgents() && !local.agent.hasCustom(),
onSelect: () => local.agent.move(1),
}),
agentCommand({
@@ -78,7 +78,7 @@ export const useComposerCommands = (input: { model?: ModelSelection } = {}) => {
title: language.t("command.agent.cycle.reverse"),
description: language.t("command.agent.cycle.reverse.description"),
keybind: "shift+mod+.",
disabled: !settings.visibility.customAgents(),
disabled: !settings.visibility.customAgents() && !local.agent.hasCustom(),
onSelect: () => local.agent.move(-1),
}),
])