diff --git a/apps/web/components/integrations-view.tsx b/apps/web/components/integrations-view.tsx index f24188bf..fb77040f 100644 --- a/apps/web/components/integrations-view.tsx +++ b/apps/web/components/integrations-view.tsx @@ -1512,7 +1512,8 @@ export function IntegrationsView() { : [] const pluginSteps = dialogPlugin?.installSteps ?? [] const stepsEmbedKey = pluginSteps.some((s) => s.code?.includes("sm_...")) - const setupSteps: InstallStep[] = stepsEmbedKey + const skipGeneratedKeyStep = stepsEmbedKey || !!dialogPlugin?.usesOAuth + const setupSteps: InstallStep[] = skipGeneratedKeyStep ? pluginSteps : [ { diff --git a/apps/web/components/integrations/plugins-detail.tsx b/apps/web/components/integrations/plugins-detail.tsx index a77ec214..e121869c 100644 --- a/apps/web/components/integrations/plugins-detail.tsx +++ b/apps/web/components/integrations/plugins-detail.tsx @@ -620,9 +620,11 @@ export function PluginsDetail() { const pluginSteps = dialogPlugin?.installSteps ?? [] // If a step already embeds the key (an `export …="sm_…"` line), don't also // show the bare key in its own step — that's the repetition to avoid. - // Otherwise (wizard-style installs) lead with a copy-the-key step. + // Otherwise (wizard-style installs) lead with a copy-the-key step, unless + // the plugin performs browser OAuth itself. const stepsEmbedKey = pluginSteps.some((s) => s.code?.includes("sm_...")) - const setupSteps: InstallStep[] = stepsEmbedKey + const skipGeneratedKeyStep = stepsEmbedKey || !!dialogPlugin?.usesOAuth + const setupSteps: InstallStep[] = skipGeneratedKeyStep ? pluginSteps : [ { diff --git a/apps/web/lib/plugin-catalog.ts b/apps/web/lib/plugin-catalog.ts index f16d087e..9f17d156 100644 --- a/apps/web/lib/plugin-catalog.ts +++ b/apps/web/lib/plugin-catalog.ts @@ -15,6 +15,7 @@ export interface PluginInfo { icon: string docsUrl?: string githubUrl?: string + usesOAuth?: boolean /** Steps shown after a key is minted. The literal `sm_...` is replaced * with the freshly generated key when rendered. */ installSteps?: InstallStep[] @@ -79,20 +80,20 @@ export const PLUGIN_CATALOG: Record = { tagline: "Long-term memory for your OpenCode sessions", icon: "/images/plugins/opencode.svg", docsUrl: "https://docs.supermemory.ai/integrations/opencode", + githubUrl: "https://github.com/supermemoryai/opencode-supermemory", + usesOAuth: true, installSteps: [ - { - title: "Save your API key", - description: - "Add this to your shell profile. This key is shown only once — save it now.", - code: 'export SUPERMEMORY_API_KEY="sm_..."', - copyLabel: "API key", - secret: true, - }, { title: "Install the plugin", description: "Use --no-tui for non-interactive environments.", code: "bunx opencode-supermemory@latest install", }, + { + title: "Authenticate OpenCode", + description: + "Run the browser auth flow from the machine where OpenCode runs:", + code: "bunx opencode-supermemory@latest login", + }, { title: "Verify your config", description: