feat(integrations): point third-party plugins at OpenChamber packages
This commit is contained in:
committed by
Cursor Agent
parent
0e0580f95c
commit
6e55df9bed
@@ -37,7 +37,7 @@ const getCatalogPluginPresentation = (
|
|||||||
}
|
}
|
||||||
).getCatalogPluginPresentation;
|
).getCatalogPluginPresentation;
|
||||||
|
|
||||||
const claudePackage = '@otto-assistant/opencode-claude';
|
const claudePackage = '@openchamber/opencode-claude';
|
||||||
|
|
||||||
const entry = (spec: string, scope: PluginEntry['scope'] = 'user'): PluginEntry => ({
|
const entry = (spec: string, scope: PluginEntry['scope'] = 'user'): PluginEntry => ({
|
||||||
id: `config:${scope}:${spec}`,
|
id: `config:${scope}:${spec}`,
|
||||||
@@ -117,7 +117,31 @@ describe('third-party plugin catalog helpers', () => {
|
|||||||
test('matches only a package or its versioned spec', () => {
|
test('matches only a package or its versioned spec', () => {
|
||||||
expect(specMatchesPackage(claudePackage, claudePackage)).toBe(true);
|
expect(specMatchesPackage(claudePackage, claudePackage)).toBe(true);
|
||||||
expect(specMatchesPackage(`${claudePackage}@0.6.0`, claudePackage)).toBe(true);
|
expect(specMatchesPackage(`${claudePackage}@0.6.0`, claudePackage)).toBe(true);
|
||||||
expect(specMatchesPackage('@otto-assistant/opencode-claude-extra@0.6.0', claudePackage)).toBe(false);
|
expect(specMatchesPackage('@openchamber/opencode-claude-extra@0.6.0', claudePackage)).toBe(false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test('points catalog plugins at the OpenChamber GitHub and npm packages', () => {
|
||||||
|
expect(thirdPartyCatalog.THIRD_PARTY_PLUGINS.map((plugin) => ({
|
||||||
|
id: plugin.id,
|
||||||
|
packageName: plugin.packageName,
|
||||||
|
homepage: plugin.homepage,
|
||||||
|
}))).toEqual([
|
||||||
|
{
|
||||||
|
id: 'opencode-claude',
|
||||||
|
packageName: '@openchamber/opencode-claude',
|
||||||
|
homepage: 'https://github.com/openchamber/opencode-claude',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'opencode-commandcode',
|
||||||
|
packageName: '@openchamber/opencode-commandcode',
|
||||||
|
homepage: 'https://github.com/openchamber/opencode-commandcode',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 'opencode-cursor-oauth',
|
||||||
|
packageName: '@openchamber/opencode-cursor',
|
||||||
|
homepage: 'https://github.com/openchamber/opencode-cursor',
|
||||||
|
},
|
||||||
|
]);
|
||||||
});
|
});
|
||||||
|
|
||||||
test('uses the configured user entry and its registry result', () => {
|
test('uses the configured user entry and its registry result', () => {
|
||||||
|
|||||||
@@ -17,33 +17,33 @@ export interface ThirdPartyPluginDefinition {
|
|||||||
export const THIRD_PARTY_PLUGINS: readonly ThirdPartyPluginDefinition[] = [
|
export const THIRD_PARTY_PLUGINS: readonly ThirdPartyPluginDefinition[] = [
|
||||||
{
|
{
|
||||||
id: 'opencode-claude',
|
id: 'opencode-claude',
|
||||||
packageName: '@otto-assistant/opencode-claude',
|
packageName: '@openchamber/opencode-claude',
|
||||||
providerId: 'claude-code',
|
providerId: 'claude-code',
|
||||||
icon: 'claude-code',
|
icon: 'claude-code',
|
||||||
brandClassName: 'text-[#D97757]',
|
brandClassName: 'text-[#D97757]',
|
||||||
nameKey: 'settings.integrations.thirdParty.opencodeClaude.name',
|
nameKey: 'settings.integrations.thirdParty.opencodeClaude.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeClaude.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeClaude.description',
|
||||||
homepage: 'https://github.com/otto-assistant/opencode-claude',
|
homepage: 'https://github.com/openchamber/opencode-claude',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'opencode-commandcode',
|
id: 'opencode-commandcode',
|
||||||
packageName: '@otto-assistant/opencode-commandcode',
|
packageName: '@openchamber/opencode-commandcode',
|
||||||
providerId: 'command-code',
|
providerId: 'command-code',
|
||||||
icon: 'command-code',
|
icon: 'command-code',
|
||||||
brandClassName: 'text-foreground',
|
brandClassName: 'text-foreground',
|
||||||
nameKey: 'settings.integrations.thirdParty.opencodeCommandcode.name',
|
nameKey: 'settings.integrations.thirdParty.opencodeCommandcode.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeCommandcode.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeCommandcode.description',
|
||||||
homepage: 'https://github.com/otto-assistant/opencode-commandcode',
|
homepage: 'https://github.com/openchamber/opencode-commandcode',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'opencode-cursor-oauth',
|
id: 'opencode-cursor-oauth',
|
||||||
packageName: '@otto-assistant/opencode-cursor-oauth',
|
packageName: '@openchamber/opencode-cursor',
|
||||||
providerId: 'cursor',
|
providerId: 'cursor',
|
||||||
icon: 'cursor',
|
icon: 'cursor',
|
||||||
brandClassName: 'text-foreground',
|
brandClassName: 'text-foreground',
|
||||||
nameKey: 'settings.integrations.thirdParty.opencodeCursorOauth.name',
|
nameKey: 'settings.integrations.thirdParty.opencodeCursorOauth.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeCursorOauth.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeCursorOauth.description',
|
||||||
homepage: 'https://github.com/otto-assistant/opencode-cursor',
|
homepage: 'https://github.com/openchamber/opencode-cursor',
|
||||||
},
|
},
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,17 @@ describe('settings search', () => {
|
|||||||
expect(results.some((result) => result.id === 'integrations.third-party.opencode-claude')).toBe(true);
|
expect(results.some((result) => result.id === 'integrations.third-party.opencode-claude')).toBe(true);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('finds third-party integrations by OpenChamber npm package names', () => {
|
||||||
|
const results = buildSettingsSearchResults({
|
||||||
|
query: '@openchamber/opencode-cursor',
|
||||||
|
runtimeCtx,
|
||||||
|
t,
|
||||||
|
getPageTitle: (page) => page,
|
||||||
|
});
|
||||||
|
|
||||||
|
expect(results.some((result) => result.id === 'integrations.third-party.opencode-cursor-oauth')).toBe(true);
|
||||||
|
});
|
||||||
|
|
||||||
test('finds coming-soon messenger placeholders', () => {
|
test('finds coming-soon messenger placeholders', () => {
|
||||||
const results = buildSettingsSearchResults({
|
const results = buildSettingsSearchResults({
|
||||||
query: 'discord',
|
query: 'discord',
|
||||||
|
|||||||
@@ -965,21 +965,21 @@ const SETTINGS_SEARCH_ITEMS: readonly SettingsSearchItem[] = [
|
|||||||
page: 'integrations',
|
page: 'integrations',
|
||||||
titleKey: 'settings.integrations.thirdParty.opencodeClaude.name',
|
titleKey: 'settings.integrations.thirdParty.opencodeClaude.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeClaude.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeClaude.description',
|
||||||
keywords: ['claude', 'anthropic', 'claude code', 'pro', 'max', 'agent sdk'],
|
keywords: ['claude', 'anthropic', 'claude code', 'pro', 'max', 'agent sdk', '@openchamber/opencode-claude'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'integrations.third-party.opencode-commandcode',
|
id: 'integrations.third-party.opencode-commandcode',
|
||||||
page: 'integrations',
|
page: 'integrations',
|
||||||
titleKey: 'settings.integrations.thirdParty.opencodeCommandcode.name',
|
titleKey: 'settings.integrations.thirdParty.opencodeCommandcode.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeCommandcode.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeCommandcode.description',
|
||||||
keywords: ['command code', 'commandcode', 'laguna', 'poolside', 'gateway'],
|
keywords: ['command code', 'commandcode', 'laguna', 'poolside', 'gateway', '@openchamber/opencode-commandcode'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
id: 'integrations.third-party.opencode-cursor-oauth',
|
id: 'integrations.third-party.opencode-cursor-oauth',
|
||||||
page: 'integrations',
|
page: 'integrations',
|
||||||
titleKey: 'settings.integrations.thirdParty.opencodeCursorOauth.name',
|
titleKey: 'settings.integrations.thirdParty.opencodeCursorOauth.name',
|
||||||
descriptionKey: 'settings.integrations.thirdParty.opencodeCursorOauth.description',
|
descriptionKey: 'settings.integrations.thirdParty.opencodeCursorOauth.description',
|
||||||
keywords: ['cursor', 'oauth', 'subscription', 'openai compatible'],
|
keywords: ['cursor', 'oauth', 'subscription', 'openai compatible', '@openchamber/opencode-cursor'],
|
||||||
},
|
},
|
||||||
] as const;
|
] as const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user