The open source coding agent.
TypeScript
UI: show plugins in /status (#4515)
Spoon16b41d2bea34
diff --git a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsxindex 4e485b0338b..b85cd5c6542 100644--- a/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx+++ b/packages/opencode/src/cli/cmd/tui/component/dialog-status.tsx@@ -11,6 +11,31 @@ export function DialogStatus() {const enabledFormatters = createMemo(() => sync.data.formatter.filter((f) => f.enabled))+ const plugins = createMemo(() => {+ const list = sync.data.config.plugin ?? []+ const result = list.map((value) => {+ if (value.startsWith("file://")) {+ const path = value.substring("file://".length)+ const parts = path.split("/")+ const filename = parts.pop() || path+ if (!filename.includes(".")) return { name: filename }+ const basename = filename.split(".")[0]+ if (basename === "index") {+ const dirname = parts.pop()+ const name = dirname || basename+ return { name }+ }+ return { name: basename }+ }+ const index = value.lastIndexOf("@")+ if (index <= 0) return { name: value, version: "latest" }+ const name = value.substring(0, index)+ const version = value.substring(index + 1)+ return { name, version }+ })+ return result.toSorted((a, b) => a.name.localeCompare(b.name))+ })+return (<box paddingLeft={2} paddingRight={2} gap={1} paddingBottom={1}><box flexDirection="row" justifyContent="space-between">@@ -109,6 +134,29 @@ export function DialogStatus() {</For></box></Show>+ <Show when={plugins().length > 0} fallback={<text fg={theme.text}>No Plugins</text>}>+ <box>+ <text fg={theme.text}>{plugins().length} Plugins</text>+ <For each={plugins()}>+ {(item) => (+ <box flexDirection="row" gap={1}>+ <text+ flexShrink={0}+ style={{+ fg: theme.success,+ }}+ >+ •+ </text>+ <text wrapMode="word" fg={theme.text}>+ <b>{item.name}</b>+ {item.version && <span style={{ fg: theme.textMuted }}> @{item.version}</span>}+ </text>+ </box>+ )}+ </For>+ </box>+ </Show></box>)}