Skip to content

Commit

Permalink
feat(plugins): add ai category (#1491)
Browse files Browse the repository at this point in the history
Move AI plugins into their own `AI` category on Plugin Select.
  • Loading branch information
kaiarrowood authored Jul 11, 2024
1 parent a8163dc commit 54d37df
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 8 deletions.
16 changes: 8 additions & 8 deletions packages/entities/entities-plugins/src/definitions/metadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -284,63 +284,63 @@ export const PLUGIN_METADATA: Record<string, Omit<PluginMetaData<I18nMessageSour
},
'ai-proxy': {
descriptionKey: 'plugins.meta.ai-proxy.description',
group: PluginGroup.SERVERLESS,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-proxy.name',
scope: [PluginScope.ROUTE],
useLegacyForm: true,
},
'ai-prompt-decorator': {
descriptionKey: 'plugins.meta.ai-prompt-decorator.description',
group: PluginGroup.TRANSFORMATIONS,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-prompt-decorator.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER],
useLegacyForm: true,
},
'ai-prompt-template': {
descriptionKey: 'plugins.meta.ai-prompt-template.description',
group: PluginGroup.TRANSFORMATIONS,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-prompt-template.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
useLegacyForm: true,
},
'ai-prompt-guard': {
descriptionKey: 'plugins.meta.ai-prompt-guard.description',
group: PluginGroup.TRAFFIC_CONTROL,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-prompt-guard.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER],
useLegacyForm: true,
},
'ai-request-transformer': {
descriptionKey: 'plugins.meta.ai-request-transformer.description',
group: PluginGroup.TRANSFORMATIONS,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-request-transformer.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
useLegacyForm: true,
},
'ai-response-transformer': {
descriptionKey: 'plugins.meta.ai-response-transformer.description',
group: PluginGroup.TRANSFORMATIONS,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-response-transformer.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
useLegacyForm: true,
},
'ai-rate-limiting-advanced': {
descriptionKey: 'plugins.meta.ai-rate-limiting-advanced.description',
group: PluginGroup.TRAFFIC_CONTROL,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-rate-limiting-advanced.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE, PluginScope.CONSUMER, PluginScope.CONSUMER_GROUP],
useLegacyForm: true,
},
'ai-azure-content-safety': {
descriptionKey: 'plugins.meta.ai-azure-content-safety.description',
group: PluginGroup.TRAFFIC_CONTROL,
group: PluginGroup.AI,
isEnterprise: true,
nameKey: 'plugins.meta.ai-azure-content-safety.name',
scope: [PluginScope.GLOBAL, PluginScope.SERVICE, PluginScope.ROUTE],
Expand Down
3 changes: 3 additions & 0 deletions packages/entities/entities-plugins/src/types/plugin.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ import type { PathToDotNotation } from '@kong-ui-public/i18n/dist/types/types'

export enum PluginGroup {
AUTHENTICATION = 'Authentication',
AI = 'AI',
SECURITY = 'Security',
TRAFFIC_CONTROL = 'Traffic Control',
SERVERLESS = 'Serverless',
Expand All @@ -15,6 +16,7 @@ export enum PluginGroup {

export const PluginGroupArray = [
PluginGroup.AUTHENTICATION,
PluginGroup.AI,
PluginGroup.SECURITY,
PluginGroup.TRAFFIC_CONTROL,
PluginGroup.SERVERLESS,
Expand All @@ -28,6 +30,7 @@ export const PluginGroupArray = [

export const PLUGIN_GROUPS_COLLAPSE_STATUS = {
[PluginGroup.AUTHENTICATION]: false,
[PluginGroup.AI]: false,
[PluginGroup.SECURITY]: false,
[PluginGroup.TRAFFIC_CONTROL]: false,
[PluginGroup.SERVERLESS]: false,
Expand Down

0 comments on commit 54d37df

Please sign in to comment.