From 6c5d38d90a8cf1dfed1b72dbfeefaa8a2719e110 Mon Sep 17 00:00:00 2001 From: usrnk1 <7547651+usrnk1@users.noreply.github.com> Date: Tue, 10 Nov 2026 15:35:07 +0100 Subject: [PATCH] feat(app): link Console MCPs and skills in Extensions settings (#63125) --- .../regression/mcp-workspace-toggle.spec.ts | 4 +- packages/app/e2e/regression/settings.spec.ts | 200 +++++++++++++++++- packages/app/e2e/utils/console.ts | 23 ++ .../app/src/providers/connect/mcp-dialog.tsx | 2 - packages/app/src/runtime/i18n/en.ts | 6 + .../providers/console-extensions.test.ts | 103 +++++++++ .../settings/providers/console-extensions.ts | 110 ++++++++++ .../src/settings/providers/console-link.tsx | 121 +++++++++++ .../app/src/settings/providers/extensions.tsx | 131 +++++++++--- packages/app/src/settings/settings.css | 64 ++++++ .../workspaces/project-extensions.tsx | 150 +++++++++++-- .../app/src/settings/workspaces/project.css | 8 + packages/app/src/shell/search-list.css | 15 -- .../gui-plugins/src/details/server-panel.tsx | 2 +- .../ui/src/icons/icon/additional-icons.ts | 6 +- packages/ui/src/icons/new-icons.ts | 1 - 16 files changed, 874 insertions(+), 72 deletions(-) create mode 100644 packages/app/e2e/utils/console.ts create mode 100644 packages/app/src/settings/providers/console-extensions.test.ts create mode 100644 packages/app/src/settings/providers/console-extensions.ts create mode 100644 packages/app/src/settings/providers/console-link.tsx diff --git a/packages/app/e2e/regression/mcp-workspace-toggle.spec.ts b/packages/app/e2e/regression/mcp-workspace-toggle.spec.ts index 492ca9bf37b..51e5004fc0c 100644 --- a/packages/app/e2e/regression/mcp-workspace-toggle.spec.ts +++ b/packages/app/e2e/regression/mcp-workspace-toggle.spec.ts @@ -69,7 +69,9 @@ async function open( if (input.surface === "dialog") return page.keyboard.press("Control+;") if (input.surface === "settings") { - await page.keyboard.press("Control+,") + // Settings opens with the platform's command key, which the app reads from navigator.platform. + const mac = await page.evaluate(() => /(Mac|iPod|iPhone|iPad)/.test(navigator.platform)) + await page.keyboard.press(mac ? "Meta+," : "Control+,") return panel.getByRole("tab", { name: "Extensions", exact: true }).click() } diff --git a/packages/app/e2e/regression/settings.spec.ts b/packages/app/e2e/regression/settings.spec.ts index c4260f2ce98..3abea682c73 100644 --- a/packages/app/e2e/regression/settings.spec.ts +++ b/packages/app/e2e/regression/settings.spec.ts @@ -3,6 +3,7 @@ import type { ConfigEntry, OpenCodeEvent, SessionMessageInfo, WorktreeDirectory import { NO_PROVIDER, REMOTE_SERVER, SERVER, holdRoute, project, seed, session } from "../utils/app" import { mockMissingLocation, mockOpenCodeServer } from "../utils/mock-server" import { mockRemoteServer, mockWorkspace, openSession, openSettings, type WorkspaceInput } from "../utils/workspace" +import { CONSOLE_URL, consoleGateway, consoleSignIn } from "../utils/console" import { recordNotifications } from "../utils/notifications" import { installSseTransport } from "../utils/sse-transport" @@ -783,6 +784,97 @@ test("a project plugin list that fails to load offers Retry instead of an empty await expect(panel.getByRole("status")).toHaveCount(0) }) +test("project extensions link Console MCPs and skills and offer sign-in as the server-wide page does", async ({ + page, + context, +}) => { + const consoleUrl = CONSOLE_URL + await context.route("https://opencode.ai/console/**", (route) => route.fulfill({ body: "Console" })) + + const { settings } = await open(page, { + configEntries: [ + { + type: "document", + info: { + mcp: { + servers: { + slack: consoleGateway("slack"), + github: consoleGateway("github", { protocol: "2026-07-28" }), + }, + }, + }, + }, + ], + mcp: [ + ...["figma", "github", "slack"].map((name) => ({ name, status: { status: "connected" } })), + { name: "stripe", integrationID: "stripe-oauth", status: { status: "needs_auth", error: "Sign in required" } }, + ], + integrations: [ + consoleSignIn, + { + id: "stripe-oauth", + name: "Stripe", + methods: [{ id: "oauth", type: "oauth" }], + connections: [], + metadata: { source: "mcp" }, + }, + ], + skills: [ + { id: "review", name: "Code review", path: "/home/test/.config/opencode/skills/review/SKILL.md", content: "x" }, + { id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "x" }, + ], + }) + + await openProject(page) + await settings.getByRole("tab", { name: "Extensions", exact: true }).click() + + // Console's servers are shared with every project, so they list under Shared. + const mcps = settings.getByRole("tabpanel", { name: "MCPs", exact: true }) + await mcps.getByRole("button", { name: /^Shared/ }).click() + await expect(mcps.getByRole("switch", { name: "figma", exact: true })).toBeVisible() + // As on the server-wide page, a dot shows each status and the words stay for assistive technology. + await expect(mcps.getByRole("switch", { name: "slack", exact: true })).toHaveAccessibleDescription("Connected") + await expect(mcps.getByRole("switch", { name: "github", exact: true })).toHaveCount(0) + await expect(mcps.getByRole("button", { name: "Manage figma in Console", exact: true })).toHaveCount(0) + // A server that needs a sign-in asks for it in the switch's place, as on the server-wide page. + await expect(mcps.getByRole("button", { name: "Sign in to stripe", exact: true })).toHaveText("Sign in") + await expect(mcps.getByRole("switch", { name: "stripe", exact: true })).toHaveCount(0) + + const connection = page.waitForEvent("popup") + await mcps.getByRole("button", { name: "Connect github in Console", exact: true }).click() + await expect(await connection).toHaveURL(`${consoleUrl}/org_acme/extensions?connect=github`) + + const manage = page.waitForEvent("popup") + await mcps.getByRole("button", { name: "Manage slack in Console", exact: true }).click() + await expect(await manage).toHaveURL(`${consoleUrl}/org_acme/extensions/mcp/slack`) + + await settings.getByRole("tab", { name: "Skills", exact: true }).click() + const skills = settings.getByRole("tabpanel", { name: "Skills", exact: true }) + await skills.getByRole("button", { name: /^Shared/ }).click() + await expect(skills.getByText("Code review", { exact: true })).toBeVisible() + await expect(skills.getByRole("button", { name: "Manage Code review in Console", exact: true })).toHaveCount(0) + + const skill = page.waitForEvent("popup") + await skills.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click() + await expect(await skill).toHaveURL(`${consoleUrl}/org_acme/extensions?kind=skills&search=funnel`) +}) + +test("a Console skill links to Console's home when no Console MCP names the workspace", async ({ page, context }) => { + await context.route(`${CONSOLE_URL}**`, (route) => route.fulfill({ body: "Console" })) + + const { settings } = await open(page, { + integrations: [consoleSignIn], + skills: [{ id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "x" }], + }) + + await settings.getByRole("tab", { name: "Extensions", exact: true }).click() + await settings.getByRole("tab", { name: "Skills", exact: true }).click() + + const skill = page.waitForEvent("popup") + await settings.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click() + await expect(await skill).toHaveURL(CONSOLE_URL) +}) + for (const field of [ { name: "color", @@ -1050,7 +1142,14 @@ test.describe("pages open before slow data", () => { }) test("extensions", async ({ page }) => { - const { settings } = await open(page, { mcp: [{ name: "demo-mcp", status: { status: "connected" } }] }) + const { settings } = await open(page, { + mcp: [{ name: "demo-mcp", status: { status: "connected" } }], + skills: [ + { id: "opencode", name: "OpenCode", path: "skill://opencode/SKILL.md", content: "OpenCode help" }, + { id: "plugin-skill", name: "Plugin skill", path: "skill://plugin-skill/SKILL.md", content: "Plugin help" }, + ], + }) + const mcp = await holdRoute(page, (url) => url.pathname === "/api/mcp") await settings.getByRole("tab", { name: "Extensions", exact: true }).click() await mcp.arrived @@ -1059,6 +1158,11 @@ test.describe("pages open before slow data", () => { mcp.release() await settings.getByRole("tab", { name: "MCPs", exact: true }).click() await expect(settings.getByRole("switch", { name: "demo-mcp" })).toBeChecked() + // Without a Console sign-in, a virtual skill is never linked to Console. + await settings.getByRole("tab", { name: "Skills", exact: true }).click() + await expect(settings.getByText("OpenCode", { exact: true })).toBeVisible() + await expect(settings.getByText("Plugin skill", { exact: true })).toBeVisible() + await expect(settings.getByRole("button", { name: /in Console$/ })).toHaveCount(0) }) test("extensions show MCP status dots with sign-in, error, and switch controls", async ({ page, context }) => { @@ -1115,6 +1219,100 @@ test.describe("pages open before slow data", () => { await expect(details.getByText(error, { exact: true })).toBeVisible() }) + test("extensions list Console MCPs and skills with local ones", async ({ page, context }) => { + await context.route("https://opencode.ai/console/**", (route) => route.fulfill({ body: "Console" })) + const consoleUrl = CONSOLE_URL + + const actions: string[] = [] + + const { settings, push } = await open(page, { + configEntries: [ + { + type: "document", + info: { + mcp: { + servers: { + linear: consoleGateway("linear"), + github: consoleGateway("github", { protocol: "2026-07-28" }), + clickhouse: consoleGateway("clickhouse"), + }, + }, + }, + }, + { + type: "document", + path: "/home/test/.config/opencode/opencode.json", + info: { mcp: { servers: { linear: { type: "remote", url: "https://mcp.linear.app/mcp" } } } }, + }, + ], + integrations: [consoleSignIn], + mcp: ["figma", "linear", "github", "clickhouse"].map((name) => ({ name, status: { status: "connected" } })), + skills: [ + { + id: "review", + name: "Code review", + path: "/home/test/.config/opencode/skills/review/SKILL.md", + content: "Review code", + }, + { id: "opencode", name: "OpenCode", path: "skill://opencode/SKILL.md", content: "OpenCode help" }, + { id: "report", name: "Report", path: "skill://report/SKILL.md", content: "Report bugs" }, + { id: "browser", name: "Browser", path: "skill://browser/SKILL.md", content: "Browser help" }, + { id: "funnel", name: "Funnel analytics", path: "skill://funnel/SKILL.md", content: "Analyze the funnel" }, + ], + onMcpAction: (input) => { + actions.push(`${input.server}:${input.action}`) + }, + }) + + await settings.getByRole("tab", { name: "Extensions", exact: true }).click() + + // One list: a name both configs define is one row, the user's server, with Console's link kept. A Console server + // whose account isn't connected asks for the connection in the switch's place. + await expect(settings.getByRole("switch")).toHaveCount(3) + await expect(settings.getByRole("switch", { name: "linear", exact: true })).toBeChecked() + await expect(settings.getByRole("switch", { name: "figma", exact: true })).toBeChecked() + await expect(settings.getByRole("switch", { name: "github", exact: true })).toHaveCount(0) + await expect(settings.getByRole("button", { name: "Manage linear in Console" })).toHaveText( + "Replaces OpenCode Console", + ) + await expect(settings.getByRole("button", { name: "Manage github in Console" })).toHaveText("github") + await expect(settings.getByRole("button", { name: "Manage clickhouse in Console" })).toHaveText("clickhouse") + await expect(settings.getByText("OpenCode Console", { exact: true })).toHaveCount(0) + await expect(settings.getByRole("button", { name: "Manage figma in Console" })).toHaveCount(0) + + const connection = page.waitForEvent("popup") + await settings.getByRole("button", { name: "Connect github in Console" }).click() + await expect(await connection).toHaveURL(`${consoleUrl}/org_acme/extensions?connect=github`) + + const manage = page.waitForEvent("popup") + await settings.getByRole("button", { name: "Manage linear in Console" }).click() + await expect(await manage).toHaveURL(`${consoleUrl}/org_acme/extensions/mcp/linear`) + + const toggle = settings.getByRole("switch", { name: "clickhouse", exact: true }) + await toggle.press("Space") + await expect(toggle).not.toBeChecked() + expect(actions).toEqual(["clickhouse:disconnect"]) + const refreshed = page.waitForResponse((response) => new URL(response.url()).pathname === "/api/config") + await push([{ id: "evt_config_extensions", created: 1, type: "config.updated", data: {} }]) + await refreshed + await expect(toggle).not.toBeChecked() + + // One sorted list: only a skill Console delivers links to Console, filtered to that skill. + await settings.getByRole("tab", { name: "Skills", exact: true }).click() + await expect(settings.locator(".settings-extension-name")).toHaveText([ + "Browser", + "Code review", + "Funnel analytics", + "OpenCode", + "Report", + ]) + await expect(settings.getByRole("button", { name: /in Console$/ })).toHaveCount(1) + + const skill = page.waitForEvent("popup") + await settings.getByRole("button", { name: "Manage Funnel analytics in Console", exact: true }).click() + await expect(await skill).toHaveURL(`${consoleUrl}/org_acme/extensions?kind=skills&search=funnel`) + }) + for (const fails of [false, true]) { test(`about ${fails ? "keeps its fallback when contributors fail" : "updates contributors later"}`, async ({ page, diff --git a/packages/app/e2e/utils/console.ts b/packages/app/e2e/utils/console.ts new file mode 100644 index 00000000000..d8c200fbc23 --- /dev/null +++ b/packages/app/e2e/utils/console.ts @@ -0,0 +1,23 @@ +export const CONSOLE_URL = "https://opencode.ai/console" + +// An MCP server OpenCode Console delivers through its gateway, with the gateway token that names its workspace. +// `protocol` is the pin Console sets while the member hasn't connected their account. +export function consoleGateway(slug: string, options: { workspace?: string; protocol?: "2026-07-28" } = {}) { + const claims = Buffer.from(JSON.stringify({ u: "user_fixture", w: options.workspace ?? "org_acme", d: 1 })) + + return { + type: "remote", + url: `${CONSOLE_URL}/api/integration-gateway/${slug}/mcp`, + oauth: false, + headers: { authorization: `Bearer ocgw_${claims.toString("base64url")}.signature` }, + protocol: options.protocol, + } +} + +// The OpenCode Console integration with a saved sign-in. +export const consoleSignIn = { + id: "opencode", + name: "OpenCode", + methods: [{ id: "oauth", type: "oauth" }], + connections: [{ type: "credential", id: "cred_console", label: "Acme", method: "oauth" }], +} diff --git a/packages/app/src/providers/connect/mcp-dialog.tsx b/packages/app/src/providers/connect/mcp-dialog.tsx index f4c6d727ce9..608dc179631 100644 --- a/packages/app/src/providers/connect/mcp-dialog.tsx +++ b/packages/app/src/providers/connect/mcp-dialog.tsx @@ -273,7 +273,6 @@ export function McpDialog(props: { + ) +} + +/** After a server the user's config replaces Console's with, a link to Console's. */ +export function ConsoleReplaced(props: { name: string; href: string }) { + const language = useLanguage() + const platform = usePlatform() + + return ( + + ) +} diff --git a/packages/app/src/settings/providers/extensions.tsx b/packages/app/src/settings/providers/extensions.tsx index ee238a12392..56533f7f082 100644 --- a/packages/app/src/settings/providers/extensions.tsx +++ b/packages/app/src/settings/providers/extensions.tsx @@ -19,6 +19,7 @@ import { usePlatform } from "@/runtime/platform/platform" import { SettingsList } from "@/settings/list" import { createExtensionLoad, ExtensionLoadFailed } from "@/settings/extension-load" import type { SettingsView } from "@/settings/surface" +import { ConsoleName, ConsoleReplaced, createConsoleSources } from "./console-link" import "@/settings/settings.css" import "@/shell/search-list.css" @@ -64,6 +65,8 @@ export const SettingsExtensions: Component<{ const toggle = (item: McpServer, enabled: boolean) => mcp.dispatch({ type: "toggle.requested", name: item.name, enabled, status: item.status.status }) + const sources = createConsoleSources(() => props.directory) + const plugins = createExtensionLoad({ key: () => serverSdk.scope, task: (_, signal) => serverSdk.api.plugin.list(undefined, { signal }).then((result) => result.data), @@ -88,7 +91,7 @@ export const SettingsExtensions: Component<{ if (serverSdk.connection.status() !== "connected") return void data.location.skill.sync().catch(() => undefined) }) - const skills = () => data.location.skill.list() ?? [] + const skills = createMemo(() => (data.location.skill.list() ?? []).toSorted((a, b) => a.name.localeCompare(b.name))) return ( <> @@ -131,26 +134,48 @@ export const SettingsExtensions: Component<{ {(item) => { const row = () => mcpRowView(mcp.state(), item.name, item.status.status) + const busy = () => row().busy + const managed = () => sources.managed(item.name) + + const links = () => sources.links(item.name) + + const status = () => + managed()?.needsConnection && item.status.status === "connected" + ? "needs_auth" + : item.status.status + // The dot shows the status, as in the MCPs dialog; the words stay for assistive technology. - const label = () => - item.status.status === "pending" ? undefined : language.t(statusLabels[item.status.status]) + const label = () => { + if (managed()) return language.t("settings.extensions.console.temporary") + + return item.status.status === "pending" ? undefined : language.t(statusLabels[item.status.status]) + } + + const connect = () => sources.connect(item.name) return ( -
+
-
toggle(item, enabled)} + toggle(item, enabled)} + > + {item.name} + + } > - {item.name} - + + } > - + {(href) => ( + + )}
@@ -191,6 +231,13 @@ export const SettingsExtensions: Component<{ }} + + +
@@ -233,16 +280,32 @@ export const SettingsExtensions: Component<{ - {(skill) => ( -
-
- - {skill.name} + {(skill) => { + const link = () => sources.skill(skill) + + return ( +
+
+ + {skill.name}} + > + {(href) => } + +
-
- )} + ) + }} + + +
diff --git a/packages/app/src/settings/settings.css b/packages/app/src/settings/settings.css index 7e871fdfefe..b4a1ad833e7 100644 --- a/packages/app/src/settings/settings.css +++ b/packages/app/src/settings/settings.css @@ -2281,6 +2281,70 @@ gap: 16px; } +/* The name keeps its own width so the source sits right after it, not against the actions. */ +.settings-mcp-row .settings-extension-name { + flex: 0 1 auto; +} + +/* A Console server or skill name links to where Console manages it. */ +.settings-console-name { + display: inline-flex; + min-width: 0; + align-items: center; + gap: 2px; + cursor: pointer; +} + +.settings-console-name .settings-extension-name { + text-decoration: underline; + text-decoration-color: var(--v2-border-border-strong); + text-underline-offset: 2px; +} + +.settings-console-name [data-slot="icon-svg"] { + flex-shrink: 0; + color: var(--v2-icon-icon-muted); +} + +.settings-console-name:focus-visible .settings-extension-name { + text-decoration-color: currentColor; +} + +@media (hover: hover) { + .settings-console-name:hover .settings-extension-name { + text-decoration-color: currentColor; + } +} + +/* When the user's config replaces a Console server, the row says so and still links to Console's. */ +.settings-mcp-source { + display: inline-flex; + min-width: 0; + align-items: center; + gap: 2px; + color: var(--v2-text-text-muted); + cursor: pointer; + font-size: 13px; + line-height: var(--line-height-compact); + white-space: nowrap; +} + +.settings-mcp-source [data-slot="icon-svg"] { + flex-shrink: 0; +} + +.settings-mcp-source:focus-visible { + color: var(--v2-text-text-base); + text-decoration: underline; +} + +@media (hover: hover) { + .settings-mcp-source:hover { + color: var(--v2-text-text-base); + text-decoration: underline; + } +} + /* The MCP status dot takes the icon's 16px slot, so names line up with the plugin and skill rows. */ .settings-mcp-status { display: grid; diff --git a/packages/app/src/settings/workspaces/project-extensions.tsx b/packages/app/src/settings/workspaces/project-extensions.tsx index 502d45a4ecd..fa744967140 100644 --- a/packages/app/src/settings/workspaces/project-extensions.tsx +++ b/packages/app/src/settings/workspaces/project-extensions.tsx @@ -1,3 +1,4 @@ +import { Button } from "@opencode/ui/button" import { Icon } from "@opencode/ui/icon" import { Switch } from "@opencode/ui/switch" import { Tabs } from "@opencode/ui/tabs" @@ -21,13 +22,17 @@ import { useServerSDK } from "@/runtime/server/client" import { useData } from "@/runtime/server/current" import { pluginLabels } from "@/providers/catalog/plugin" import { ExternalLink } from "@/runtime/platform/external-link" +import { usePlatform } from "@/runtime/platform/platform" +import { ConsoleName, ConsoleReplaced, createConsoleSources } from "@/settings/providers/console-link" import { ProjectFolderMissing } from "./project-folder-missing" import { configuredLanguageServers } from "./project-lsp" import { SettingsList } from "@/settings/list" import { createExtensionLoad, ExtensionLoadFailed } from "@/settings/extension-load" +import "@/shell/search-list.css" import "./project.css" type SkillItem = { + id: string name: string path: string } @@ -38,17 +43,49 @@ const ExtensionCard: Component<{ children: JSX.Element }> = (props) => ( {props.children} ) +const statusLabels = { + connected: "mcp.status.connected", + failed: "mcp.status.failed", + needs_auth: "mcp.status.needs_auth", + disabled: "mcp.status.disabled", +} as const + const ExtensionRow: Component<{ - icon: "mcp" | "cube" | "post-skill" | "code" + icon?: "cube" | "post-skill" | "code" + /** An MCP server's status, shown as a dot in the icon's place, as on the server-wide page. */ + status?: string name: string + /** Where OpenCode Console manages it; the name links there. */ + console?: string + /** Console's server of the same name, which the user's config replaces. */ + replaces?: string description?: JSX.Element children?: JSX.Element }> = (props) => (
- + {(icon) => } + } + > + {(status) => ( + + + )} +
- {props.name} + + {props.name}} + > + {(href) => } + + {(href) => } + {props.description} @@ -222,6 +259,10 @@ export const ProjectSettingsExtensions: Component<{ const data = useData() const mcp = useMcpController(() => directorySDK().directory) + const platform = usePlatform() + + const sources = createConsoleSources(() => directorySDK().directory) + createEffect(() => { if (serverSDK.connection.status() !== "connected") return const ref = { directory: directorySDK().directory } @@ -246,9 +287,17 @@ export const ProjectSettingsExtensions: Component<{ .sort() }) - const mcpStatus = (name: string) => + const mcpServer = (name: string) => data.location.mcp.server.list({ directory: directorySDK().directory })?.find((server) => server.name === name) - ?.status.status + + const mcpStatus = (name: string) => mcpServer(name)?.status.status + + // A server that needs a sign-in it can start asks for it in the switch's place, as on the server-wide page. + const needsSignIn = (name: string) => { + const server = mcpServer(name) + + return server?.status.status === "needs_auth" && !!server.integrationID + } // Both lists load as one, so a project list that answers first never shows shared plugins as the project's own. A // deleted project folder has no plugins of its own; `ProjectFolderMissing` explains why. @@ -298,20 +347,75 @@ export const ProjectSettingsExtensions: Component<{ ) }) + // A Console server whose account isn't connected answers but can't run its tools, so its dot asks for the connection. + const mcpDot = (name: string) => { + const status = mcpStatus(name) ?? "pending" + + return sources.managed(name)?.needsConnection && status === "connected" ? "needs_auth" : status + } + + // The dot shows the status, as in the MCPs dialog; the words stay for assistive technology. + const mcpLabel = (name: string) => { + const status = mcpStatus(name) + + return status && status !== "pending" ? language.t(statusLabels[status]) : undefined + } + const mcpRows = (items: string[]) => ( {(name) => ( - - - mcp.dispatch({ type: "toggle.requested", name, enabled, status: untrack(() => mcpStatus(name)) }) + + + mcp.dispatch({ type: "toggle.requested", name, enabled, status: untrack(() => mcpStatus(name)) }) + } + > + {name} + + } + > + + } > - {name} - + {(href) => ( + + )} + )} @@ -320,7 +424,9 @@ export const ProjectSettingsExtensions: Component<{ const pluginRows = (items: string[]) => {(name) => } const skillRows = (items: SkillItem[]) => ( - {(item) => } + + {(item) => } + ) return ( @@ -364,6 +470,13 @@ export const ProjectSettingsExtensions: Component<{ {mcpRows(projectMcpNames())} {mcpRows(globalMcpNames())} + + +
@@ -406,6 +519,13 @@ export const ProjectSettingsExtensions: Component<{ {skillRows(projectSkills())} {skillRows(serverSkills())} + + +
diff --git a/packages/app/src/settings/workspaces/project.css b/packages/app/src/settings/workspaces/project.css index af66cc5e0a0..b8ada6daf6a 100644 --- a/packages/app/src/settings/workspaces/project.css +++ b/packages/app/src/settings/workspaces/project.css @@ -62,6 +62,14 @@ white-space: nowrap; } +/* The name, then where Console manages a server the user's config replaces, on one line. */ +.project-settings-extension-row-title { + display: flex; + min-width: 0; + align-items: center; + gap: 8px; +} + .project-settings-extension-row-copy { display: flex; min-width: 0; diff --git a/packages/app/src/shell/search-list.css b/packages/app/src/shell/search-list.css index 15b70456f72..aca1d75a55a 100644 --- a/packages/app/src/shell/search-list.css +++ b/packages/app/src/shell/search-list.css @@ -193,21 +193,6 @@ white-space: nowrap; } -/* A quiet ghost action in the switch's place, small enough to weigh about as much as a switch. */ -.mcp-status-action[data-component="button-v2"][data-size="small"] { - height: 20px; - padding-inline: 5px; - font-size: 11px; - font-weight: 440; - line-height: 16px; - letter-spacing: 0.05px; -} - -/* At the row's end, the label lines up with the switches above and below it. */ -.mcp-status-action[data-component="button-v2"]:last-child { - margin-inline-end: -5px; -} - @media (prefers-reduced-motion: reduce) { .mcp-status-dot[data-status="pending"] { animation: none; diff --git a/packages/gui-plugins/src/details/server-panel.tsx b/packages/gui-plugins/src/details/server-panel.tsx index 68d7fbf87e5..aae341070f3 100644 --- a/packages/gui-plugins/src/details/server-panel.tsx +++ b/packages/gui-plugins/src/details/server-panel.tsx @@ -74,7 +74,7 @@ import { const services = [ { type: "mcp", icon: "mcp", label: "mcp" }, { type: "plugins", icon: "cube", label: "plugins" }, - { type: "skills", icon: "graduation-cap", label: "skills" }, + { type: "skills", icon: "post-skill", label: "skills" }, ] as const satisfies readonly { type: Service; icon: string; label: string }[] type ServiceProps = { diff --git a/packages/ui/src/icons/icon/additional-icons.ts b/packages/ui/src/icons/icon/additional-icons.ts index e3789db83f4..705fdfc58e1 100644 --- a/packages/ui/src/icons/icon/additional-icons.ts +++ b/packages/ui/src/icons/icon/additional-icons.ts @@ -106,7 +106,8 @@ export const additionalIcons = { notifications: ``, extensions: ``, cube: ``, - "post-skill": ``, + // The open book OpenCode Console draws for a skill, so a skill looks the same in both. + "post-skill": ``, "arrow-undo-down": ``, } @@ -118,7 +119,8 @@ export function additionalIconViewBox(name: keyof typeof additionalIcons) { name === "extensions" || name === "sliders" || name === "providers" || - name === "models" + name === "models" || + name === "post-skill" ? "0 0 16 16" : "0 0 20 20" } diff --git a/packages/ui/src/icons/new-icons.ts b/packages/ui/src/icons/new-icons.ts index 5765864f40f..2d7332833b0 100644 --- a/packages/ui/src/icons/new-icons.ts +++ b/packages/ui/src/icons/new-icons.ts @@ -89,7 +89,6 @@ const replacements: Partial