mirror of
https://github.com/supermemoryai/supermemory.git
synced 2026-09-09 22:31:10 +00:00
Add OpenCode OAuth setup to integrations
This commit is contained in:
parent
c7d191e787
commit
bbfc059f96
3 changed files with 15 additions and 11 deletions
|
|
@ -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
|
||||
: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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
|
||||
: [
|
||||
{
|
||||
|
|
|
|||
|
|
@ -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<string, PluginInfo> = {
|
|||
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:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue