mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-16 05:01:03 +03:00
fix(tui): navigate filtered plugins (#42127)
This commit is contained in:
committed by
GitHub
Unverified
parent
b75dd58f7c
commit
7a22ac865d
@@ -117,7 +117,6 @@ export function DialogMcp() {
|
||||
<DialogSelect
|
||||
title="MCP servers"
|
||||
options={options()}
|
||||
current={focused()}
|
||||
preserveSelection
|
||||
onMove={(option) => setFocused(option.value as string)}
|
||||
onSelect={(option) => open(option.value as string)}
|
||||
|
||||
@@ -21,17 +21,10 @@ function View(props: { context: Plugin.Context; plugins: ReturnType<typeof usePl
|
||||
title: plugin.id,
|
||||
value: plugin.id,
|
||||
category: "Built-in",
|
||||
footer: (
|
||||
<span
|
||||
style={{
|
||||
fg: plugin.active
|
||||
? props.context.theme.text.feedback.success.default
|
||||
: props.context.theme.text.subdued,
|
||||
}}
|
||||
>
|
||||
{plugin.active ? "active" : "inactive"}
|
||||
</span>
|
||||
),
|
||||
footer: plugin.active ? "active" : "inactive",
|
||||
footerColor: plugin.active
|
||||
? props.context.theme.text.feedback.success.default
|
||||
: props.context.theme.text.subdued,
|
||||
}),
|
||||
)
|
||||
const external = props.plugins
|
||||
@@ -43,20 +36,13 @@ function View(props: { context: Plugin.Context; plugins: ReturnType<typeof usePl
|
||||
value: plugin.id ?? plugin.target,
|
||||
category: "External",
|
||||
searchText: plugin.target,
|
||||
footer: (
|
||||
<span
|
||||
style={{
|
||||
fg:
|
||||
plugin.status === "active"
|
||||
? props.context.theme.text.feedback.success.default
|
||||
: plugin.status === "failed"
|
||||
? props.context.theme.text.feedback.error.default
|
||||
: props.context.theme.text.subdued,
|
||||
}}
|
||||
>
|
||||
{plugin.status}
|
||||
</span>
|
||||
),
|
||||
footer: plugin.status,
|
||||
footerColor:
|
||||
plugin.status === "active"
|
||||
? props.context.theme.text.feedback.success.default
|
||||
: plugin.status === "failed"
|
||||
? props.context.theme.text.feedback.error.default
|
||||
: props.context.theme.text.subdued,
|
||||
}),
|
||||
)
|
||||
return [...builtins, ...external].sort((a, b) => a.title.localeCompare(b.title))
|
||||
@@ -107,7 +93,6 @@ function View(props: { context: Plugin.Context; plugins: ReturnType<typeof usePl
|
||||
<DialogSelect
|
||||
title="Plugins"
|
||||
options={options()}
|
||||
current={focused()}
|
||||
locked={locked()}
|
||||
preserveSelection={true}
|
||||
onMove={(option) => setFocused(option.value)}
|
||||
|
||||
Reference in New Issue
Block a user