-
Notifications
You must be signed in to change notification settings - Fork 292
Expand file tree
/
Copy pathextensions.ts
More file actions
149 lines (146 loc) · 3.46 KB
/
extensions.ts
File metadata and controls
149 lines (146 loc) · 3.46 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
import { DataScienceStackComponent } from '@odh-dashboard/internal/concepts/areas/types';
import type {
NavExtension,
RouteExtension,
AreaExtension,
} from '@odh-dashboard/plugin-core/extension-points';
import {
aiAssetsRootPath,
chatPlaygroundRootPath,
globAiAssetsAll,
globChatPlaygroundAll,
globGenAiAll,
} from '~/app/utilities/routes';
import type { AIAssetsTabExtension } from '~/odh/extension-points';
const PLUGIN_GEN_AI = 'plugin-gen-ai';
const GUARDRAILS = 'guardrails';
const PROMPT_MANAGEMENT = 'promptManagement';
const AI_ASSET_CUSTOM_ENDPOINTS = 'aiAssetCustomEndpoints';
const AI_ASSET_VECTOR_STORES = 'ai-asset-vector-stores';
const extensions: (NavExtension | RouteExtension | AreaExtension | AIAssetsTabExtension)[] = [
{
type: 'app.area',
properties: {
id: PLUGIN_GEN_AI,
requiredComponents: [DataScienceStackComponent.LLAMA_STACK_OPERATOR],
featureFlags: ['genAiStudio'],
},
},
{
type: 'app.area',
properties: {
id: GUARDRAILS,
reliantAreas: [PLUGIN_GEN_AI],
devFlags: [GUARDRAILS],
},
},
{
type: 'app.area',
properties: {
id: AI_ASSET_CUSTOM_ENDPOINTS,
reliantAreas: [PLUGIN_GEN_AI],
featureFlags: [AI_ASSET_CUSTOM_ENDPOINTS],
},
},
{
type: 'app.area',
properties: {
id: PROMPT_MANAGEMENT,
reliantAreas: [PLUGIN_GEN_AI],
featureFlags: [PROMPT_MANAGEMENT],
},
},
{
type: 'app.area',
properties: {
id: AI_ASSET_VECTOR_STORES,
reliantAreas: [PLUGIN_GEN_AI],
devFlags: [AI_ASSET_VECTOR_STORES],
},
},
{
type: 'app.navigation/section',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
id: 'gen-ai-studio',
title: 'Gen AI studio',
group: '4_gen_ai_studio',
iconRef: () => import('./GenAiStudioNavIcon'),
},
},
{
type: 'app.navigation/href',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
id: 'chat-playground',
title: 'Playground',
href: chatPlaygroundRootPath,
section: 'gen-ai-studio',
path: globChatPlaygroundAll,
label: 'Tech Preview',
},
},
{
type: 'app.navigation/href',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
id: 'ai-assets',
title: 'AI asset endpoints',
href: aiAssetsRootPath,
section: 'gen-ai-studio',
path: globAiAssetsAll,
label: 'Tech Preview',
},
},
{
type: 'app.route',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
path: globGenAiAll,
component: () => import('./GenAiWrapper'),
},
},
// AI Assets Tab Extensions
{
type: 'gen-ai.ai-assets/tab',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
id: 'models',
title: 'Models',
component: () => import('../app/AIAssets/AIAssetsModelsTab').then((m) => m.default),
},
},
{
type: 'gen-ai.ai-assets/tab',
flags: {
required: [PLUGIN_GEN_AI],
},
properties: {
id: 'mcpservers',
title: 'MCP servers',
component: () => import('../app/AIAssets/AIAssetsMCPTab').then((m) => m.default),
},
},
{
type: 'gen-ai.ai-assets/tab',
flags: {
required: [PLUGIN_GEN_AI, AI_ASSET_VECTOR_STORES],
},
properties: {
id: 'vectorstores',
title: 'Vector stores',
component: () => import('../app/AIAssets/AIAssetsVectorStoresTab').then((m) => m.default),
},
},
];
export default extensions;