Skip to content

Commit e3aae6d

Browse files
Merge pull request #778 from devtron-labs/fix/main-context-ai-config-type
fix: type for ai config in main context
2 parents ab998e7 + 21e8011 commit e3aae6d

3 files changed

Lines changed: 11 additions & 13 deletions

File tree

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@devtron-labs/devtron-fe-common-lib",
3-
"version": "1.15.1-beta-3",
3+
"version": "1.15.1-pre-3",
44
"description": "Supporting common component library",
55
"type": "module",
66
"main": "dist/index.js",

src/Shared/Providers/types.ts

Lines changed: 8 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,11 @@ export interface SidePanelConfig {
4343
docLink: string | null
4444
}
4545

46+
type AIAgentContextType = {
47+
path: string
48+
context: Record<string, string>
49+
}
50+
4651
type CommonMainContextProps = {
4752
setServerMode: (serverMode: SERVER_MODE) => void
4853
isHelpGettingStartedClicked: boolean
@@ -83,13 +88,7 @@ type CommonMainContextProps = {
8388
setLicenseData: Dispatch<SetStateAction<DevtronLicenseInfo>>
8489
canFetchHelmAppStatus: boolean
8590
setIntelligenceConfig: Dispatch<SetStateAction<IntelligenceConfig>>
86-
aiAgentContext: {
87-
path: string
88-
context: Record<string, string>
89-
}
90-
setAIAgentContext: (aiAgentContext: CommonMainContextProps['aiAgentContext']) => void
91-
92-
sidePanelConfig: SidePanelConfig
91+
setAIAgentContext: (aiAgentContext: AIAgentContextType) => void
9392
setSidePanelConfig: Dispatch<SetStateAction<SidePanelConfig>>
9493
}
9594

@@ -120,6 +119,7 @@ export type MainContext = CommonMainContextProps &
120119
* Used to conditionally render or enable features that depend on fe-lib
121120
*/
122121
isFELibAvailable: boolean
122+
aiAgentContext: AIAgentContextType
123123
}
124124
| {
125125
isLicenseDashboard: true
@@ -130,14 +130,12 @@ export type MainContext = CommonMainContextProps &
130130
* Data is set only if showLicenseData is received as true
131131
*/
132132
licenseData: null
133-
134133
reloadVersionConfig: null
135134
intelligenceConfig: null
136-
137135
sidePanelConfig: null
138-
139136
isEnterprise: false
140137
isFELibAvailable: false
138+
aiAgentContext: null
141139
}
142140
)
143141

0 commit comments

Comments
 (0)